CHERI-D: Secure and efficient inline object ID for CHERI temporal memory safety
Listen
Radio episode about this paper
Transcript
Introduction to the show: ident: Security Radio. Generated commentary on the latest security and cryptography papers.
Nadia: We're looking at the paper: "CHERI-D: Secure and efficient inline object ID for CHERI temporal memory safety".
Elias: The gist: CHERI-D proposes an architectural extension to CHERI that supports efficient temporal memory safety by associating object identification (ID) metadata with capability pointers to provide temporal integrity of allocations.
Nadia: First, who's behind it and why it matters.
Paper summary: Nadia: So looking at "CHERI-D: Secure and efficient inline object ID for CHERI temporal memory safety," what we’re seeing is a solid architectural extension to CHERI that addresses the lack of intrinsic temporal memory safety support. Elias It focuses on associating object identification metadata with capability pointers to give us temporal integrity for allocations.
Priya: The main thing they’re claiming is that this approach allows reclaimed memory to be promptly returned to the allocator without exposing newly allocated objects to dangling pointers <ref:2606.19055#pg2>.
Nadia: That immediate reuse capability, combined with the ability to support up to two hundred fifty-four generations of reallocations, really makes a difference in how we manage memory at runtime <ref:2606.19055#pg2>.
Elias: And they also showed that this design substantially reduces revocation overhead compared to older software solutions, with the number of sweeps dropping significantly when tested on SPEC CPU2006 INT workloads eleven <ref:2606.19055#pg2>.
Priya: So for someone just listening, this paper suggests that we can build memory safety features directly into the hardware architecture without needing those heavy software garbage collectors to manage lifetimes fifteen <ref:2606.19055#pg3>.
Nadia: The authors of "CHERI-D: Secure and efficient inline object ID for CHERI temporal memory safety" are working on making scalable support for larger IDs possible, which was a challenge in previous tagging schemes <ref:2606.19055#pg2>.
Elias: They're showing that this method can substantially reduce both execution-time and memory system overhead by enabling immediate memory reuse and significantly reducing the frequency of revocation sweeps ten <ref:2606.19055#pg2>.
Priya: It’s about providing strong, efficient temporal safety guarantees at the architectural level, which is what this paper sets up for future work fifteen <ref:2606.19055#pg3>.
Conclusion: Nadia: So we're wrapping up this look at CHERI-D, which is about adding architectural support for temporal safety to CHERI using inline object IDs, and the authors are working on making this work practical and scalable.
Elias: Yeah, I’m looking at that title again—"CHERI-D: Secure and efficient inline object ID for CHERI temporal memory safety"—and it sounds like they’re tackling a real gap in the existing CHERI design.
Priya: It seems like the whole point is taking something that relies on software tricks, like Cornucopia Reloaded, and putting a way to handle this directly into the hardware capabilities.
Nadia: Exactly. So what does this mean for us right now? It means we might actually be able to get stronger use-after-free protection without that heavy performance hit from delayed garbage collection sweeps.
Elias: From a cryptographic standpoint, it’s about making sure the lifetime of an object is tied directly to its capability using that eight-bit ID field and the new instructions they introduced like `csetcapID`.
Priya: And the memory identification schemes they proposed, both inline and in-page IDs—that’s where I want to see some detail. How does that choice between those two affect what kind of application can use it effectively?
Nadia: Well, the paper shows it lets you choose based on how your data is laid out; inline IDs are better for cache line locality, but in-page IDs could give you faster lookups if things get bigger.
Elias: They also show that this way of doing things actually reduces the number of times the system has to sweep through memory just to clean up dangling pointers, which is a big win for performance metrics.
Priya: I'm interested in those evaluation results, because they show how much overhead it actually adds. If we can keep the runtime overhead low while getting better safety guarantees, that’s where it gets interesting for real systems.
Nadia: Right. So this paper sets up a foundation for having temporal safety built into the core architecture, not bolted on as a slow software layer.
Elias: It’s moving from something that requires complex software management to something handled by the hardware itself, which is where we want to go with these kinds of security extensions.
University of Cambridge
cs.AR, cs.CR
Submitted: 2026-06-17
Updated: 2026-10-19
Code: https://github.com/riscv/riscv-cheri
Project page: https://sqlite.org
License: http://creativecommons.org/licenses/by/4.0/
Importance score: 86/100
The gist: The gist: CHERI-D proposes an architectural extension to CHERI that supports efficient temporal memory safety by associating object identification (ID) metadata with capability pointers to provide
Key concepts
- CHERI
- CHERI is a hardware/software system that provides spatial safety. It ensures pointer safety by constraining the memory access range of pointers, preventing unauthorized memory reads or writes outside allocated bounds. However, it lacks built-in support for temporal safety.
- Temporal Memory Safety
- This refers to ensuring that memory accesses are valid not just spatially (within bounds), but also temporally (at the correct time). Temporal safety guarantees that a pointer remains valid for its intended duration, preventing use-after-reallocation or use-after-free errors.
- Capability ID Metadata
- CHERI-D associates an 8-bit capability ID with each allocated object. This ID tracks the object's specific allocation lifetime. By storing this metadata in the capability pointer itself, the system can verify if a pointer is still valid for its current allocation period, ensuring temporal integrity.
- Inline vs. In-page IDs
- CHERI-D supports two memory identification schemes: Inline IDs place the ID near the data within a cache line for better locality. In-page IDs store the ID within the same page as the allocation, allowing for fast hardware lookups and precise exception handling.
Summary
The gist: CHERI-D proposes an architectural extension to CHERI that supports efficient temporal memory safety by associating object identification (ID) metadata with capability pointers to provide temporal integrity of allocations.
Background
CHERI provides spatial safety by constraining the memory access range of pointers within bounds that cannot be forged or increased, but it lacks intrinsic architectural support for temporal memory safety, which is why solutions like Cornucopia Reloaded rely on software-based garbage-collector-like approaches to mitigate use-after-reallocation (UAR) [1]. Cornucopia Reloaded employs a garbage-collector-like (GC) approach that delays reallocation until a sweep of the address space has revoked dangling heap capabilities, which results in performance overhead due to delayed reallocation and revocation [2]. This strategy primarily mitigates use after reallocation rather than providing a stronger guarantee of use after free (UAF) protection, thus still permitting vulnerabilities to exploit undefined allocator behavior [2].
CHERI-D Architecture
CHERI-D introduces architectural support for finegrained tracking of pointer/memory lifetime (i.e. generation) to provide temporal guarantees [1]. It assigns an architecturally protected lifetime identifier to each allocated object, allowing a single memory location to be issued under multiple allocation lifetimes, with the previous lifetime identifier deprecated after every reallocation [1]. The extension includes:
- An 8-bit capability ID field to represent the lifetime that a capability is authorized to access, as shown in Figure 1 [5].
- A 1-bit capability ID mode (IDMODE) field to differentiate capabilities using the inline ID storage scheme (5.4) from the in-page scheme (5.5).
- A 6-bit capability ID location (IDLOC) field to encode the memory ID location according to the scheme selected by IDMODE.
- The new ID update instruction, csetcapID, used to set the ID in a capability.
- The csetmemID instruction used to update the memory ID associated with allocation.
- Two new instructions, cgetcapID and cgetmemID, used to read the ID from the capability and memory, respectively.
The protection model enforces monotonicity properties via guarded manipulation of capabilities [5]. The allocator must maintain an independent capability that authorizes access to the object ID memory location in order to update the object ID on free or allocation [5].
Memory Identification Schemes
CHERI-D decouples ID management from fixed memory granularities, associating a single ID with each allocation [5]. It supports two granularities: 64-byte lines and 4-kilobyte pages [5].
-
Inline IDs: For allocations that fit within a cache line, the IDLOC is simply encoded relative to the cache line base in which the allocation resides, placing the ID above the allocation top [5]. This mode is preferred to improve spatial locality between the inlined ID and the data, eliminating the need to buffer metadata using additional SRAM caches and tag controller support [5].
-
In-page IDs: For allocations that span multiple cache lines, this approach places the ID within the same page as the allocation [5]. This enables efficient, early ID lookup in hardware by placing 64 object IDs at the top of each page, allowing for precise exceptions on store operations without notable performance overhead [5].
Immediate Reuse and Revocation
CHERI-D allows allocator slots occupied by freed objects to be immediately reused with a new ID; accesses from stale pointers will safely trap due to ID mismatch [5]. The process of incrementing the ID associated with the slot when memory is freed can continue until the ID space is exhausted, allowing an allocation to be safely reallocated up to 254 times while preserving temporal safety guarantees [5]. CHERI-D can architecturally represent quarantined allocations by reserving an ID value; the revoker can identify dangling capabilities without relying on the shadow bitmap [8]. The kernel revoker is modified to detect dangling capabilities by probing the capability ID in memory using cgetcapID, and if the capability ID is zero, it falls back to the shadow bitmap for revocation [8].
Evaluation Results
Evaluations demonstrate that CHERI-D substantially reduces revocation overhead while preserving stronger temporal memory safety guarantees [2]. On SPEC CPU2006 INT benchmarks run on FPGA, Omnetpp experiences a runtime overhead of 104.6% under Cornucopia Reloaded, but CHERI-D reduces the number of revocation sweeps from 2792 to just 12 [11]. For gRPC QPS latency, CHERI-D incurs an overhead of 8.3% at the p90 latency percentile, compared to 89% for Cornucopia Reloaded [10]. Furthermore, extending support to larger allocation sizes up to 64 KiB substantially reduces both the maximum resident set size (MRSS) and the total number of revocations across SPEC workloads [12].
Conclusion
CHERI-D provides a foundation for practical and scalable CHERI temporal safety, offering strong, efficient temporal safety guarantees at the architectural level [15]. The results suggest that CHERI-D can substantially reduce both execution-time and memory-system overhead by enabling immediate memory reuse and significantly reducing the frequency of revocation [10]. Future work will explore architectural techniques to enable direct ID lookup across multiple pages while limiting additional address translations, and extend the benefits of CHERI-D to larger allocations [14].
Acknowledgments
We thank our colleagues on the CHERI team from the University of Cambridge for building the CHERI research platforms, and especially Jessica Clark for her assistance in getting our experiments up and running [15]. We are also grateful to Merve Gulmez and Thomas Nyman at Ericsson Security Research for their help in reproducing the evaluations they had previously conducted [15].
References
[1] R. N. M. Watson, P. G. Neumann, J. Woodruff, M. Roe, H. Almatary, J. Anderson, J. Baldwin, G. Barnes, D. Chisnall, J. Clarke, B Davis: “Capability Hardware Enhanced RISC Instructions: CHERI Instruction-Set Architecture (Version 9),” Computer Laboratory: “Capability Hardware Enhanced RISC Instructions: CHERI Instruction-Set Architecture (Version 9),” Computer Laboratory, University of Cambridge, Tech. Rep., 2023 [1].
[2] Nicolas Joly, Saif ElSherei, Saar Amar: “Security Analysis of CHERI ISA,” https://www.microsoft.com/en-us/msrc/blog/2020/10/securityanalysis-of-cheri-isa, Oct. 2020 [2].
[3] N. W. Filardo, B F Gutstein, J Woodruff: “Cornucopia Reloaded: Load Barriers for CHERI Heap Temporal Safety,” in Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 2. La Jolla CA USA: ACM, Apr. 2024 [3].
[5] Y. Wang, J Woodruff, A Mazzinghi: “CHERI-D: Secure and efficient inline object ID for CHERI temporal memory safety,” arXiv:2606.19055v1 17 Jun 2026 [5].
[8] S Amar, T Chen, D Chisnall: “CHERIoT: Rethinking security for low-cost embedded systems,” 2023 [8].
[9] Matthew Gretton-Dann: “Arm Community,” https://developer.arm.com/community/arm-communityblogs/b/architectures-and-processors-blog/posts/arm-a-profilearchitecture-2018-developments-armv85a, 2018 [9].
[10] “Application Data Integrity feature introduced by SPARC M7,” https://lwn.net/Articles/712531/, 2026 [10].
[14] ——, “CTSRD-CHERI/cheribsd,” 2026 [14].
[15] J Evans: “A Scalable Concurrent malloc(3) Implementation for FreeBSD,” 2026 [15].
[16] T Boland and P E Black: “Juliet 1.1 C/C++ and Java Test Suite,” Computer, vol. 45, no. 10, pp. 88–90, Oct. 2012 [16].
[27] M Gulmez, R Sturm: “PICASSO: Scaling CHERI Use-AfterFree Protection to Millions of Allocations using Colored Capabilities,” May 2026 [27].
[30] P D Rugg: “Efficient spatial and temporal safety for microcontrollers and application-class processors,” Computer Laboratory, University of Cambridge, Tech. Rep., 2023 [30].
[31] “Dynamic Memory Allocation In SQLite,” https://sqlite.org/malloc.html, 2026 [31].
--- Page 1 ---
The gist: CHERI-D proposes an architectural extension to CHERI that supports efficient temporal memory safety by associating object identification (ID) metadata with capability pointers to provide temporal integrity of allocations.
Improvements for AI systems
- Bold Header: Architectural Support for Strict Use-After-Free Mitigation
CHERI-D supports strict use-after-free mitigation
by associating an architecturally protected lifetime identifier to each allocated object,
which allows for immediate and safe memory reuse while preserving strong temporal safety guarantees.
- Bold Header: Efficient Memory Reuse and Reduced Revocation Overhead
The system can achieve a reduction in revocation frequency by allowing freed memory to be promptly returned to the allocator, as CHERI-D substantially reduces revocation overhead while preserving stronger temporal memory safety guarantees,
contrasting with solutions that rely on delayed reallocation and revocation.
- Bold Header: Scalable Metadata Management for Large Workloads
The system scales efficiently for allocation-intensive workloads by allowing 256 lifetimes
and using an ID scheme where a single memory location may be issued under multiple allocation lifetimes, with the previous lifetime identifier deprecated after every reallocation.
- Bold Header: Elimination of Shadow Bitmap Overhead
CHERI-D eliminates the need for a software bitmap by allowing the revoker to detect dangling capabilities without relying on the shadow bitmap,
modifying the trade-off for both allocator and revoker.
- Bold Header: Improved Performance in Memory Access Patterns
The system utilizes inline ID storage to improve spatial locality, as it allows the ID lookup that must accompany data access is truly free
when the ID is on the same cache line with the data being accessed.
Abstract
We propose CHERI-D, an architectural extension to CHERI that supports efficient temporal memory safety. Efficient memory safety is an increasing priority for programming languages, operating systems, and hardware designs, and CHERI is a leading hardware/software system that provides native spatial safety and a foundation for temporal memory safety. Due to CHERI lacking intrinsic architectural support for temporal memory safety, the state-of-the-art CHERI temporal safety solution, Cornucopia Reloaded, is a software-based solution that provides use-after-reallocation (UAR) protections instead of the stronger use-after-free (UAF) mitigation, and suffers performance overhead due to delayed reallocation and revocation. CHERI-D associates object identification (ID) metadata with capability pointers to provide temporal integrity of allocations. CHERI spatial safety allows CHERI-D to store object IDs safely inline with allocation data, potentially within unused fragmentation. Evaluated in simulation and in hardware, CHERI-D significantly reduces the revocation overhead of Cornucopia Reloaded while allowing it to support strict use-after-free mitigation.
Related papers
- WitCert: Sound Runtime Risk Observability and Gating for KV-Cache Quantization
- Golden Ruler: A Numeric Format Catalog with Bit-Exact Conformance Vectors for FP8, BF16, MXFP4, and Microscaling Formats
- RFChipAgent: Multi-Agentic AI Flow for Analog/RF Chip Design
- PoisonCap: Efficient Hierarchical Temporal Safety for CHERI
- Provisioning to Runtime Optimization of a 100 MW-Scale AI Cluster
- Bit-Accurate Modeling of GPU Matrix Multiply-Accumulate Units: Demystifying Numerical Discrepancy and Accuracy