Static Analysis Framework for Detecting Use-After-Free Bugs in C plus

被引:0
作者
Teodorescu, Vlad-Alexandru [1 ]
Lucanu, Dorel [1 ]
机构
[1] Alexandru Ioan Cuza Univ, Fac Comp Sci, Iasi, Romania
来源
ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE | 2024年 / 410期
关键词
D O I
10.4204/EPTCS.410.6
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
Pointers are a powerful, but dangerous feature provided by the C and C++ programming languages, and incorrect use of pointers is a common source of bugs and security vulnerabilities. Making secure software is crucial, as vulnerabiffties expioneti by malicious actors that only leadionontury Toster, but possibly loss of human lives. Fixing these vulnerabilities is costly if they are found at the end of development, and the cost will be even higher if found after deployment. That is why it is desirable to find the bugs as early in the development process as possible. We propose a framework that can statically find use-after-free bugs at compile-time and report the errors to the users. It works. by tracking the lifetime of objects and memory locations pointers might point to and, using this information, a possibly invalid dereferencing of a pointer can be detected. The framework was tested on over 100 handwritten small tests, as well as 5 real-world projects, and has shown good results detecting errors, while at the same time highlighting some scenarios where false positive reports may occur. Based on the results, it was concluded that our framework achieved its goals, as it is able to detect multiple patterns of use-after-free bugs, and correctly report the errors to the programmer.
引用
收藏
页数:172
相关论文
共 17 条
[1]  
clang.llvm, Clang static analyzer checkers
[2]  
clang.llvm, Clang ecosystem
[3]  
Fioraldi Andrea, 2020, 14 USENIX WORKSH OFF
[4]  
Grune Dick., 2002, Modern compiler design
[5]  
heartbleed, The Heartbleed Bug
[6]  
ISO, 2020, ISO/IEC 14882:2020 Information technology-Programming languages-C++
[7]  
isocpp, C++ Core Guidelines
[8]  
jetbrains, CLion warnings
[9]  
jetbrains, The State of Developer Ecosystem 2023-Jetbrains
[10]  
Krasznay Csaba, 2020, Case Study: The NotPetya Campaign, P485