SECOMP:分区C程序的形式化安全编译
SECOMP: Formally Secure Compilation of Compartmentalized C Programs
AI总结:
本文提出SECOMP编译器,首次为主流语言C证明类似完全抽象的安全编译准则,将未定义行为限制在遭攻陷的分区内,并通过扩展CompCert及证明工程创新实现形式化安全编译。
摘要:
C语言中的未定义行为经常导致严重的安全漏洞。一种实用的缓解方法是分区化(compartmentalization),它允许开发人员将大型程序结构化为多个互不信任的分区,并明确规定各分区的权限和交互方式。本文介绍了SECOMP,一个面向分区化C代码的编译器,它带有机器检查的证明,保证未定义行为的影响范围仅限于遇到该行为并因此被动态攻陷的分区。这些保证被形式化为针对对抗性上下文的安全性质保持性,这是一种类似于完全抽象的安全编译准则,并且这是首次为主流编程语言证明如此强的准则。为实现这一目标,我们扩展了经过验证的CompCert C编译器所使用的语言,加入只能通过跨分区接口规定的过程调用和返回进行交互的隔离分区。我们将CompCert的各个编译阶段和优化及其正确性证明适配到这种分区感知的设置中。然后,我们将编译器正确性作为一个更大规模安全编译证明的组成部分,该证明涉及多项证明工程创新,这些创新是将形式化安全编译扩展到C编译器规模所必需的。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。