Lune

USENIX Security2023Top-tier venue

Ultimate SLH: Taking Speculative Load Hardening to the Next Level

Zhiyuan Zhang, Gilles Barthe, Chitchanok Chuengsatiansup, Peter Schwabe, Yuval Yarom

Abstract

In this paper we revisit the Spectre v1 vulnerability and software-only countermeasures. Specifically, we systematically investigate the performance penalty and security properties of multiple variants of speculative load hardening (SLH). As part of this investigation we implement the "strong SLH" variant by Patrignani and Guarnieri (CCS 2021) as a compiler extension to LLVM. We show that none of the existing variants, including strong SLH, is able to protect against all Spectre v1 attacks in practice. We do this by demonstrating, for the first time, that variable-time arithmetic instructions leak secret information even if they are executed only speculatively. We extend strong SLH to include protections also against this kind of leakage, implement the resulting full protection in LLVM, and use the SPEC2017 benchmarks to compare its performance to the existing variants of SLH and to code that uses fencing instructions to completely prevent speculative execution. We show that our proposed countermeasure offers full protection against Spectre v1 attacks at much better performance than code using fences. In fact, for several benchmarks our approach is more than twice as fast.

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.

18 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

  • SNIP: Speculative Execution and Non-Interference Preservation for Compiler Transformations cites Spectre Attacks: Exploiting Speculative Execution
  • SNIP: Speculative Execution and Non-Interference Preservation for Compiler Transformations cites Meltdown: Reading Kernel Memory from User Space
  • SNIP: Speculative Execution and Non-Interference Preservation for Compiler Transformations cites Preservation of Speculative Constant-Time by Compilation
  • Preservation of Speculative Constant-Time by Compilation cites SNIP: Speculative Execution and Non-Interference Preservation for Compiler Transformations
  • 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
  • RTL2MμPATH: Multi-μPATH Synthesis with Applications to Hardware Security Verification cites Spectre Attacks: Exploiting Speculative Execution
  • RTL2MμPATH: Multi-μPATH Synthesis with Applications to Hardware Security Verification cites Serberus: Protecting Cryptographic Code from Spectres at Compile-Time
  • Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution cites Spectre Attacks: Exploiting Speculative Execution
  • 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 RIDL: Rogue In-Flight Data Load
  • 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
  • Preservation of Speculative Constant-Time by Compilation cites Spectre Attacks: Exploiting Speculative Execution
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers18

  1. Serberus: Protecting Cryptographic Code from Spectres at Compile-TimeNicholas Mosier, Hamed Nemati, John C. Mitchell, Caroline TrippelS&P 2024 · 16 citations
  2. Leaky Address Masking: Exploiting Unmasked Spectre Gadgets with Noncanonical Address TranslationMathé Hertogh, Sander Wiebing, Cristiano GiuffridaS&P 2024 · 15 citations
  3. RTL2MμPATH: Multi-μPATH Synthesis with Applications to Hardware Security VerificationYao Hsiao, Nikos Nikoleris, Artem Khyzha, Dominic P. Mulligan et al.MICRO 2024 · 12 citations
  4. Preservation of Speculative Constant-Time by CompilationSantiago Arranz-Olmos, Gilles Barthe, Lionel Blatter, Benjamin Grégoire et al.POPL 2025 · 8 citations
  5. SNIP: Speculative Execution and Non-Interference Preservation for Compiler TransformationsSören van der Wall, Roland MeyerPOPL 2025 · 7 citations

Builds on50

  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. dfence: Fine-Grained Speculation Barriers for Efficient and Effective Hardware-Software Protection in the Spectre EraDavide Davoli, Marton Bognar, Lesly-Ann Daniel, Benjamin Gregoire et al.CCS 2026 · 1 citation
  2. Exorcising Spectres with Secure CompilersMarco Patrignani, Marco GuarnieriCCS 2021 · 5 citations
  3. An Analysis of Speculative Type Confusion Vulnerabilities in the WildOfek Kirzner, Adam MorrisonUSENIX Security 2021 · 40 citations
  4. Place Protections at the Right Place: Targeted Hardening for Cryptographic Code against Spectre v1Yiming Zhu, Wenchao Huang, Yan XiongUSENIX Security 2025
  5. Spectre Declassified: Reading from the Right Place at the Wrong TimeBasavesh Ammanaghatta Shivakumar, Jack Barnes, Gilles Barthe, Sunjay Cauligi et al.S&P 2023
Dusk over the sea between two cliffs drawn in fine vertical lines