Reference. Cerise: Program Verification on a Capability Machine in the Presence of Untrusted Code
A capability machine is a type of CPU allowing fine-grained privilege separation using capabilities , machine words that represent certain kinds of authority. We present a mathematical model and accompanying proof methods that can be used for formal verification of functional correctness of programs running on a capability machine, even when they invoke and are invoked by unknown (and possibly malicious) code. We use a program logic called Cerise for reasoning about known code, and an associated logical relation, for reasoning about unknown code. The logical relation formally captures the capability safety guarantees provided by the capability machine. The Cerise program logic, logical relation, and all the examples considered in the paper have been mechanized using the Iris program logic framework in the Coq proof assistant. The methodology we present underlies recent work of the authors on formal reasoning about capability machines [Georges et al. 2021 ; Skorstengaard et al. 2019a ; Van Strydonck et al. 2022 ], but was left somewhat implicit in those publications. In this paper we present a pedagogical introduction to the methodology, in a simpler setting (no exotic capabilities), and starting from minimal examples. We work our way up to new results about a heap-based calling convention and implementations of sophisticated object-capability patterns of the kind previously studied for high-level languages with object-capabilities, demonstrating that the methodology scales to such reasoning.
Cite
Cited by (1)
Cerisier: A Program Logic for Attestation in a Capability Machine rousseau-2026-cerisier
A key feature in trusted computing is attestation, which allows encapsulated components (enclaves) to prove their identity to (local or remote) distrusting components. Reasoning about software that uses the technique requires tracking how trust evolves after successful attestation. This process is security-critical and non-trivial, but no existing formal verification technique supports modular reasoning about attestation of enclaves and their clients, or proving end-to-end properties for systems combining trusted, untrusted and attested code. We contribute Cerisier, the first program logic for modular reasoning about trusted, untrusted and attested code, fully mechanized in the Iris separation logic and the Rocq Prover. We formalize a recent proposal, CHERI-TrEE, to extend capability machines with enclave primitives, as an extension to the Cerise capability machine and program logic. Our program logic comes with a universal contract for untrusted code, which captures both capability safety and local enclave attestation. Like Cerise, this universal contract is phrased in terms of a logical relation defining capabilities’ authority. We demonstrate Cerisier by proving end-to-end properties for three representative applications of trusted computing: secure outsourced computation, mutual attestation and a modeled trusted sensor component.
Cites 45 works (2 here)
With notes (2)
Iris from the ground up: A modular foundation for higher-order concurrent separation logic jung_etal_iris_ground_up_2018
Iris is a framework for higher-order concurrent separation logic, which has been implemented in the Coq proof assistant and deployed very effectively in a wide variety of verification projects. Iris was designed with the express goal of simplifying and consolidating the foundations of modern separation logics, but it has evolved over time, and the design and semantic foundations of Iris itself have yet to be fully written down and explained together properly in one place. Here, we attempt to fill this gap, presenting a reasonably complete picture of the latest version of Iris (version 3.1), from first principles and in one coherent narrative.
Interactive proofs in higher-order concurrent separation logic krebbers-2017-interactive
External (43)
- CHERIoT: Rethinking Security for Low-cost Embedded Systems (2023)
- Formalizing, Verifying and Applying ISA Security Guarantees as Universal Contracts (2023)
- VMSL: A Separation Logic for Mechanised Robust Safety of Virtual Machines Communicating above FF-A (2023)
- Proof Automation for Linearizability in Separation Logic (2023)
- CHERI-TrEE: Flexible enclaves on capability machines (2023)
- Capstone: A capability-based foundation for trustless secure memory access (2023)
- Verified Security for the Morello Capability-enhanced Prototype Arm Architecture (2022)
- Le temps des cerises: efficient temporal stack safety on capability machines using directed capabilities (2022)
- Verified symbolic execution with Kripke specification monads (and no meta-programming) (2022)
- Diaframe: automated verification of fine-grained concurrent programs in Iris (2022)
- Islaris: verification of machine code against authoritative ISA semantics (2022)
- Proving full-system security properties under multiple attacker models on capability machines (2022)
- Lecture Notes on Iris: Higher-Order Concurrent Separation Logic (2022)
- A multipurpose formal RISC-V specification (2021)
- CapablePtrs: Securely Compiling Partial Programs Using the Pointers-as-Capabilities Principle (2021)
- Efficient and provable local capability revocation using uninitialized capabilities (2021)
- RefinedC: automating the foundational verification of C code with refined ownership types (2021)
- Contextual refinement of the Michael-Scott queue (proof pearl) (2021)
- Capability Hardware Enhanced RISC Instructions: CHERI Instruction-Set Architecture (Version 8) (2021)
- Cornucopia: Temporal Safety for CHERI Heaps (2020)
- Rigorous engineering for hardware security: Formal modelling and proof in the CHERI design and implementation process (2020)
- Complete Spatial Safety for C and C++ Using CHERI Capabilities (2020)
- ISA semantics for ARMv8-a, RISC-v, and CHERI-MIPS (2019)
- The high-level benefits of low-level sandboxing (2019)
- StkTokens: enforcing well-bracketed control flow and stack encapsulation using linear capabilities (2019)
- Linear capabilities for fully abstract compilation of separation-logic-verified code (2019)
- CHERI Concentrate: Practical Compressed Capabilities (2019)
- CHERIvoke: Characterising Pointer Revocation using CHERI Capabilities for Temporal Memory Safety (2019)
- Reasoning about a Machine with Local Capabilities: Provably Safe Stack and Return Pointer Management (2019)
- Reasoning About a Machine with Local Capabilities (2018)
- CHERI JNI: Sinking the Java Security Model into the C-language Run-time (2017)
- RustBelt: securing the foundations of the Rust programming language (2017)
- Hardware-Based Trusted Computing Architectures for Isolation and Attestation (2017)
- Robust and compositional verification of object capability patterns (2017)
- Reasoning about Object Capabilities with Logical Relations and Effect Parametricity (2016)
- Fast Protection-Domain Crossing in the CHERI Capability-System Architecture (2016)
- The impact of higher-order state and control effects on local relational reasoning (2012)
- A bisimulation for dynamic sealing (2004)
- A fully abstract game semantics for general references (1998)
- Hardware support for fast capability-based addressing (1994)
- Compiling with Continuations (1992)
- Capability-Based Computer Systems (1984)
- Programming semantics for multiprogrammed computations (1966)