arXiv:2609.11590cs.ARSep 2026

Manuscript Offprint

arXiv:2609.11590

CHERI-D Reincarnate: efficient multicore CHERI temporal memory safety through allocation reincarnation (draft version)

Yuecheng Wang, Jonathan Woodruff, Simon W. Moore

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

Abstract

We propose CHERI-D Reincarnate (Reinc), an architectural extension to CHERI for scalable and efficient temporal memory safety. Prior work CHERI-D has a finite-width generation ID stored at a fixed location, requiring an object to be quarantined when its ID is exhausted. Reinc further provides use-after-free mitigation while permitting immediate freed memory reuse for objects through allocation reincarnation: rather than quarantining an allocation slot upon ID exhaustion, Reinc dynamically assigns a new ID to that slot when its current ID is exhausted. Exhausted IDs are quarantined and later reclaimed, while the underlying memory remains available for immediate reuse. By quarantining IDs rather than memory, Reinc enables continuous reuse of memory in the common case, substantially reducing both memory-sweep frequency and quarantine memory overhead.

Reinc further introduces coherent ID caching while retaining a fully decentralized ID organization. Temporal metadata remains colocated with the memory it protects, preserving locality while avoiding centralized metadata structures. To support multicore execution, Reinc connects physical coherence events to the virtually addressed ObjID buffer using lightweight reverse-map and filter-based mechanisms.

We implement Reinc as a hardware-software co-design spanning CHERI-Toooba (superscalar FPGA softcore), QEMU, LLVM/Clang and CheriBSD [6–8, 16]. Across our evaluated workloads, Reinc substantially reduces memory-sweep frequency and memory quarantine while incurring low performance and hardware overhead.

1 Introduction

CHERI provides fine-grained spatial memory safety by replacing conventional pointers with hardware-protected capabilities carrying bounds, permissions, and provenance [22]. Temporal safety remains more challenging: capabilities can be freely copied and may remain reachable after the lifetime of the allocation they reference has ended.

The deployed CHERI temporal safety solution, Cornucopia Reloaded [11], employs a software-based approach that delays reallocation until a sweep of the address space has revoked dangling heap capabilities. Unfortunately, memory quarantining can significantly affect allocator optimization, memory footprint, and cache efficiency [20, 23]. When added to the cost of revocation sweeps, overall system performance and resource usage can be prohibitively impacted.

Recent work, including Picasso[12] and CHERI-D (pronounced, "cherry-dee"), has demonstrated support for stronger temporal safety guarantees at much greater efficiency [21]. Picasso tracks object validity in a global bit-vector table indexed by a large object ID field in each capability, and CHERI-D places an 8-bit generation ID in line with allocations that are smaller than one page. Both provide temporal guarantees by checking metadata on memory access; capabilities pointing to freed objects are instantly revoked by clearing the validity bit (Picasso) or incrementing the object ID (CHERI-D).

CHERI-D has several advantages over Picasso; placing IDs inline with allocation data makes the approach more scalable, and counters use metadata memory more efficiently than bit vectors. However, we see several opportunities for CHERI-D to be improved. While CHERI-D allowed expressing a range of ID locations, it associated IDs statically with allocation slots, unnecessarily forcing memory to be quarantined upon ID exhaustion. In addition, CHERI-D only supported objects of less than 4 KiB; while small objects are by far the most common, large objects disproportionately contribute to quarantine wastage and dominate many applications [21]. Finally, both Picasso and CHERI-D have been evaluated only under a single-core setup due to the complexity of synchronizing the virtually addressed metadata buffer across multiple cores.

We propose CHERI-D Reincarnate (Reinc), an architectural extension to CHERI and a hardware-software co-design for supporting temporal safety for application-class multicore systems and long-running, allocation-intensive workloads. The key observation behind Reinc is that exhausting an identity need not exhaust the memory it protects. Instead, Reinc quarantines the exhausted ID and reincarnates the allocation slot under another available ID, allowing the underlying memory to remain immediately reusable. Quarantined IDs can subsequently be reclaimed after a memory sweep that invalidates outstanding capabilities carrying those IDs. If reclamation completes before all available ID locations have been exhausted, the memory itself never needs to enter quarantine.

Reinc further extends ID-based temporal protection from 4 KiB to 1 GiB and addresses the multicore coherence problem introduced by private ObjID buffers. It keeps cached ObjIDs coherent across cores using lightweight mechanisms that reuse existing cache-coherence invalidation and L1-replacement events.

Our evaluation shows that Reinc incurs average runtime overheads of 1.7% for SPEC CPU2006 INT, 0.7% for SQLite, and 0.3% for PARSEC, while substantially reducing sweeping and memory quarantine overhead; for example, the SQLite benchmark requires no memory sweeps under Reinc, compared with 267 under Cornucopia Reloaded.

In this work, we make the following contributions:

  • We introduce allocation reincarnation and ID quarantine and reclamation, decoupling ID exhaustion from memory quarantine by reclaiming exhausted IDs independently of their underlying allocations.

  • We extend ID-based temporal protection to objects up to 1 GiB and design two lightweight coherence mechanisms for synchronizing private ObjID buffers across cores using existing cache-coherence and L1-replacement events.

  • We implement Reinc as a complete hardware-software co-design spanning CHERI-Toooba, QEMU, LLVM/Clang, CheriBSD, MRS, and jemalloc, demonstrating strict UAF mitigation with immediate memory reuse on a multicore CHERI system.

  • We evaluate Reinc using SPEC CPU2006 INT, PARSEC, SQLite, NIST Juliet, and MSET, demonstrating strict UAF mitigation while substantially reducing memory-sweep frequency and memory quarantine.

References (12)