RETBLEED: Arbitrary Speculative Code Execution with Return Instructions
Johannes Wikner, Kaveh Razavi
摘要
Modern operating systems rely on software defenses against hardware attacks. These defenses are, however, as good as the assumptions they make on the underlying hardware. In this paper, we invalidate some of the key assumptions behind retpoline, a widely deployed mitigation against Spectre Branch Target Injection (BTI) that converts vulnerable indirect branches to protected returns. We present RETBLEED, a new Spectre-BTI attack that leaks arbitrary kernel memory on fully patched Intel and AMD systems. Two insights make RETBLEED possible: first, we show that return instructions behave like indirect branches under certain microarchitecture-dependent conditions, which we reverse engineer. Our dynamic analysis framework discovers many exploitable return instructions inside the Linux kernel, reachable through unprivileged system calls. Second, we show how an unprivileged attacker can arbitrarily control the predicted target of such return instructions by branching into kernel memory. RETBLEED leaks privileged memory at the rate of 219 bytes/s on Intel Coffee Lake and 3.9 kB/s on AMD Zen 2.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 47 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- ZombieLoad: Cross-Privilege-Boundary Data Sampling 引用了 Spectre Attacks: Exploiting Speculative Execution
- Meltdown: Reading Kernel Memory from User Space 引用了 Spectre Attacks: Exploiting Speculative Execution
- Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution 引用了 Spectre Attacks: Exploiting Speculative Execution
- WhisperFuzz: White-Box Fuzzing for Detecting and Locating Timing Vulnerabilities in Processors 引用了 Spectre Attacks: Exploiting Speculative Execution
- WhisperFuzz: White-Box Fuzzing for Detecting and Locating Timing Vulnerabilities in Processors 引用了 ZombieLoad: Cross-Privilege-Boundary Data Sampling
- WhisperFuzz: White-Box Fuzzing for Detecting and Locating Timing Vulnerabilities in Processors 引用了 Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution
- InSpectre Gadget: Inspecting the Residual Attack Surface of Cross-privilege Spectre v2 引用了 Spectre Attacks: Exploiting Speculative Execution
- InSpectre Gadget: Inspecting the Residual Attack Surface of Cross-privilege Spectre v2 引用了 Meltdown: Reading Kernel Memory from User Space
- Serberus: Protecting Cryptographic Code from Spectres at Compile-Time 引用了 Spectre Attacks: Exploiting Speculative Execution
- Serberus: Protecting Cryptographic Code from Spectres at Compile-Time 引用了 ZombieLoad: Cross-Privilege-Boundary Data Sampling
- Serberus: Protecting Cryptographic Code from Spectres at Compile-Time 引用了 Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution
- Phantom: Exploiting Decoder-detectable Mispredictions 引用了 Spectre Attacks: Exploiting Speculative Execution
- Phantom: Exploiting Decoder-detectable Mispredictions 引用了 ZombieLoad: Cross-Privilege-Boundary Data Sampling
- Phantom: Exploiting Decoder-detectable Mispredictions 引用了 Meltdown: Reading Kernel Memory from User Space
- Phantom: Exploiting Decoder-detectable Mispredictions 引用了 Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution
- iLeakage: Browser-based Timerless Speculative Execution Attacks on Apple Devices 引用了 Spectre Attacks: Exploiting Speculative Execution
- iLeakage: Browser-based Timerless Speculative Execution Attacks on Apple Devices 引用了 Meltdown: Reading Kernel Memory from User Space
- iLeakage: Browser-based Timerless Speculative Execution Attacks on Apple Devices 引用了 Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution
引用它的顶会 Paper47
- InSpectre Gadget: Inspecting the Residual Attack Surface of Cross-privilege Spectre v2Sander Wiebing, Alvise de Faveri Tron, Herbert Bos, Cristiano GiuffridaUSENIX Security 2024 · 32 次引用
- WhisperFuzz: White-Box Fuzzing for Detecting and Locating Timing Vulnerabilities in ProcessorsPallavi Borkar, Chen Chen, Mohamadreza Rostami, Nikhilesh Singh 等USENIX Security 2024 · 31 次引用
- Phantom: Exploiting Decoder-detectable MispredictionsJohannes Wikner, Daniël Trujillo, Kaveh RazaviMICRO 2023 · 19 次引用
- Serberus: Protecting Cryptographic Code from Spectres at Compile-TimeNicholas Mosier, Hamed Nemati, John C. Mitchell, Caroline TrippelS&P 2024 · 16 次引用
- iLeakage: Browser-based Timerless Speculative Execution Attacks on Apple DevicesJason Kim, Stephan van Schaik, Daniel Genkin, Yuval YaromCCS 2023 · 16 次引用
它引用的 Paper23
- 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 次引用
- Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order ExecutionJo Van Bulck, Marina Minkin, Ofir Weisse, Daniel Genkin 等USENIX Security 2018 · 1,175 次引用
- SOK: (State of) The Art of War: Offensive Techniques in Binary AnalysisYan Shoshitaishvili, Ruoyu Wang, Christopher Salls, Nick Stephens 等S&P 2016 · 1,085 次引用
- ZombieLoad: Cross-Privilege-Boundary Data SamplingMichael Schwarz, Moritz Lipp, Daniel Moghimi, Jo Van Bulck 等CCS 2019 · 464 次引用
相关 Paper
- Branch History Injection: On the Effectiveness of Hardware Mitigations Against Cross-Privilege Spectre-v2 AttacksEnrico Barberis, Pietro Frigo, Marius Muench, Herbert Bos 等USENIX Security 2022
- Breaking the Barrier: Post-Barrier Spectre AttacksJohannes Wikner, Kaveh RazaviS&P 2025
- VMSCAPE: Exposing and Exploiting Incomplete Branch Predictor Isolation in Cloud EnvironmentsJean-Claude Graf, Sandro Rüegge, Ali Hajiabadi, Kaveh RazaviS&P 2026 · 4 次引用
- Branch Privilege Injection: Compromising Spectre v2 Hardware Mitigations by Exploiting Branch Predictor Race ConditionsSandro Rüegge, Johannes Wikner, Kaveh RazaviUSENIX Security 2025
- Defeating Transient Execution Attacks by Limiting Secret Reachability Through Register Hiding and ShadowCFIDaniël Trujillo, Jagadish Kotra, David Kaplan, Mengjia YanS&P 2026 · 1 次引用
