USENIX Security2025Top-tier venue
Place Protections at the Right Place: Targeted Hardening for Cryptographic Code against Spectre v1
Yiming Zhu, Wenchao Huang, Yan Xiong
Abstract
Spectre v1 attacks pose a substantial threat to security-critical software, particularly cryptographic implementations. Existing software mitigations, however, often introduce excessive overhead by indiscriminately hardening instructions without assessing their vulnerability. We propose an analysis framework that employs a novel fixpoint algorithm to detect Spectre vulnerabilities and apply targeted hardening. The fixpoint algorithm accounts for program behavior changes induced by stepwise hardening, enabling precise, sound and efficient vulnerability detection. This framework also provides flexibility for diverse hardening strategies and attacker models, enabling customized targeted hardening. We instantiate the framework as LightSLH, which hardens program with provable security. We evaluate LightSLH on cryptographic algorithms from OpenSSL, Libsodium, NaCL and PQClean. Across all experimental cases, LightSLH provides the lowest overhead among current provable protection strategies, including 0% overhead in 50% cases. Notably, the analysis of LightSLH reveals two previously unknown security issues: (1) The compiler can introduce risks overlooked by LLSCT, a hardening method proven secure at the LLVM IR level. We successfully construct a side channel by exploiting compiler-inserted stack loads, confirming this risk. (2) Memory access patterns generated by the scatter-gather algorithm still depend on secrets, even for observers with cache line granularity. These findings and results highlight the importance of applying accurate protections to specific instructions.
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.
2 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Spectre on RISC-V Silicon: Attacks and Defenses on Commercial Out-of-Order Processors cites Spectre Attacks: Exploiting Speculative Execution
- Spectre on RISC-V Silicon: Attacks and Defenses on Commercial Out-of-Order Processors cites Spectector: Principled Detection of Speculative Information Flows
- Spectre on RISC-V Silicon: Attacks and Defenses on Commercial Out-of-Order Processors cites ret2spec: Speculative Execution Using Return Stack Buffers
- Spectector: Principled Detection of Speculative Information Flows cites Spectre Attacks: Exploiting Speculative Execution
- Spectector: Principled Detection of Speculative Information Flows cites ret2spec: Speculative Execution Using Return Stack Buffers
- Spectector: Principled Detection of Speculative Information Flows cites Verifying Constant-Time Implementations
- ret2spec: Speculative Execution Using Return Stack Buffers cites Spectre Attacks: Exploiting Speculative Execution
- Jasmin: High-Assurance and High-Speed Cryptography cites Verifying Constant-Time Implementations
- (Dis)Proving Spectre Security with Speculation-Passing Style cites Spectre Attacks: Exploiting Speculative Execution
- (Dis)Proving Spectre Security with Speculation-Passing Style cites Spectector: Principled Detection of Speculative Information Flows
- (Dis)Proving Spectre Security with Speculation-Passing Style cites ret2spec: Speculative Execution Using Return Stack Buffers
- (Dis)Proving Spectre Security with Speculation-Passing Style cites Verifying Constant-Time Implementations
Cited by top-tier papers2
- 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
- (Dis)Proving Spectre Security with Speculation-Passing StyleSantiago Arranz-Olmos, Gilles Barthe, Lionel Blatter, Xingyu Xie et al.OOPSLA 2026
Builds on28
- Spectre Attacks: Exploiting Speculative ExecutionPaul Kocher, Jann Horn, Anders Fogh, Daniel Genkin et al.S&P 2019 · 2,435 citations
- ret2spec: Speculative Execution Using Return Stack BuffersGiorgi Maisuradze, Christian RossowCCS 2018 · 282 citations
- Verifying Constant-Time ImplementationsJosé Bacelar Almeida, Manuel Barbosa, Gilles Barthe, François Dupressoir et al.USENIX Security 2016 · 274 citations
- Spectector: Principled Detection of Speculative Information FlowsMarco Guarnieri, Boris Köpf, José F. Morales, Jan Reineke et al.S&P 2020 · 177 citations
- Jasmin: High-Assurance and High-Speed CryptographyJosé Bacelar Almeida, Manuel Barbosa, Gilles Barthe, Arthur Blot et al.CCS 2017 · 157 citations
Related papers
- Serberus: Protecting Cryptographic Code from Spectres at Compile-TimeNicholas Mosier, Hamed Nemati, John C. Mitchell, Caroline TrippelS&P 2024 · 16 citations
- Ultimate SLH: Taking Speculative Load Hardening to the Next LevelZhiyuan Zhang, Gilles Barthe, Chitchanok Chuengsatiansup, Peter Schwabe et al.USENIX Security 2023
- Hunting the Haunter - Efficient Relational Symbolic Execution for Spectre with Haunted RelSELesly-Ann Daniel, Sébastien Bardin, Tamara RezkNDSS 2021
- Exorcising Spectres with Secure CompilersMarco Patrignani, Marco GuarnieriCCS 2021 · 5 citations
- SoK: Practical Foundations for Software Spectre DefensesSunjay Cauligi, Craig Disselkoen, Daniel Moghimi, Gilles Barthe et al.S&P 2022 · 59 citations
