Spatio-Temporal Context Reduction: A Pointer-Analysis-Based Static Approach for Detecting Use-After-Free Vulnerabilities

被引:53
|
作者
Yan, Hua [1 ]
Sui, Yulei [2 ,3 ]
Chen, Shiping [4 ]
Xue, Jingling [1 ]
机构
[1] Univ New South Wales, Sch Comp Sci & Engn, Sydney, NSW, Australia
[2] Univ Technol Sydney, Ctr Artificial Intelligence, Sydney, NSW, Australia
[3] Univ Technol Sydney, Sch Software, Sydney, NSW, Australia
[4] CSIRO, Data61, Canberra, ACT, Australia
关键词
use-after-free; program analysis; bug detection; MEMORY; SAFETY;
D O I
10.1145/3180155.3180178
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Zero-day Use-After-Free (UAF) vulnerabilities are increasingly popular and highly dangerous, but few mitigations exist. We introduce a new pointer-analysis-based static analysis, CRED, for finding UAF bugs in multi-MLOC C source code efficiently and effectively. CRED achieves this by making three advances: (i) a spatio-temporal context reduction technique for scaling down soundly and precisely the exponential number of contexts that would otherwise be considered at a pair of free and use sites, (ii) a multi-stage analysis for filtering out false alarms efficiently, and (iii) a path-sensitive demand-driven approach for finding the points-to information required. We have implemented CRED in LLVM-3.8.0 and compared it with four different state-of-the-art static tools: CBMC (model checking), CLANG (abstract interpretation), COCCINELLE (pattern matching), and SUPA (pointer analysis) using all the C test cases in Juliet Test Suite (JTS) and 10 open-source C applications. For the ground-truth validated with JTS, CRED detects all the 138 known UAF bugs as CBMC and SUPA do while CLANG and COCCINELLE miss some bugs, with no false alarms from any tool. For practicality validated with the 10 applications (totaling 3+ MLOC), CRED reports 132 warnings including 85 bugs in 7.6 hours while the existing tools are either unscalable by terminating within 3 days only for one application (CBMC) or impractical by finding virtually no bugs (CLANG and COCCINELLE) or issuing an excessive number of false alarms (SUPA).
引用
收藏
页码:327 / 337
页数:11
相关论文
共 48 条