Mon CHÉRI: Mitigating Uninitialized Memory Access with Conditional Capabilities

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Gülmez, Merve, Englund, Håkan, Mühlberg, Jan Tobias, Nyman, Thomas
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909841816027136
author Gülmez, Merve
Englund, Håkan
Mühlberg, Jan Tobias
Nyman, Thomas
author_facet Gülmez, Merve
Englund, Håkan
Mühlberg, Jan Tobias
Nyman, Thomas
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2407_08663
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Mon CHÉRI: Mitigating Uninitialized Memory Access with Conditional Capabilities
Gülmez, Merve
Englund, Håkan
Mühlberg, Jan Tobias
Nyman, Thomas
Cryptography and Security
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.
title Mon CHÉRI: Mitigating Uninitialized Memory Access with Conditional Capabilities
topic Cryptography and Security
url https://arxiv.org/abs/2407.08663