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 about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 4136b537-732f-4b74-8158-7b3a055db94cCited 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
- 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
- Interplay of Efficient Model Checking and Secure Processor Design: A Case Study on Secure SpeculationTingzhen Dong, Qinhan Tan, Kunpeng Wang, Thomas Bourgeat et al.S&P 2026
