Lune

USENIX Security2022Top-tier venue

Branch History Injection: On the Effectiveness of Hardware Mitigations Against Cross-Privilege Spectre-v2 Attacks

Enrico Barberis, Pietro Frigo, Marius Muench, Herbert Bos, Cristiano Giuffrida

Abstract

Branch Target Injection (BTI or Spectre v2) is one of the most dangerous transient execution vulnerabilities, as it allows an attacker to abuse indirect branch mispredictions to leak sensitive information. Unfortunately, it also has proven difficult to mitigate, with vendors originally resorting to inefficient software mitigations like retpoline. Recently, efficient hardware mitigations such as Intel eIBRS and Arm CSV2 have been deployed as a replacement in production, isolating the branch target state across privilege domains. The assumption is that this is sufficient to deter practical BTI exploitation. In this paper, we challenge this belief and disclose fundamental design flaws in both Intel and Arm solutions. We introduce Branch History Injection (BHI or Spectre-BHB), a new primitive to build cross-privilege BTI attacks on systems deploying isolation-based hardware defenses. BHI builds on the observation that, while the branch target state is now isolated across privilege domains, such isolation is not extended to other branch predictor elements tracking the branch history state-ultimately re-enabling cross-privilege attacks. We further analyze the guarantees of a hypothetical isolation-based mitigation which also isolates the branch history and show that, barring a collision-free design, practical same-predictor-mode attacks are still possible. To instantiate our approach, we present end-to-end exploits leaking kernel memory from userland on Intel systems at 160 bytes/s, in spite of existing or hypothetical isolation-based mitigations. We conclude software defenses such as retpoline remain the only practical BTI mitigations in the foreseeable future and the pursuit for efficient hardware mitigations must continue.

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.

50 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

  • Automatic Detection of Speculative Execution Combinations cites Spectre Attacks: Exploiting Speculative Execution
  • Indirector: High-Precision Branch Target Injection Attacks Exploiting the Indirect Branch Predictor cites Spectre Attacks: Exploiting Speculative Execution
  • Indirector: High-Precision Branch Target Injection Attacks Exploiting the Indirect Branch Predictor cites Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution
  • Indirector: High-Precision Branch Target Injection Attacks Exploiting the Indirect Branch Predictor cites InSpectre Gadget: Inspecting the Residual Attack Surface of Cross-privilege Spectre v2
  • Indirector: High-Precision Branch Target Injection Attacks Exploiting the Indirect Branch Predictor cites Phantom: Exploiting Decoder-detectable Mispredictions
  • 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
  • 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
  • Phantom: Exploiting Decoder-detectable Mispredictions cites Spectre Attacks: Exploiting Speculative Execution
  • 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
  • SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis cites Driller: Augmenting Fuzzing Through Selective Symbolic Execution
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers50

  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. Automatic Detection of Speculative Execution CombinationsXaver Fabian, Marco Guarnieri, Marco PatrignaniCCS 2022 · 19 citations
  3. Phantom: Exploiting Decoder-detectable MispredictionsJohannes Wikner, Daniël Trujillo, Kaveh RazaviMICRO 2023 · 19 citations
  4. Indirector: High-Precision Branch Target Injection Attacks Exploiting the Indirect Branch PredictorLuyi Li, Hosein Yavarzadeh, Dean M. TullsenUSENIX Security 2024 · 18 citations
  5. iLeakage: Browser-based Timerless Speculative Execution Attacks on Apple DevicesJason Kim, Stephan van Schaik, Daniel Genkin, Yuval YaromCCS 2023 · 16 citations

Builds on18

  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. Driller: Augmenting Fuzzing Through Selective Symbolic ExecutionNick Stephens, John Grosen, Christopher Salls, Andrew Dutcher et al.NDSS 2016 · 1,021 citations

Related papers

  1. RETBLEED: Arbitrary Speculative Code Execution with Return InstructionsJohannes Wikner, Kaveh RazaviUSENIX Security 2022
  2. Training Solo: On the Limitations of Domain Isolation Against Spectre-v2 AttacksSander Wiebing, Cristiano GiuffridaS&P 2025
  3. Branch Privilege Injection: Compromising Spectre v2 Hardware Mitigations by Exploiting Branch Predictor Race ConditionsSandro Rüegge, Johannes Wikner, Kaveh RazaviUSENIX Security 2025
  4. Exploiting Inaccurate Branch History in Side-Channel AttacksYuhui Zhu, Alessandro BiondiUSENIX Security 2025
  5. LVI: Hijacking Transient Execution through Microarchitectural Load Value InjectionJo Van Bulck, Daniel Moghimi, Michael Schwarz, Moritz Lipp et al.S&P 2020 · 275 citations
Dusk over the sea between two cliffs drawn in fine vertical lines