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

被引:0
|
作者
Dudina, Irina [1 ]
Stark, Ian [1 ]
机构
[1] Univ Edinburgh, Edinburgh, Scotland
关键词
Static analysis; CHERI; Software porting;
D O I
10.1007/s10009-025-00781-6
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页数:13
相关论文
共 50 条
  • [21] A Dynamic Detection Method to C/C plus plus Programs Memory Vulnerabilities Based on Pointer Analysis
    Ma, Rui
    Chen, Lingkui
    Hu, Changzhen
    Xue, Jingfeng
    Zhao, Xiaolin
    2013 IEEE 11TH INTERNATIONAL CONFERENCE ON DEPENDABLE, AUTONOMIC AND SECURE COMPUTING (DASC), 2013, : 52 - 57
  • [22] PhASAR: An Inter-procedural Static Analysis Framework for C/C plus
    Schubert, Philipp Dominik
    Hermann, Ben
    Bodden, Eric
    TOOLS AND ALGORITHMS FOR THE CONSTRUCTION AND ANALYSIS OF SYSTEMS, PT II, 2019, 11428 : 393 - 410
  • [23] Cloud-Based Source Code Security and Vulnerabilities Analysis Tool for C/C plus plus Software Systems
    Crifasi, Elliott
    Pike, Sean
    Stuedemann, Zechariah
    Alnaeli, Saleh M.
    Altahat, Zaid
    2018 IEEE INTERNATIONAL CONFERENCE ON ELECTRO/INFORMATION TECHNOLOGY (EIT), 2018, : 651 - 654
  • [24] Technology on the static analysis of system subject to regression test with software developed based on the C, C plus plus language
    Lei, Yun
    DCABES 2007 Proceedings, Vols I and II, 2007, : 434 - 437
  • [25] Using Static Analysis to Support Variability Implementation Decisions in C plus
    Al Masri, Samer
    Nadi, Sarah
    Gaudet, Matthew
    Liang, Xiaoli
    Young, Robert W.
    SPLC'18: PROCEEDINGS OF THE 22ND INTERNATIONAL SYSTEMS AND SOFTWARE PRODUCT LINE CONFERENCE, VOL 1, 2018, : 236 - 245
  • [26] A C plus plus Shared-Memory Ring-Buffer Framework for Large-Scale Data Acquisition Systems
    Ingles, Rolando
    Orlikowski, Mariusz
    Napieralski, Andrzej
    PROCEEDINGS OF THE 24TH INTERNATIONAL CONFERENCE MIXED DESIGN OF INTEGRATED CIRCUITS AND SYSTEMS - MIXDES 2017, 2017, : 161 - 166
  • [27] Static Analysis Framework for Detecting Use-After-Free Bugs in C plus
    Teodorescu, Vlad-Alexandru
    Lucanu, Dorel
    ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2024, (410):
  • [28] Interprocedural and Flow-Sensitive Type Analysis for Memory and Type Safety of C Code
    Tlili, Syrine
    Debbabi, Mourad
    JOURNAL OF AUTOMATED REASONING, 2009, 42 (2-4) : 265 - 300
  • [29] Interprocedural and Flow-Sensitive Type Analysis for Memory and Type Safety of C Code
    Syrine Tlili
    Mourad Debbabi
    Journal of Automated Reasoning, 2009, 42 : 265 - 300
  • [30] A DFT Spectrum Acoustic Analysis for Investigating Pulse Duration Effect on Performance, Psychoacoustic Sound Level of Turbocharger Turbines Through C plus plus FDM Code
    Ketata, Ahmed
    Ketata, Imen
    Driss, Zied
    ARABIAN JOURNAL FOR SCIENCE AND ENGINEERING, 2022, 47 (07) : 8945 - 8968