Lune

USENIX Security2021Top-tier venue

An Analysis of Speculative Type Confusion Vulnerabilities in the Wild

Ofek Kirzner, Adam Morrison

Abstract

Spectre v1 attacks, which exploit conditional branch misprediction, are often identified with attacks that bypass array bounds checking to leak data from a victim's memory. Generally, however, Spectre v1 attacks can exploit any conditional branch misprediction that makes the victim execute code incorrectly. In this paper, we investigate speculative type confusion, a Spectre v1 attack vector in which branch mispredictions make the victim execute with variables holding values of the wrong type and thereby leak memory content. We observe that speculative type confusion can be inadvertently introduced by a compiler, making it extremely hard for programmers to reason about security and manually apply Spectre mitigations. We thus set out to determine the extent to which speculative type confusion affects the Linux kernel. Our analysis finds exploitable and potentially-exploitable arbitrary memory disclosure vulnerabilities. We also find many latent vulnerabilities, which could become exploitable due to innocuous system changes, such as coding style changes. Our results suggest that Spectre mitigations which rely on statically/manually identifying"bad"code patterns need to be rethought, and more comprehensive mitigations are needed.

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.

26 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

  • EPF: Evil Packet Filter cites Spectre Attacks: Exploiting Speculative Execution
  • ZombieLoad: Cross-Privilege-Boundary Data Sampling cites Spectre Attacks: Exploiting Speculative Execution
  • RIDL: Rogue In-Flight Data Load cites Spectre Attacks: Exploiting Speculative Execution
  • RIDL: Rogue In-Flight Data Load cites Meltdown: Reading Kernel Memory from User Space
  • RIDL: Rogue In-Flight Data Load cites Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution
  • Leaky Address Masking: Exploiting Unmasked Spectre Gadgets with Noncanonical Address Translation cites Spectre Attacks: Exploiting Speculative Execution
  • Leaky Address Masking: Exploiting Unmasked Spectre Gadgets with Noncanonical Address Translation cites ZombieLoad: Cross-Privilege-Boundary Data Sampling
  • Leaky Address Masking: Exploiting Unmasked Spectre Gadgets with Noncanonical Address Translation cites RIDL: Rogue In-Flight Data Load
  • Leaky Address Masking: Exploiting Unmasked Spectre Gadgets with Noncanonical Address Translation cites Meltdown: Reading Kernel Memory from User Space
  • Leaky Address Masking: Exploiting Unmasked Spectre Gadgets with Noncanonical Address Translation cites Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution
  • Meltdown: Reading Kernel Memory from User Space cites Spectre Attacks: Exploiting Speculative Execution
  • Spook.js: Attacking Chrome Strict Site Isolation via Speculative Execution cites Spectre Attacks: Exploiting Speculative Execution
  • Spook.js: Attacking Chrome Strict Site Isolation via Speculative Execution cites ZombieLoad: Cross-Privilege-Boundary Data Sampling
  • Spook.js: Attacking Chrome Strict Site Isolation via Speculative Execution cites RIDL: Rogue In-Flight Data Load
  • Spook.js: Attacking Chrome Strict Site Isolation via Speculative Execution cites Meltdown: Reading Kernel Memory from User Space
  • Spook.js: Attacking Chrome Strict Site Isolation via Speculative Execution cites Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution
  • Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution cites Spectre Attacks: Exploiting Speculative Execution
  • SoK: Practical Foundations for Software Spectre Defenses cites Spectre Attacks: Exploiting Speculative Execution
  • SoK: Practical Foundations for Software Spectre Defenses cites ZombieLoad: Cross-Privilege-Boundary Data Sampling
  • SoK: Practical Foundations for Software Spectre Defenses cites Meltdown: Reading Kernel Memory from User Space
  • SoK: Practical Foundations for Software Spectre Defenses 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 papers26

  1. SoK: Practical Foundations for Software Spectre DefensesSunjay Cauligi, Craig Disselkoen, Daniel Moghimi, Gilles Barthe et al.S&P 2022 · 59 citations
  2. Spook.js: Attacking Chrome Strict Site Isolation via Speculative ExecutionAyush Agarwal, Sioli O'Connell, Jason Kim, Shaked Yehezkel et al.S&P 2022 · 32 citations
  3. iLeakage: Browser-based Timerless Speculative Execution Attacks on Apple DevicesJason Kim, Stephan van Schaik, Daniel Genkin, Yuval YaromCCS 2023 · 16 citations
  4. Leaky Address Masking: Exploiting Unmasked Spectre Gadgets with Noncanonical Address TranslationMathé Hertogh, Sander Wiebing, Cristiano GiuffridaS&P 2024 · 15 citations
  5. EPF: Evil Packet FilterDi Jin, Vaggelis Atlidakis, Vasileios P. KemerlisUSENIX ATC 2023 · 14 citations

Builds on22

  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. ZombieLoad: Cross-Privilege-Boundary Data SamplingMichael Schwarz, Moritz Lipp, Daniel Moghimi, Jo Van Bulck et al.CCS 2019 · 464 citations
  5. RIDL: Rogue In-Flight Data LoadStephan van Schaik, Alyssa Milburn, Sebastian Österlund, Pietro Frigo et al.S&P 2019 · 408 citations

Related papers

  1. Speculative Probing: Hacking Blind in the Spectre EraEnes Göktas, Kaveh Razavi, Georgios Portokalidis, Herbert Bos et al.CCS 2020 · 36 citations
  2. Spectre on RISC-V Silicon: Attacks and Defenses on Commercial Out-of-Order ProcessorsLukas Gerlach, Marton Bognar, Daniel Weber, Michael Schwarz et al.USENIX Security 2026
  3. SpecFuzz: Bringing Spectre-type vulnerabilities to the surfaceOleksii Oleksenko, Bohdan Trach, Mark Silberstein, Christof FetzerUSENIX Security 2020
  4. VMSCAPE: Exposing and Exploiting Incomplete Branch Predictor Isolation in Cloud EnvironmentsJean-Claude Graf, Sandro Rüegge, Ali Hajiabadi, Kaveh RazaviS&P 2026 · 4 citations
  5. RETBLEED: Arbitrary Speculative Code Execution with Return InstructionsJohannes Wikner, Kaveh RazaviUSENIX Security 2022
Dusk over the sea between two cliffs drawn in fine vertical lines