MVDetecter: Vulnerability Primitive-based General Memory Vulnerability Detection
Xiaofan Nie, Haolai Wei, Liwei Chen, Zhijie Zhang, Yuantong Zhang, Gang Shi · 2022
Memory vulnerability is one of the most harmful software vulnerabilities. The attackers can tamper/leak memory data or take complete control over the program by exploiting these vulnerabilities. It is critical to detect memory vulnerability comprehensively. Unfortunately, type-based detections hardly achieve comprehensive detection due to the inexhaustible vul-nerability types, and the general detections usually are heuristic, causing high false negatives. Therefore, there is a lack of effective and comprehensive methods for memory vulnerability detection. This paper presents a new Vulnerability Primitive-based static detection prototype, MVDetecter, to solve the problem. By exploring the root cause of vulnerability generation and exploitation, we propose the memory vulnerability primitive as a guideline for vulnerability detection. We perform static analysis to collect the required information. Then we search for vulnerability primitive to locate the memory vulnerabilities. We implemented MVDe-teeter based on Joern and evaluated its effectiveness with Juliet Test Suite (JTS), two open-source software, and 32 advanced attacks. The results show that MVDetecter can successfully detect most vulnerabilities with a 1.41 % false negative for JTS. And it successfully determines the location of the vulnerability exploited by the real-world attack. Besides, the runtime overhead of MVDetecter is acceptable in SPEC CPU 2006.