Static analysis to make the most of CHERI C/C++ for existing code: improving memory safety at scale.

Saved in:
Bibliographic Details
Title: Static analysis to make the most of CHERI C/C++ for existing code: improving memory safety at scale.
Authors: Dudina, Irina1 (AUTHOR) irina.dudina@ed.ac.uk, Stark, Ian1 (AUTHOR) ian.stark@ed.ac.uk
Source: International Journal on Software Tools for Technology Transfer. Apr2025, Vol. 27 Issue 2, p225-237. 13p.
Subjects: Spatial memory, Checkers, Integers, Memory, Computer software
Abstract: We describe and evaluate custom static analyses to support transitioning existing C/C++ codebases to CHERI hardware. CHERI is a novel architectural extension, implemented for RISC-V and AArch64, that uses capabilities to provide fine-grained memory protection and scalable software compartmentalization. While the existing CHERI toolchain can recompile large code collections for the platform with only a few source changes, those changes are nonetheless critical: we demonstrate that static analysis can help to identify where they are needed and what must be done to avoid later runtime faults. We provide custom checkers for the Clang Static Analyzer to handle capability alignment, copying through memory, and manipulation as integers. Beyond simply picking up problems in existing code, we also have checkers that identify where code can take advantage of capabilities to better enforce least privilege and improve spatial memory safety. We evaluate all implemented checkers on a sample of packages from the CheriBSD ports library (408 packages, analyzed) and confirm by analyzing true-positive warning rates that the reports produced are sufficiently high quality for practical use. [ABSTRACT FROM AUTHOR]
Copyright of International Journal on Software Tools for Technology Transfer is the property of Springer Nature and its content may not be copied or emailed to multiple sites without the copyright holder's express written permission. Additionally, content may not be used with any artificial intelligence tools or machine learning technologies. However, users may print, download, or email articles for individual use. This abstract may be abridged. No warranty is given about the accuracy of the copy. Users should refer to the original published version of the material for the full abstract. (Copyright applies to all Abstracts.)
Database: Engineering Source
Be the first to leave a comment!
You must be logged in first