Mon CHERI: Mitigating Uninitialized Memory Access with Conditional Capabilities
Merve Gülmez, Håkan Englund, Jan Tobias Mühlberg, Thomas Nyman
Abstract
Up to 10% of memory-safety vulnerabilities in languages like C and C++ stem from uninitialized variables. This work addresses the prevalence and lack of adequate software mitigations for uninitialized memory issues, proposing architectural protections in hardware. Capability-based addressing, such as the University of Cambridge's CHERI, mitigates many memory defects, including spatial and temporal safety violations at an architectural level. CHERI, however, does not handle undefined behavior from uninitialized variables. We extend the CHERI capability model to include “conditional capabilities”, enabling memory-access policies based on prior operations. This allows enforcement of policies that satisfy memory-safety objectives such as “no reads to memory without at least one prior write” (Write-before-Read). We present our architecture extension, compiler support, and detailed evaluation of our approach on the QEMU full-system simulator and a modified FPGA-based CHERI-RISCV softcore. Our evaluation shows conditional capabilities are practical, with high detection accuracy while adding a small (≈3.5%) overhead which is comparable to the cost of baseline CHERI capabilities.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 1800e22c-32b4-432f-a7b2-38f84a81e744Cited by top-tier papers3
- PICASSO: Scaling CHERI Use-After-Free Protection to Millions of Allocations using Colored CapabilitiesMerve Gülmez, Ruben Sturm, Hossam ElAtali, Håkan Englund et al.USENIX Security 2026 · 5 citations
- PoisonCap: Efficient Hierarchical Temporal Safety for CHERIYuecheng Wang, Jonathan Woodruff, Alfredo Mazzinghi, Peter Rugg et al.CCS 2026 · 3 citations
- BLACKOUT: Data-Oblivious Computation with Blinded CapabilitiesHossam ElAtali, Merve Gülmez, Thomas Nyman, N. AsokanCCS 2025
Builds on9
- UniSan: Proactive Kernel Memory Initialization to Eliminate Data LeakagesKangjie Lu, Chengyu Song, Taesoo Kim, Wenke LeeCCS 2016 · 81 citations
- Cornucopia: Temporal Safety for CHERI HeapsNathaniel Wesley Filardo, Brett F. Gutstein, Jonathan Woodruff, Sam Ainsworth et al.S&P 2020 · 71 citations
- Unleashing Use-Before-Initialization Vulnerabilities in the Linux Kernel Using Targeted Stack SprayingKangjie Lu, Marie-Therese Walter, David Pfaff, Stefan Nümberger et al.NDSS 2017 · 58 citations
- Efficient and provable local capability revocation using uninitialized capabilitiesAïna Linn Georges, Armaël Guéneau, Thomas Van Strydonck, Amin Timany et al.POPL 2021 · 30 citations
- CHERIoT: Complete Memory Safety for Embedded DevicesSaar Amar, David Chisnall, Tony Chen, Nathaniel Wesley Filardo et al.MICRO 2023 · 22 citations
Related papers
- Formal Mechanised Semantics of CHERI C: Capabilities, Undefined Behaviour, and ProvenanceVadim Zaliva, Kayvan Memarian, Ricardo Almeida, Jessica Clarke et al.ASPLOS 2024 · 6 citations
- Capstone: A Capability-based Foundation for Trustless Secure Memory AccessJason Zhijingcheng Yu, Conrad Watt, Aditya Badole, Trevor E. Carlson et al.USENIX Security 2023
- Cornucopia Reloaded: Load Barriers for CHERI Heap Temporal SafetyNathaniel Wesley Filardo, Brett F. Gutstein, Jonathan Woodruff, Jessica Clarke et al.ASPLOS 2024 · 16 citations
- Rigorous engineering for hardware security: Formal modelling and proof in the CHERI design and implementation processKyndylan Nienhuis, Alexandre Joannou, Thomas Bauereiss, Anthony C. J. Fox et al.S&P 2020 · 43 citations
- CHEx86: Context-Sensitive Enforcement of Memory Safety via Microcode-Enabled CapabilitiesRasool Sharifi, Ashish VenkatISCA 2020 · 28 citations
