WarpAttack: Bypassing CFI through Compiler-Introduced Double-Fetches
Jianhao Xu, Luca Di Bartolomeo, Flavio Toffalini, Bing Mao, Mathias Payer
摘要
Code-reuse attacks are dangerous threats that attracted the attention of the security community for years. These attacks aim at corrupting important control-flow transfers for taking control of a process without injecting code. Nowadays, the combinations of multiple mitigations (e.g., ASLR, DEP, and CFI) drastically reduced this attack surface, making running code-reuse exploits more challenging.Unfortunately, security mitigations are combined with compiler optimizations, that do not distinguish between security-related and application code. Blindly deploying code optimizations over code-reuse mitigations may undermine their security guarantees. For instance, compilers may introduce double-fetch vulnerabilities that lead to concurrency issues such as Time-Of-Check to Time-Of-Use (TOCTTOU) attacks.In this work, we propose a new attack vector, called WarpAttack, that exploits compiler-introduced double-fetch optimizations to mount TOCTTOU attacks and bypass code-reuse mitigations. We study the mechanism underlying this attack and present a practical proof-of-concept exploit against the last version of Firefox. Additionally, we propose a lightweight analysis to locate vulnerable double-fetch code (with 3% false positives) and conduct research over six popular applications, five operating systems, and four architectures (32 and 64 bits) to study the diffusion of this threat. Moreover, we study the implication of our attack against six CFI implementations. Finally, we investigate possible research lines for addressing this threat and propose practical solutions to be deployed in existing projects.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 10 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- IsolatOS: Detecting Double Fetch Bugs in COTS RTOS by Re-enabling Kernel Isolation 引用了 SafeFetch: Practical Double-Fetch Protection with Kernel-Fetch Caching
- SoK: Shining Light on Shadow Stacks 引用了 Block Oriented Programming: Automating Data-Only Attacks
- Cryptographically Enforced Memory Safety 引用了 Spectre Attacks: Exploiting Speculative Execution
- Cryptographically Enforced Memory Safety 引用了 Block Oriented Programming: Automating Data-Only Attacks
- Cryptographically Enforced Memory Safety 引用了 Meltdown: Reading Kernel Memory from User Space
- Cryptographically Enforced Memory Safety 引用了 Data-Oriented Programming: On the Expressiveness of Non-control Data Attacks
- Block Oriented Programming: Automating Data-Only Attacks 引用了 Data-Oriented Programming: On the Expressiveness of Non-control Data Attacks
- Manipulative Interference Attacks 引用了 SoK: Shining Light on Shadow Stacks
- Manipulative Interference Attacks 引用了 Block Oriented Programming: Automating Data-Only Attacks
- Manipulative Interference Attacks 引用了 Data-Oriented Programming: On the Expressiveness of Non-control Data Attacks
- Meltdown: Reading Kernel Memory from User Space 引用了 Spectre Attacks: Exploiting Speculative Execution
- On Bridging the Gap between Control Flow Integrity and Attestation Schemes 引用了 Spectre Attacks: Exploiting Speculative Execution
引用它的顶会 Paper10
- On Bridging the Gap between Control Flow Integrity and Attestation SchemesMahmoud Ammar, Ahmed Abdelraoof, Silviu VlasceanuUSENIX Security 2024 · 9 次引用
- Cryptographically Enforced Memory SafetyMartin Unterguggenberger, David Schrammel, Lukas Lamster, Pascal Nasahl 等CCS 2023 · 6 次引用
- SafeFetch: Practical Double-Fetch Protection with Kernel-Fetch CachingVictor Duta, Mitchel Aloserij, Cristiano GiuffridaUSENIX Security 2024 · 2 次引用
- IsolatOS: Detecting Double Fetch Bugs in COTS RTOS by Re-enabling Kernel IsolationYingjie Cao, Xiaogang Zhu, Dean Sullivan, Haowei Yang 等NDSS 2026 · 1 次引用
- Manipulative Interference AttacksSamuel Mergendahl, Stephen Fickas, Boyana Norris, Richard SkowyraCCS 2024 · 1 次引用
它引用的 Paper15
- Spectre Attacks: Exploiting Speculative ExecutionPaul Kocher, Jann Horn, Anders Fogh, Daniel Genkin 等S&P 2019 · 2,435 次引用
- Meltdown: Reading Kernel Memory from User SpaceMoritz Lipp, Michael Schwarz, Daniel Gruss, Thomas Prescher 等USENIX Security 2018 · 1,456 次引用
- Data-Oriented Programming: On the Expressiveness of Non-control Data AttacksHong Hu, Shweta Shinde, Sendroiu Adrian, Zheng Leong Chua 等S&P 2016 · 420 次引用
- SoK: Shining Light on Shadow StacksNathan Burow, Xinping Zhang, Mathias PayerS&P 2019 · 170 次引用
- Block Oriented Programming: Automating Data-Only AttacksKyriakos K. Ispoglou, Bader AlBassam, Trent Jaeger, Mathias PayerCCS 2018 · 143 次引用
相关 Paper
- Not so fast: understanding and mitigating negative impacts of compiler optimizations on code reuse gadget setsMichael D. Brown, Matthew Pruett, Robert Bigelow, Girish Mururu 等OOPSLA 2021 · 11 次引用
- Cross-Language AttacksSamuel Mergendahl, Nathan Burow, Hamed OkhraviNDSS 2022
- Methodologies for Quantifying (Re-)randomization Security and Timing under JIT-ROPSalman Ahmed, Ya Xiao, Kevin Z. Snow, Gang Tan 等CCS 2020 · 21 次引用
- Return to the Zombie Gadgets: Undermining Destructive Code Reads via Code Inference AttacksKevin Z. Snow, Roman Rogowski, Jan Werner, Hyungjoon Koo 等S&P 2016 · 54 次引用
- A Generic Technique for Automatically Finding Defense-Aware Code Reuse AttacksEdward J. Schwartz, Cory F. Cohen, Jeffrey Gennari, Stephanie SchwartzCCS 2020 · 8 次引用
