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 条
  • [11] Detection of Incorrect Pointer Dereferences for C/C plus plus Programs using Static Code Analysis and Logical Inference
    Vert, Tatiana
    Krikun, Tatiana
    Glukhikh, Mikhail
    2013 TOOLS & METHODS OF PROGRAM ANALYSIS (TMPA 2013), 2013, : 78 - 82
  • [12] Fast analysis of source code in C and C plus
    Savitskii, V. O.
    Sidorov, D. V.
    PROGRAMMING AND COMPUTER SOFTWARE, 2013, 39 (01) : 49 - 55
  • [13] Static Analysis Approach for Defect Detection in Multithreaded C/C plus plus Programs
    Moiseev, Mikhail
    SOFTWARE ENGINEERING FOR RESILIENT SYSTEMS, SERENE 2013, 2013, 8166 : 169 - 183
  • [14] An Interactive Reverse Engineering Environment for Large-Scale C plus plus Code
    Telea, Alexandru
    Voinea, Lucian
    SOFTVIS 2008: PROCEEDINGS OF THE 4TH ACM SYMPOSIUM ON SOFTWARE VISUALIZATION, 2008, : 67 - 76
  • [15] Large-scale semi-automated migration of legacy C/C plus plus test code
    Schuts, Mathijs T. W.
    Aarssen, Rodin T. A.
    Tielemans, Paul M.
    Vinju, Jurgen J.
    SOFTWARE-PRACTICE & EXPERIENCE, 2022, 52 (07): : 1543 - 1580
  • [16] Finding parallel patterns through static analysis in C plus plus applications
    del Rio Astorga, David
    Dolz, Manuel F.
    Miguel Sanchez, Luis
    Daniel Garcia, J.
    Danelutto, Marco
    Torquati, Massimo
    INTERNATIONAL JOURNAL OF HIGH PERFORMANCE COMPUTING APPLICATIONS, 2018, 32 (06): : 779 - 788
  • [17] An analysis of programming language statement frequency in C, C plus plus , and Java']Java source code
    Zhu, Xiaoyan
    Whitehead, E. James
    Sadowski, Caitlin
    Song, Qinbao
    SOFTWARE-PRACTICE & EXPERIENCE, 2015, 45 (11): : 1479 - 1495
  • [18] Static analysis usage for customizable semantic checks of C and C plus plus programming languages constraints
    Ignatyev, Valery
    2014 SEVENTH IEEE INTERNATIONAL CONFERENCE ON SOFTWARE TESTING, VERIFICATION AND VALIDATION WORKSHOPS (ICSTW 2014), 2014, : 241 - 242
  • [19] On the Use of Open-Source C/C plus plus Static Analysis Tools in Large Projects
    Pereira, Jose D'Abruzzo
    Vieira, Marco
    2020 16TH EUROPEAN DEPENDABLE COMPUTING CONFERENCE (EDCC 2020), 2020, : 97 - 102
  • [20] CryptSan: Leveraging ARM Pointer Authentication for Memory Safety in C/C plus
    Hohentanner, Konrad
    Zieris, Philipp
    Horsch, Julian
    38TH ANNUAL ACM SYMPOSIUM ON APPLIED COMPUTING, SAC 2023, 2023, : 1530 - 1539