MESH: A Memory-Efficient Safe Heap for C/C plus

被引:1
|
作者
Vintila, Emanuel Q. [1 ]
Zieris, Philipp [1 ]
Horsch, Julian [1 ]
机构
[1] Fraunhofer AISEC, Garching, Germany
关键词
memory safety; unsafe programming languages; buffer overflows; pointer tagging; dangling pointers; use-after-free;
D O I
10.1145/3465481.3465760
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
While memory corruption bugs stemming from the use of unsafe programming languages are an old and well-researched problem, the resulting vulnerabilities still dominate real-world exploitation today. Various mitigations have been proposed to alleviate the problem, mainly in the form of language dialects, static program analysis, and code or binary instrumentation. Solutions like Adress-Sanitizer (ASan) and Softbound/CETS have proven that the latter approach is very promising, being able to achieve memory safety without requiring manual source code adaptions, albeit suffering substantial performance and memory overheads. While performance overhead can be seen as a flexible constraint, extensive memory overheads can be prohibitive for the use of such solutions in memory-constrained environments. To address this problem, we propose MESH, a highly memory-efficient safe heap for C/C++. With its constant, very small memory overhead (configurable up to 2 MB on x86-64) and constant complexity for pointer access checking, MESH offers efficient, byte-precise spatial and temporal memory safety for memory-constrained scenarios. Without jeopardizing the security of safe heap objects, MESH is fully compatible with existing code and uninstrumented libraries, making it practical to use in heterogeneous environments. We show the feasibility of our approach with a full LLVM-based prototype supporting both major architectures, i.e., x86-64 and ARM64, in a Linux runtime environment. Our prototype evaluation shows that, compared to ASan and Softbound/CETS, MESH can achieve huge memory savings while preserving similar execution performance.
引用
收藏
页数:10
相关论文
共 50 条
  • [1] Techniques for Memory-Efficient Model Checking of C and C plus plus Code
    Rockai, Petr
    Still, Vladimir
    Barnat, Jiri
    SOFTWARE ENGINEERING AND FORMAL METHODS, 2015, 9276 : 268 - 282
  • [2] SlimGuard: A Secure and Memory-Efficient Heap Allocator
    Liu, Beichen
    Olivier, Pierre
    Ravindran, Binoy
    MIDDLEWARE'19: PROCEEDINGS OF THE 2019 MIDDLEWARE'19: 20TH INTERNATIONAL MIDDLEWARE CONFERENCE, 2019, : 1 - 13
  • [3] MESH: Compacting Memory Management for C/C plus plus Applications
    Powers, Bobby
    Tench, David
    Berger, Emery D.
    McGregor, Andrew
    PROCEEDINGS OF THE 40TH ACM SIGPLAN CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION (PLDI '19), 2019, : 333 - 346
  • [4] Detecting Memory-Related Bugs by Tracking Heap Memory Management of C plus plus Smart Pointers
    Ma, Xutong
    Yan, Jiwei
    Wang, Wei
    Yan, Jun
    Zhang, Jian
    Qiu, Zongyan
    2021 36TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING ASE 2021, 2021, : 880 - 891
  • [5] StreamNet plus plus : Memory-Efficient Streaming TinyML Model Compilation on Microcontrollers
    Hsu, Chen-fong
    Zheng, Hong-sheng
    Liu, Yu-yuan
    Yeh, Tsung tai
    ACM TRANSACTIONS ON EMBEDDED COMPUTING SYSTEMS, 2025, 24 (02)
  • [6] GrowthTracker: Diagnosing Unbounded Heap Growth in C plus plus Software
    Hill, Erik
    Tracy, Daniel J.
    Brown, Sheldon
    2013 IEEE SIXTH INTERNATIONAL CONFERENCE ON SOFTWARE TESTING, VERIFICATION AND VALIDATION (ICST 2013), 2013, : 134 - 143
  • [7] Grace: Safe Multithreaded Programming for C/C plus
    Berger, Emery D.
    Yang, Ting
    Liu, Tongping
    Novark, Gene
    OOPSLA 2009, CONFERENCE PROCEEDINGS, 2009, : 81 - 96
  • [8] Memory-efficient and thread-safe quasi-destructive graph unification
    van Lohuizen, MP
    38TH ANNUAL MEETING OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS, PROCEEDINGS OF THE CONFERENCE, 2000, : 352 - 359
  • [9] On Monitoring C/C plus plus Transactional Memory Programs
    Fiedor, Jan
    Letko, Zdenek
    Lourenco, Joao
    Vojnar, Tomas
    MATHEMATICAL AND ENGINEERING METHODS IN COMPUTER SCIENCE, MEMICS 2014, 2014, 8934 : 73 - 87
  • [10] Smash plus plus : an alignment-free and memory-efficient tool to find genomic rearrangements
    Hosseini, Morteza
    Pratas, Diogo
    Morgenstern, Burkhard
    Pinho, Armando J.
    GIGASCIENCE, 2020, 9 (05):