Inter-procedural buffer overflows detection in C/C++ source code via static analysis
И. А. Дудина · Proceedings of the Institute for System Programming of RAS · 2016
We propose inter-procedural static analysis tool for buffer overflow detection. It is based on previously developed intra-procedural algorithm which uses symbolic execution with state merging. This algorithm is path-sensitive and supports tracking several kinds of value relations such as arithmetic operations, cast instructions, binary relations from constraints. In this paper we provide a formal definition for inter-procedural buffer overflow errors and discuss different kinds of such errors. We use function summaries for inter-procedural analysis, so it provides natural path-sensitivity in some degree. This approach allowed us to improve intra-procedural algorithm by tracking inter-procedural value dependencies. Furthermore, we introduce a technique to extract the sufficient condition of buffer overflow for a function, which is supposed to be stored in the summary of this function and checked at every call site. This approach was implemented for Svace static analyzer as the new buffer overflow detector, and it has shown 64% true-positive ratio on Android 5.0.2.
Cited by 1 works. doi:10.15514/ispras-2016-28(5)-7 Open-access PDF
Authors
References
- Statically detecting likely buffer overflow vulnerabilities
- Static analyzer Svace for finding of defects in program source code
- A static analysis tool Svace as a collection of analyzers with various complexity levels
- Efficient state merging in symbolic execution
- Classification of Static Analysis-Based Buffer Overflow Detectors
- Path-sensitive bug detection analysis of C# program illustrated by null pointer dereference
- Statically detecting buffer overflows in C/C++