The Correctness-Security Gap in Compiler Optimization
Authors:
- Mathias PayerMPMathias Payer
- Dawn SongDSDawn Song
- 1 May 2015
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 73-87
Abstract
There is a significant body of work devoted to testing, verifying, and certifying the correctness of optimizing compilers. The focus of such work is to determine if source code and optimized code have the same functional semantics. In this paper, we introduce the correctness-security gap, which arises when a compiler optimization preserves the functionality of but violates a security guarantee made by source code. We show with concrete code examples that several standard optimizations, which have been formally proved correct, in-habit this correctness-security gap. We analyze this gap and conclude that it arises due to techniques that model the state of the program but not the state of the underlying machine. We propose a broad research programme whose goal is to identify, understand, and mitigate the impact of security errors introduced by compiler optimizations. Our proposal includes research in testing, program analysis, theorem proving, and the development of new, accurate machine models for reasoning about the impact of compiler optimizations on security.Keywords
This publication has 28 references indexed in Scilit:
- Memory modelsCommunications of the ACM, 2010
- On the origins of bisimulation and coinductionACM Transactions on Programming Languages and Systems, 2009
- Formal Verification of a C-like Memory Model and Its Uses for Verifying Program TransformationsJournal of Automated Reasoning, 2008
- Compiler Optimization Correctness by Temporal LogicHigher-Order and Symbolic Computation, 2004
- Compiler verificationACM SIGSOFT Software Engineering Notes, 2003
- Bisimulation, modal logic and model checking gamesLogic Journal of the IGPL, 1999
- Shared memory consistency models: a tutorialComputer, 1996
- Programming for different memory consistency modelsJournal of Parallel and Distributed Computing, 1992
- Reflections on trusting trustCommunications of the ACM, 1984
- Correctness of a compiler for arithmetic expressions1967