SECOMP: Formally Secure Compilation of Compartmentalized C Programs
Authors:
- Jérémy ThibaultJTJérémy Thibault
- Roberto BlancoRBRoberto Blanco
- Dongjae LeeDLDongjae Lee
- Sven ArgoSASven Argo
- Arthur Azevedo de AmorimAAArthur Azevedo de Amorim
- Aïna Linn GeorgesAGAïna Linn Georges
- Catalin HritcuCHCatalin Hritcu
- Andrew TolmachATAndrew Tolmach
Preprint
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
This publication has 72 references indexed in Scilit:
- Verified Security for the Morello Capability-enhanced Prototype Arm Architecture2022
- The Trusted Computing Base of the CompCert Verified Compiler2022
- Two Mechanisations of WebAssembly 1.02021
- Compiling Sandboxes: Formally Verified Software Fault Isolation2019
- Verified Compilation for Shared-Memory C2014
- 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
- Secure Implementation of Channel AbstractionsInformation and Computation, 2002
- Formal foundation for specification and verificationLecture Notes in Computer Science, 1985
- Determinancy → (observation equivalence = trace equivalence)Theoretical Computer Science, 1985