SNIP: Speculative Execution and Non-Interference Preservation for Compiler Transformations
Sören van der Wall, Roland Meyer
Abstract
We address the problem of preserving non-interference across compiler transformations under speculative semantics . We develop a proof method that ensures the preservation uniformly across all source programs. The basis of our proof method is a new form of simulation relation. It operates over directives that model the attacker’s control over the micro-architectural state, and it accounts for the fact that the compiler transformation may change the influence of the micro-architectural state on the execution (and hence the directives). Using our proof method, we show the correctness of dead code elimination. When we tried to prove register allocation correct, we identified a previously unknown weakness that introduces violations to non-interference. We have confirmed the weakness for a mainstream compiler on code from the libsodium cryptographic library. To reclaim security once more, we develop a novel static analysis that operates on a product of source program and register-allocated program. Using the analysis, we present an automated fix to existing register allocation implementations. We prove the correctness of the fixed register allocations with our proof method.
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.
7 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
- Non-interference Preserving Optimising Compilation cites Preservation of Speculative Constant-Time by Compilation
- Spectector: Principled Detection of Speculative Information Flows cites Spectre Attacks: Exploiting Speculative Execution
- Smooth, Integrated Proofs of Cryptographic Constant Time for Nondeterministic Programs and Compilers cites Spectre Attacks: Exploiting Speculative Execution
- Smooth, Integrated Proofs of Cryptographic Constant Time for Nondeterministic Programs and Compilers cites Preservation of Speculative Constant-Time by Compilation
- Decompiling for Constant-Time Analysis cites Spectre Attacks: Exploiting Speculative Execution
- Decompiling for Constant-Time Analysis cites Spectector: Principled Detection of Speculative Information Flows
- Decompiling for Constant-Time Analysis cites SoK: Computer-Aided Cryptography
- Decompiling for Constant-Time Analysis cites Hardware-Software Contracts for Secure Speculation
- Decompiling for Constant-Time Analysis cites Preservation of Speculative Constant-Time by Compilation
- SoK: Computer-Aided Cryptography cites Spectre Attacks: Exploiting Speculative Execution
- SoK: Computer-Aided Cryptography cites Meltdown: Reading Kernel Memory from User Space
- KEM-IND-CCA-Preserving Compilation of Jasmin's ML-KEM cites Smooth, Integrated Proofs of Cryptographic Constant Time for Nondeterministic Programs and Compilers
- KEM-IND-CCA-Preserving Compilation of Jasmin's ML-KEM cites SoK: Computer-Aided Cryptography
- KEM-IND-CCA-Preserving Compilation of Jasmin's ML-KEM cites Hardware-Software Contracts for Secure Speculation
- KEM-IND-CCA-Preserving Compilation of Jasmin's ML-KEM cites Preservation of Speculative Constant-Time by Compilation
- Hardware-Software Contracts for Secure Speculation cites Spectre Attacks: Exploiting Speculative Execution
- Hardware-Software Contracts for Secure Speculation cites Spectector: Principled Detection of Speculative Information Flows
- Hardware-Software Contracts for Secure Speculation cites Meltdown: Reading Kernel Memory from User Space
- Meltdown: Reading Kernel Memory from User Space cites Spectre Attacks: Exploiting Speculative Execution
- Preservation of Speculative Constant-Time by Compilation cites Spectre Attacks: Exploiting Speculative Execution
- Preservation of Speculative Constant-Time by Compilation cites Spectector: Principled Detection of Speculative Information Flows
- Preservation of Speculative Constant-Time by Compilation cites SoK: Computer-Aided Cryptography
Cited by top-tier papers7
- Preservation of Speculative Constant-Time by CompilationSantiago Arranz-Olmos, Gilles Barthe, Lionel Blatter, Benjamin Grégoire et al.POPL 2025 · 8 citations
- Non-interference Preserving Optimising CompilationJulian Rosemann, Sebastian Hack, Deepak GargOOPSLA 2025 · 1 citation
- Smooth, Integrated Proofs of Cryptographic Constant Time for Nondeterministic Programs and CompilersOwen Conoly, Andres Erbsen, Adam ChlipalaPLDI 2025 · 1 citation
- Decompiling for Constant-Time AnalysisSantiago Arranz-Olmos, Gilles Barthe, Lionel Blatter, Youcef Bouzid et al.OOPSLA 2026 · 1 citation
- KEM-IND-CCA-Preserving Compilation of Jasmin's ML-KEMSantiago Arranz-Olmos, Gilles Barthe, Lionel Blatter, Benjamin Gregoire et al.CCS 2026 · 1 citation
Builds on19
- Spectre Attacks: Exploiting Speculative ExecutionPaul Kocher, Jann Horn, Anders Fogh, Daniel Genkin et al.S&P 2019 · 2,435 citations
- Meltdown: Reading Kernel Memory from User SpaceMoritz Lipp, Michael Schwarz, Daniel Gruss, Thomas Prescher et al.USENIX Security 2018 · 1,456 citations
- Spectector: Principled Detection of Speculative Information FlowsMarco Guarnieri, Boris Köpf, José F. Morales, Jan Reineke et al.S&P 2020 · 177 citations
- SoK: Computer-Aided CryptographyManuel Barbosa, Gilles Barthe, Karthik Bhargavan, Bruno Blanchet et al.S&P 2021 · 169 citations
- Hardware-Software Contracts for Secure SpeculationMarco Guarnieri, Boris Köpf, Jan Reineke, Pepe VilaS&P 2021 · 111 citations
Related papers
- Compiling with Abstract InterpretationDorian Lesbre, Matthieu LemerrePLDI 2024 · 6 citations
- SpecSafe: detecting cache side channels in a speculative worldRobert Brotzman, Danfeng Zhang, Mahmut Taylan Kandemir, Gang TanOOPSLA 2021 · 3 citations
- Automatically eliminating speculative leaks from cryptographic code with bladeMarco Vassena, Craig Disselkoen, Klaus von Gleissenthall, Sunjay Cauligi et al.POPL 2021 · 53 citations
- ProSpeCT: Provably Secure Speculation for the Constant-Time PolicyLesly-Ann Daniel, Marton Bognar, Job Noorman, Sébastien Bardin 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
