SECOMP: Formally Secure Compilation of Compartmentalized C Programs
Open Access
- 2 December 2024
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 1061-1075
Abstract
Undefined behavior in C often causes devastating security vulnerabilities. One practical mitigation is compartmentalization, which allows developers to structure large programs into mutually distrustful compartments with clearly specified privileges and interactions. In this paper we introduce SECOMP, a compiler for compartmentalized C code that comes with machine-checked proofs guaranteeing that the scope of undefined behavior is restricted to the compartments that encounter it and become dynamically compromised. These guarantees are formalized as the preservation of safety properties against adversarial contexts, a secure compilation criterion similar to full abstraction, and this is the first time such a strong criterion is proven for a mainstream programming language. To achieve this we extend the languages of the CompCert verified C compiler with isolated compartments that can only interact via procedure calls and returns, as specified by cross-compartment interfaces. We adapt the passes and optimizations of CompCert as well as their correctness proofs to this compartment-aware setting. We then use compiler correctness as an ingredient in a larger secure compilation proof that involves several proof engineering novelties, needed to scale formally secure compilation up to a C compiler.Keywords
All Related Versions
Funding Information
- Deutsche Forschungsgemeinschaft (EXC 2092 CASA - 390781972)
- European Commission (101070374)
- NSF (National Science Foundation) (2048499)
- European Research Council (Starting Grant SECOMP (715753))
This publication has 56 references indexed in Scilit:
- SecurePtrs: Proving Secure Compilation with Data-Flow Back-Translation and Turn-Taking Simulation2022
- Information-Flow Preservation in Compiler Optimisations2019
- Journey Beyond Full Abstraction: Exploring Robust Property Preservation for Secure Compilation2019
- Compiling Sandboxes: Formally Verified Software Fault Isolation2019
- ARMor2011
- Native ClientCommunications of the ACM, 2010
- A Formally Verified Compiler Back-endJournal of Automated Reasoning, 2009
- Formal Verification of a C-like Memory Model and Its Uses for Verifying Program TransformationsJournal of Automated Reasoning, 2008
- Efficient software-based fault isolation1993
- Determinancy → (observation equivalence = trace equivalence)Theoretical Computer Science, 1985