PoisonCap: Efficient Hierarchical Temporal Safety for CHERI
Yuecheng Wang, Jonathan Woodruff, Alfredo Mazzinghi, Peter Rugg, Alexandre Joannou + 3 more
TLDR
PoisonCap enhances CHERI systems with strict use-after-free and initialization safety using a novel 'poison' capability format, without performance overhead.
Key contributions
- Introduces PoisonCap, a novel 'poison' capability format for CHERI temporal safety.
- Enforces strict use-after-free and initialization safety, surpassing prior CHERI solutions.
- Enables efficient cache management of quarantined memory via microarchitecture communication.
- Achieves these safety improvements without incurring performance overhead.
Why it matters
Memory safety is crucial for secure systems. PoisonCap significantly strengthens CHERI's temporal safety by providing strict use-after-free and initialization protection, capabilities current solutions lack, all without performance overhead. This offers a vital improvement for hardware-assisted memory safety.
Original Abstract
In this paper, we present PoisonCap: scalable temporal safety with strict use-after-free protection and initialisation safety for CHERI systems. 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. Cornucopia Reloaded, the current state-of-the-art CHERI temporal safety solution, provides use-after-reallocation safety instead of stronger use-after-free safety, and is not able to enforce initialisation safety. We show that a new 'poison' capability format can be used to enforce strict use-after-free and initialisation safety, and also to communicate memory state to the microarchitecture for efficient cache management of quarantined memory. We enable elegant delegation of memory poisoning privilege using capability bounds to allow nested allocators to enforce safety on their consumers without disturbing upstream allocators. PoisonCap can replace the Cornucopia shadow bitmap, and also automatically zeros memory on reallocation, or optionally traps on read-before-write to enforce initialisation safety. As a result, it incurs no fundamental overhead relative to a Cornucopia baseline that zeros before reallocation, strengthening CHERI temporal safety without performance overhead.
📬 Weekly AI Paper Digest
Get the top 10 AI/ML arXiv papers from the week — summarized, scored, and delivered to your inbox every Monday.