link

December 10, Wednesday
12:00 – 13:30

Portably preventing file race attacks with user-mode path resolution
Faculty & Graduate
Lecturer : Dr. Dan Tsafrir
Lecturer homepage : http://www.cs.huji.ac.il/~dants/
Affiliation : IBM TJ Watson Research Center
Location : 202/37
Host : Dr. Michael Elkin
The filesystem API of contemporary systems exposes programs to TOCTTOU (time of check to time of use) race-condition vulnerabilities, which occur between pairs of check/use system calls that involve a name of a file. Existing solutions either help programmers to detect such races (by pinpointing their location) or prevent them altogether (by altering the operating system). But the latter alternative is not prevalent, and the former is just the first step: programmers must still address TOCTTOU flaws within the limits of the existing API with which several important tasks cannot be safely accomplished in a portable straightforward manner. The recent "filesystem maze" attack further worsens the problem by allowing adversaries to deterministically win races and thus refuting the common perception that the risk is small. In the face of this threat, we develop a new algorithm that allows programmers to effectively aggregate a vulnerable pair of distinct system calls into a single operation that is executed "atomically". This is achieved by emulating one kernel functionality in user mode: the filepath resolution. The surprisingly simple resulting algorithm constitutes a portable solution to a large class of TOCTTOU vulnerabilities, without requiring modifications to the underlying operating system.


Joint work with Tomer Hertz (Microsoft Research), David Wagner (Berkeley), and Dilma Da Silva (IBM T.J. Watson Research Center). Based on http://www.usenix.org/events/fast08/tech/tsafrir.html USENIX File & Storage Technologies (FAST'08). Awarded best paper.