Endangered by the Language But Saved by the Compiler: Robust Safety via Semantic Back-Translation
Niklas Mück, Aïna Linn Georges, Derek Dreyer, Deepak Garg, Michael Sammler
Abstract
It is common for programmers to assemble their programs from a combination of trusted and untrusted components. In this context, a trusted program component is said to be robustly safe if it behaves safely when linked against arbitrary untrusted code. Prior work has shown how various encapsulation mechanisms (in both high- and low-level languages) can be used to protect code so that it is robustly safe, but none of the existing work has explored how robust safety can be achieved in a patently unsafe language like C. In this paper, we show how to bring robust safety to a simple yet representative C-like language we call Rec . Although Rec (like C) is inherently “dangerous” and thus not robustly safe, we can “save” Rec programs via compilation to Cap , a CHERI-like capability machine . To formalize the benefits of such a hardening compiler , we develop Reckon, a separation logic for verifying robust safety of Rec programs. Reckon is not sound under Rec ’s unsafe, C-like semantics, but it is sound when Rec programs are hardened via compilation and linked against untrusted code running on Cap . As a crucial step in proving soundness of Reckon, we introduce a novel technique of semantic back-translation , which we formalize by building on the DimSum framework for multi-language semantics. All our results are mechanized in the Rocq prover.
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.
Builds on17
- Interaction trees: representing recursive and impure programs in CoqLi-yao Xia, Yannick Zakowski, Paul He, Chung-Kil Hur et al.POPL 2020 · 133 citations
- CompCertM: CompCert with C-assembly linking and lightweight modular verificationYoungju Song, Minki Cho, Dongjoo Kim, Yonghyun Kim et al.POPL 2020 · 49 citations
- When Good Components Go Bad: Formally Secure Compilation Despite Dynamic CompromiseCarmine Abate, Arthur Azevedo de Amorim, Roberto Blanco, Ana Nora Evans et al.CCS 2018 · 43 citations
- Simuliris: a separation logic framework for verifying concurrent program optimizationsLennard Gäher, Michael Sammler, Simon Spies, Ralf Jung et al.POPL 2022 · 33 citations
- Transfinite Iris: resolving an existential dilemma of step-indexed separation logicSimon Spies, Lennard Gäher, Daniel Gratzer, Joseph Tassarotti et al.PLDI 2021 · 32 citations
Related papers
- The high-level benefits of low-level sandboxingMichael Sammler, Deepak Garg, Derek Dreyer, Tadeusz LitakPOPL 2020 · 26 citations
- Cerisier: A Program Logic for Attestation in a Capability MachineJune Rousseau, Denis Carnier, Thomas Van Strydonck, Steven Keuchel et al.PLDI 2026
- Efficient and provable local capability revocation using uninitialized capabilitiesAïna Linn Georges, Armaël Guéneau, Thomas Van Strydonck, Amin Timany et al.POPL 2021 · 30 citations
- Le temps des cerises: efficient temporal stack safety on capability machines using directed capabilitiesAïna Linn Georges, Alix Trieu, Lars BirkedalOOPSLA 2022 · 17 citations
- Reasoning about External CallsSophia Drossopoulou, Julian Mackay, Susan Eisenbach, James NobleOOPSLA 2025
