Enhanced Memory Corruption Detection in C/C plus plus Programs

被引:0
|
作者
Lin, Ching-Yi [1 ]
Yang, Wuu [2 ]
机构
[1] Natl Yang Ming Chiao Tung Univ, Comp Secur, Hsinchu, Taiwan
[2] Natl Yang Ming Chiao Tung Univ, Dept Comp Sci, Hsinchu, Taiwan
关键词
page aliasing; red zones; shadow memory; memory corruption; LLVM; x86-64; Intel SGX;
D O I
10.1145/3605731.3605903
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
Out-of-bound memory accesses, which often occur in programs written in unsafe languages such as C or C++, cause severe troubles. Though there are many useful tools aiming at this problem, we report a new tool, called mcds, for detecting spatial and temporal memory corruptions in x86-64 ELF binary. Mcds allocates each memory object to a separate virtual page. The rest is left blank. Due to a facility in the memory management library, we can set up memory protection so that accessing the "blank" part of a virtual page causes a hardware trap. Because it is a hardware trap, there is little run-time overhead. In order to save memory space, we may squeeze several virtual pages into a single physical page. Our first experimental result is that mcds can find all the bugs in the Firefox 78 package, the Chrome package and the PHP7.0 package that are recorded on the CVE Details website. Furthermore, mcds can detect three classes of memory corruptions that are beyond the capability of the current AddressSanitizer (Asan). Then we compare the time for compilation and fuzzing tests. The fuzzing test is done with AFL++ fuzzer on Ubuntu 22.04 LTS with Intel i5-9600K chip. According to our experimental results, mcds shows approximately 6x speedup in fuzzing tests against AddressSanitizer. There is not significant difference between compiling the source with AddressSanitizer or with mcds, though both of them result in 2x slowdown compared with compilation without a sanitizer.
引用
下载
收藏
页码:71 / 78
页数:8
相关论文
共 50 条
  • [1] A Comprehensive Detection of Memory Corruption Vulnerabilities for C/C plus plus Programs
    Gao, Yuhan
    Chen, Liwei
    Shi, Gang
    Zhang, Fei
    2018 IEEE INT CONF ON PARALLEL & DISTRIBUTED PROCESSING WITH APPLICATIONS, UBIQUITOUS COMPUTING & COMMUNICATIONS, BIG DATA & CLOUD COMPUTING, SOCIAL COMPUTING & NETWORKING, SUSTAINABLE COMPUTING & COMMUNICATIONS, 2018, : 354 - 360
  • [2] 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
  • [3] 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
  • [4] Efficient detection of dangling pointer error for C/C plus plus programs
    Zhang, Wenzhe
    2ND ANNUAL INTERNATIONAL CONFERENCE ON INFORMATION SYSTEM AND ARTIFICIAL INTELLIGENCE (ISAI2017), 2017, 887
  • [5] A Context-Sensitive Memory Model for Verification of C/C plus plus Programs
    Gurfinkel, Arie
    Navas, Jorge A.
    STATIC ANALYSIS (SAS 2017), 2017, 10422 : 148 - 168
  • [6] Local Nontermination Detection for Parallel C plus plus Programs
    Still, Vladimir
    Barnat, Jiri
    SOFTWARE ENGINEERING AND FORMAL METHODS (SEFM 2019), 2019, 11724 : 373 - 390
  • [7] 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
  • [8] SAFEDISPATCH: Securing C plus plus Virtual Calls from Memory Corruption Attacks
    Jang, Dongseok
    Tatlock, Zachary
    Lerner, Sorin
    21ST ANNUAL NETWORK AND DISTRIBUTED SYSTEM SECURITY SYMPOSIUM (NDSS 2014), 2014,
  • [9] Detection of Memory Leaks in C/C plus plus Code via Machine Learning
    Andrzejak, Artur
    Eichler, Felix
    Ghanavati, Mohammadreza
    2017 IEEE 28TH INTERNATIONAL SYMPOSIUM ON SOFTWARE RELIABILITY ENGINEERING WORKSHOPS (ISSREW 2017), 2017, : 252 - 258
  • [10] Efficient Data Race Detection for C/C plus plus Programs Using Dynamic Granularity
    Song, Young Wn
    Lee, Yann-Hang
    2014 IEEE 28TH INTERNATIONAL PARALLEL AND DISTRIBUTED PROCESSING SYMPOSIUM, 2014,