Midas: Systematic Kernel TOCTTOU Protection
Double-fetch bugs are a plague across all major operating system kernels. They occur when data is fetched twice across the user/kernel trust boundary while allowing concurrent modification. Such bugs enable an attacker to illegally access memory, cause denial of service, or to escalate privileges. So far, the only protection against double-fetch bugs is to detect and fix them. However, they remain incredibly hard to find. Similarly, they fundamentally prohibit efficient, kernel-based stateful system call filtering. We propose Midas to mitigate double-fetch bugs. Midas creates on-demand snapshots and copies of accessed data, enforcing our key invariant that throughout a syscall's lifetime, every read to a userspace object will return the same value. Midas shows no noticeable drop in performance when evaluated on compute-bound workloads. On system call heavy workloads, Midas incurs 0.2-14% performance overhead, while protecting the kernel against any TOCTTOU attacks. On average, Midas shows a 3.4% overhead on diverse workloads across two benchmark suites.
Cite this item
Bhattacharyya, A., Tesic, U., & Payer, M. (2022). Midas: Systematic Kernel TOCTTOU Protection. Proceedings of the 31st USENIX Security Symposium, 106–124. https://infoscience.epfl.ch/handle/20.500.14299/182981
Click Copy to copy the citation, or select the text manually.
Midas_usenix22CR.pdf
Preprint
Submitted version (Preprint)
openaccess
n/a
1.65 MB
Adobe PDF
80f5d63e08b4de73a5f7dd7db483adf5