Time-of-check to time-of-use: Difference between revisions

Content deleted Content added
change text to match rename
Line 71:
Since this impossibility result, libraries for tracking [[file descriptor]]s and ensuring correctness have been proposed by researchers.<ref>{{cite web |last1=Tsafrir |first1=Dan |last2=Hertz |first2=Tomer |last3=Wagner |first3=David |last4=Da Silva |first4=Dilma |authorlink4=Dilma Da Silva |date=June 2008 |title=Portably Preventing File Race Attacks with User-Mode Path Resolution |work=Technical Report RC24572, [[Thomas J. Watson Research Center|IBM T. J. Watson Research Center]], Yorktown Heights (NY) |url=http://domino.watson.ibm.com/library/CyberDig.nsf/1e4115aea78b6e7c85256b360066f0d4/c4028924309762d18525746e004a4feb}}</ref>
 
An alternative solution proposed in the research community is for UNIX systems to adopt transactions[[transaction]]s in the file system or the OS kernel. Transactions provide a [[concurrency control]] abstraction for the OS, and can be used to prevent TOCTOU races. While no production UNIX kernel has yet adopted transactions, proof-of-concept research prototypes have been developed for Linux, including the Valor file system<ref>{{cite web |last1=Spillane |first1=Richard P. |last2=Gaikwad |first2=Sachin |last3=Chinni |first3=Manjunath |last4=Zadok |first4=Erez |year=2009 |title=Enabling Transactional File Access via Lightweight Kernel Extensions |work=Seventh USENIX Conference on File and Storage Technologies (FAST 2009), San Francisco (CA), February 24–27, 2009 |url=http://www.fsl.cs.sunysb.edu/docs/valor/valor_fast2009.pdf}}</ref> and the TxOS kernel.<ref>{{cite web |last1=Porter |first1=Donald E. |last2=Hofmann |first2=Owen S. |last3=Rossbach |first3=Christopher J. |last4=Benn |first4=Alexander |last5=Witchel |first5=Emmett |year=2009|title=Operating System Transactions |work=Proceedings of the 22nd [[Association for Computing Machinery|ACM]] Symposium on Operating Systems Principles (SOSP '09), Big Sky (MT), October 11–14, 2009 |url=http://www.sigops.org/sosp/sosp09/papers/porter-sosp09.pdf}}</ref> [[Microsoft Windows]] has added transactions to its [[NTFS]] file system,<ref>{{cite book |last1=Russinovich |first1=Mark |last2=Solomon |first2=David A. |year=2009 |title=Windows Internals |publisher=[[Microsoft Press]] |isbn=978-0735648739}}</ref> but Microsoft discourages their use, and has indicated that they may be removed in a future version of Windows.<ref>{{cite web |author=<!--Staff writer(s); no by-line.--> |title=Alternatives to using Transactional NTFS |website=[[Microsoft Developer Network]] |url=https://msdn.microsoft.com/en-us/library/windows/desktop/hh802690%28v=vs.85%29.aspx |access-date=10 December 2015}}</ref>
 
[[File locking]] is a common technique for preventing race conditions for a single file, but it does not extend to the file system namespace and other metadata, nor does locking work well with networked filesystems, and cannot prevent TOCTOU race conditions.