Lune

USENIX Security2022Top-tier venue

RETBLEED: Arbitrary Speculative Code Execution with Return Instructions

Johannes Wikner, Kaveh Razavi

Abstract

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

47 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • ZombieLoad: Cross-Privilege-Boundary Data Sampling cites Spectre Attacks: Exploiting Speculative Execution
  • Meltdown: Reading Kernel Memory from User Space cites Spectre Attacks: Exploiting Speculative Execution
  • Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution cites Spectre Attacks: Exploiting Speculative Execution
  • WhisperFuzz: White-Box Fuzzing for Detecting and Locating Timing Vulnerabilities in Processors cites Spectre Attacks: Exploiting Speculative Execution
  • WhisperFuzz: White-Box Fuzzing for Detecting and Locating Timing Vulnerabilities in Processors cites ZombieLoad: Cross-Privilege-Boundary Data Sampling
  • WhisperFuzz: White-Box Fuzzing for Detecting and Locating Timing Vulnerabilities in Processors cites 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 cites Spectre Attacks: Exploiting Speculative Execution
  • InSpectre Gadget: Inspecting the Residual Attack Surface of Cross-privilege Spectre v2 cites Meltdown: Reading Kernel Memory from User Space
  • Serberus: Protecting Cryptographic Code from Spectres at Compile-Time cites Spectre Attacks: Exploiting Speculative Execution
  • Serberus: Protecting Cryptographic Code from Spectres at Compile-Time cites ZombieLoad: Cross-Privilege-Boundary Data Sampling
  • Serberus: Protecting Cryptographic Code from Spectres at Compile-Time cites Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution
  • Phantom: Exploiting Decoder-detectable Mispredictions cites Spectre Attacks: Exploiting Speculative Execution
  • Phantom: Exploiting Decoder-detectable Mispredictions cites ZombieLoad: Cross-Privilege-Boundary Data Sampling
  • Phantom: Exploiting Decoder-detectable Mispredictions cites Meltdown: Reading Kernel Memory from User Space
  • Phantom: Exploiting Decoder-detectable Mispredictions cites 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 cites Spectre Attacks: Exploiting Speculative Execution
  • iLeakage: Browser-based Timerless Speculative Execution Attacks on Apple Devices cites Meltdown: Reading Kernel Memory from User Space
  • iLeakage: Browser-based Timerless Speculative Execution Attacks on Apple Devices cites Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers47

  1. InSpectre Gadget: Inspecting the Residual Attack Surface of Cross-privilege Spectre v2Sander Wiebing, Alvise de Faveri Tron, Herbert Bos, Cristiano GiuffridaUSENIX Security 2024 · 32 citations
  2. WhisperFuzz: White-Box Fuzzing for Detecting and Locating Timing Vulnerabilities in ProcessorsPallavi Borkar, Chen Chen, Mohamadreza Rostami, Nikhilesh Singh et al.USENIX Security 2024 · 31 citations
  3. Phantom: Exploiting Decoder-detectable MispredictionsJohannes Wikner, Daniël Trujillo, Kaveh RazaviMICRO 2023 · 19 citations
  4. Serberus: Protecting Cryptographic Code from Spectres at Compile-TimeNicholas Mosier, Hamed Nemati, John C. Mitchell, Caroline TrippelS&P 2024 · 16 citations
  5. iLeakage: Browser-based Timerless Speculative Execution Attacks on Apple DevicesJason Kim, Stephan van Schaik, Daniel Genkin, Yuval YaromCCS 2023 · 16 citations

Builds on23

  1. Spectre Attacks: Exploiting Speculative ExecutionPaul Kocher, Jann Horn, Anders Fogh, Daniel Genkin et al.S&P 2019 · 2,435 citations
  2. Meltdown: Reading Kernel Memory from User SpaceMoritz Lipp, Michael Schwarz, Daniel Gruss, Thomas Prescher et al.USENIX Security 2018 · 1,456 citations
  3. Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order ExecutionJo Van Bulck, Marina Minkin, Ofir Weisse, Daniel Genkin et al.USENIX Security 2018 · 1,175 citations
  4. SOK: (State of) The Art of War: Offensive Techniques in Binary AnalysisYan Shoshitaishvili, Ruoyu Wang, Christopher Salls, Nick Stephens et al.S&P 2016 · 1,085 citations
  5. ZombieLoad: Cross-Privilege-Boundary Data SamplingMichael Schwarz, Moritz Lipp, Daniel Moghimi, Jo Van Bulck et al.CCS 2019 · 464 citations

Related papers

  1. Branch History Injection: On the Effectiveness of Hardware Mitigations Against Cross-Privilege Spectre-v2 AttacksEnrico Barberis, Pietro Frigo, Marius Muench, Herbert Bos et al.USENIX Security 2022
  2. Breaking the Barrier: Post-Barrier Spectre AttacksJohannes Wikner, Kaveh RazaviS&P 2025
  3. VMSCAPE: Exposing and Exploiting Incomplete Branch Predictor Isolation in Cloud EnvironmentsJean-Claude Graf, Sandro Rüegge, Ali Hajiabadi, Kaveh RazaviS&P 2026 · 4 citations
  4. Branch Privilege Injection: Compromising Spectre v2 Hardware Mitigations by Exploiting Branch Predictor Race ConditionsSandro Rüegge, Johannes Wikner, Kaveh RazaviUSENIX Security 2025
  5. Defeating Transient Execution Attacks by Limiting Secret Reachability Through Register Hiding and ShadowCFIDaniël Trujillo, Jagadish Kotra, David Kaplan, Mengjia YanS&P 2026 · 1 citation
Dusk over the sea between two cliffs drawn in fine vertical lines