arXiv:2609.01110cs.PLSep 2026

Manuscript Offprint

arXiv:2609.01110

Griotte: Verified Compartmentalisation via Capabilities

June Rousseau, Aïna Linn Georges, Jean Pichon-Pharabod, Lars Birkedal

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

JUNE ROUSSEAU, Aarhus University, Denmark

AÏNA LINN GEORGES*, Jane Street, United Kingdom

JEAN PICHON-PHARABOD, Aarhus University, Denmark

LARS BIRKEDAL, Aarhus University, Denmark

CHERIoT is a novel hardware-software co-design that leverages hardware capabilities to define a notion of compartment, in a minimalistic capability-based OS, CHERIoT RTOS. By default, compartments are isolated to limit damage in case of bugs or malicious behaviour. To allow cross-compartment communication, the OS provides a privileged component, called the switcher. The switcher provides an interface for cross-compartment calls, while enforcing isolation between compartments and guaranteeing stack safety. Together with hardware capabilities, the switcher is critical to enforce the security guarantees of the CHERIoT compartment model. The design of CHERIoT raises two questions: First, how can one formalise the informal notion of compartmentalisation that CHERIoT compartments are designed to provide? And second, given that the safety properties of CHERIoT hinge on the complementary roles of the capability machine and of the switcher, does the design of CHERIoT enforce the desired security properties?

In this paper, we introduce Griotte and Griotte OS, idealised but faithful versions of the CHERIoT machine and the CHERIoT RTOS, which we use to answer these two questions: First, we formally capture the aforementioned security guarantees in the form of a continuation-based logical relation which captures the combined behaviour of the switcher and of the capability machine. And second, we define a specification for the Griotte switcher that enforces those guarantees, and prove that the implementation meets the specification. We demonstrate Griotte on a range of key scenarios illustrating different aspects of CHERIoT, including integrity of the local state in the presence of memory sharing with unknown code. Our approach is modular: we verify compartments individually, and then compose their specifications. Together, our contributions give a solid formal foundation to the design of CHERIoT. Our results are mechanised in the Rocq Prover using the Iris separation logic framework, foundationally with respect to our operational semantics of the Griotte machine.

Additional Key Words and Phrases: capability machines, memory safety, compartmentalisation, Iris, logical relation

1 Introduction

Traditional approaches to memory safety are either coarse-grained (like virtual memory), conditional (like probabilistic hardening), expensive (like software bounds checks), or require extensive modifications to software (like safe languages). Alternatively, CHERI [31, 32] offers a lightweight yet fine-grained approach to memory safety through hardware capabilities: unforgeable tokens of authority that memory accesses use instead of integers-as-pointers. CHERI has been shown to satisfy capability monotonicity [4, 23], and to enable secure calling conventions that enforce local state encapsulation [11–15, 26–28]. However, while CHERI offers hardware capabilities as expressive primitives, it does not by itself define a specific high-level security model.

This gap is addressed by the CHERIoT Platform, a hardware-software co-design between the CHERIoT hardware architecture [1, 3] and the CHERIoT RTOS [2] that defines a model of compartments meant to enable the “vacuum-cleaner” model of software development [7], where one takes existing, untrusted software, compiles it with an off-the-shelf capability-aware compiler, and isolates it within compartments with clearly delimited privileges [19]. By default, compartments have only access to their own code and their own private memory. To enable communication

*This work was carried out while the author was affiliated with MPI-SWS, Germany.

Authors' Contact Information: June Rousseau, june.rousseau@cs.au.dk, Aarhus University, Denmark; Aïna Linn Georges, aina.georges@gmail.com, Jane Street, United Kingdom; Jean Pichon-Pharabod, jean.pichon@cs.au.dk, Aarhus University, Denmark; Lars Birkedal, birkedal@cs.au.dk, Aarhus University, Denmark.

between compartments, in CHERIoT, each compartment exposes an export table statically defining its entry points, which the other compartments can refer to through opaque and immutable imports. Compartments can dynamically invoke those entry points and perform cross-compartment calls through a privileged component of the OS, called the switcher.

The switcher plays the critical role of enforcing isolation of compartments. To implement cross-compartment calls, the switcher follows the principle of least privilege, and changes the caller's root (code, data, and stack) capabilities to those of the called compartment. This setup is meant to ensure that a buggy or malicious compartment cannot damage anything beyond what it has been explicitly given access to, either at initialisation or through arguments to the cross-compartment calls, following the principle of intentional use [22].

CHERIoT offers a precise structure of compartments and a mechanism for cross-compartment calls through the switcher, together with an informal notion of compartmentalisation [3, §2.3]. This setup raises the question of what this notion of compartmentalisation means formally, and the security role of the switcher raises the question of assurance.

In this paper, we explore these two questions in the setting of Griotte (French for sour cherries) and Griotte OS, idealised but faithful versions of CHERIoT and CHERIoT RTOS. Griotte is based on the Cerise [12–14, 25] idealised capability machine. We formally characterise several aspects of CHERIoT's compartment model: stack safety, including well-bracketed control flow (WBCF); the no-capture property that the switcher enforces by stack clearing; a novel property enabled by compartmentalisation that we call isolation of multiple untrusted domains (IMUD); and an extension of capability safety covering the novel capabilities of CHERIoT. We prove that these properties hold in Griotte, and illustrate them on a series of case studies.

Plan & Contributions. Concretely, in this paper, we describe:

  • A technical overview of our goals, and of the techniques we use to meet them (Section 2).

  • An overview of the Griotte machine, of the structure of Griotte compartments, and of the code of the Griotte switcher, and of their relation to their CHERIoT counterparts (Section 3).

  • A program logic for Griotte assembly (Section 4) and a logical relation for Griotte with support for no-capture, IMUD, and stack safety, all in the presence of CHERIoT's novel 'deep local' and 'deep immutable' capabilities (Section 5).

  • Two specifications of Griotte's switcher cross-compartment call, one for calls and returns from known to unknown code, and one from unknown to known code (Section 6), and a proof that our implementation meets these specifications. This means that our switcher is verified, and thus not trusted anymore.

  • A description of our assumptions, and how to put together our contributions to prove end-to-end theorems (Section 7).

  • A range of case studies covering key use cases, in which we prove end-to-end properties relying on capability safety, stack safety, no-capture and IMUD. We support all the relevant examples from Georges et al. [14], as well as novel examples covering the new features of Griotte (Section 8). All examples have been tested on the CHERIoT Sonata board.

The main technical contributions of this paper consist of a continuation-based logical relation that models the properties of the machine and the switcher, and the specifications for the switcher. We discuss in Section 2.4 why we believe that our approach is not restricted to CHERIoT. The resulting verification infrastructure is modular, making it possible to verify different compartments in isolation; and foundational: all examples, definitions, and proofs mechanised are in Rocq, and are available in the supplementary material.

References (16)