Lune

USENIX Security2024顶会

SafeFetch: Practical Double-Fetch Protection with Kernel-Fetch Caching

Victor Duta, Mitchel Aloserij, Cristiano Giuffrida

摘要

Double-fetch bugs (or vulnerabilities) stem from in-kernel system call execution fetching the same user data twice without proper data (re)sanitization, enabling TOCT-TOU attacks and posing a major threat to operating systems security. Existing double-fetch protection systems rely on the MMU to trap on writes to syscall-accessed user pages and provide the kernel with a consistent snapshot of user memory. While this strategy can hinder attacks, it also introduces nontrivial runtime performance overhead due to the cost of trapping/remapping and the coarse (page-granular) write interposition mechanism. In this paper, we propose SafeFetch, a practical solution to protect the kernel from double-fetch bugs. The key intuition is that most system calls fetch small amounts of user data (if at all), hence caching this data in the kernel can be done at a small performance cost. To this end, SafeFetch creates per-syscall caches to persist fetched user data and replay them when they are fetched again within the same syscall. This strategy neutralizes all double-fetch bugs, while eliminating trapping/remapping overheads and relying on efficient byte-granular interposition. Our Linux prototype evaluation shows SafeFetch can provide comprehensive protection with low performance overheads (e.g., 4.4% geomean on LMBench), significantly outperforming state-of-the-art solutions.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • IsolatOS: Detecting Double Fetch Bugs in COTS RTOS by Re-enabling Kernel Isolation 引用了 Midas: Systematic Kernel TOCTTOU Protection
  • IsolatOS: Detecting Double Fetch Bugs in COTS RTOS by Re-enabling Kernel Isolation 引用了 Precise and Scalable Detection of Double-Fetch Bugs in OS Kernels
  • IsolatOS: Detecting Double Fetch Bugs in COTS RTOS by Re-enabling Kernel Isolation 引用了 How Double-Fetch Situations turn into Double-Fetch Vulnerabilities: A Study of Double Fetches in the Linux Kernel
  • Midas: Systematic Kernel TOCTTOU Protection 引用了 Precise and Scalable Detection of Double-Fetch Bugs in OS Kernels
  • Midas: Systematic Kernel TOCTTOU Protection 引用了 How Double-Fetch Situations turn into Double-Fetch Vulnerabilities: A Study of Double Fetches in the Linux Kernel
  • Dynamic Detection of Vulnerable DMA Race Conditions 引用了 Midas: Systematic Kernel TOCTTOU Protection
  • Dynamic Detection of Vulnerable DMA Race Conditions 引用了 Precise and Scalable Detection of Double-Fetch Bugs in OS Kernels
  • Dynamic Detection of Vulnerable DMA Race Conditions 引用了 How Double-Fetch Situations turn into Double-Fetch Vulnerabilities: A Study of Double Fetches in the Linux Kernel
  • Precise and Scalable Detection of Double-Fetch Bugs in OS Kernels 引用了 How Double-Fetch Situations turn into Double-Fetch Vulnerabilities: A Study of Double Fetches in the Linux Kernel
  • Silent Bugs Matter: A Study of Compiler-Introduced Security Bugs 引用了 Precise and Scalable Detection of Double-Fetch Bugs in OS Kernels
  • Static Detection of TOCTOU Bugs Caused by Kernel Races 引用了 Precise and Scalable Detection of Double-Fetch Bugs in OS Kernels
  • Static Detection of TOCTOU Bugs Caused by Kernel Races 引用了 How Double-Fetch Situations turn into Double-Fetch Vulnerabilities: A Study of Double Fetches in the Linux Kernel
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper3

  1. IsolatOS: Detecting Double Fetch Bugs in COTS RTOS by Re-enabling Kernel IsolationYingjie Cao, Xiaogang Zhu, Dean Sullivan, Haowei Yang 等NDSS 2026 · 1 次引用
  2. Dynamic Detection of Vulnerable DMA Race ConditionsBrian Johannesmeyer, Raphael Isemann, Cristiano Giuffrida, Herbert BosCCS 2025
  3. Static Detection of TOCTOU Bugs Caused by Kernel RacesGui-Dong Han, Jia-Ju Bai, Qiu-Ji Chen, Jiqiang LuUSENIX Security 2026

它引用的 Paper7

  1. Precise and Scalable Detection of Double-Fetch Bugs in OS KernelsMeng Xu, Chenxiong Qian, Kangjie Lu, Michael Backes 等S&P 2018 · 95 次引用
  2. How Double-Fetch Situations turn into Double-Fetch Vulnerabilities: A Study of Double Fetches in the Linux KernelPengfei Wang, Jens Krinke, Kai Lu, Gen Li 等USENIX Security 2017 · 66 次引用
  3. Midas: Systematic Kernel TOCTTOU ProtectionAtri Bhattacharyya, Uros Tesic, Mathias PayerUSENIX Security 2022
  4. SecureCells: A Secure Compartmentalized ArchitectureAtri Bhattacharyya, Florian Hofhammer, Yuanlong Li, Siddharth Gupta 等S&P 2023
  5. Silent Bugs Matter: A Study of Compiler-Introduced Security BugsJianhao Xu, Kangjie Lu, Zhengjie Du, Zhu Ding 等USENIX Security 2023

相关 Paper

  1. WarpAttack: Bypassing CFI through Compiler-Introduced Double-FetchesJianhao Xu, Luca Di Bartolomeo, Flavio Toffalini, Bing Mao 等S&P 2023
  2. Check It Again: Detecting Lacking-Recheck Bugs in OS KernelsWenwen Wang, Kangjie Lu, Pen-Chung YewCCS 2018 · 49 次引用
  3. Don't shoot down TLB shootdowns!Nadav Amit, Amy Tai, Michael WeiEuroSys 2020 · 32 次引用
  4. Prefetch Side-Channel Attacks: Bypassing SMAP and Kernel ASLRDaniel Gruss, Clémentine Maurice, Anders Fogh, Moritz Lipp 等CCS 2016 · 278 次引用
  5. Preventing Use-After-Free Attacks with Fast Forward AllocationBrian Wickman, Hong Hu, Insu Yun, Daehee Jang 等USENIX Security 2021 · 53 次引用
黄昏的海面,两侧是细线勾勒的悬崖