FREEWILL: Automatically Diagnosing Use-after-free Bugs via Reference Miscounting Detection on Binaries

被引:0
|
作者
He, Liang [1 ]
Hu, Hong [3 ]
Su, Purui [1 ,2 ,4 ]
Cai, Yan [2 ]
Liang, Zhenkai [5 ]
机构
[1] Chinese Acad Sci, TCA, Inst Software, Beijing, Peoples R China
[2] Chinese Acad Sci, SKLCS, Inst Software, Beijing, Peoples R China
[3] Penn State Univ, University Pk, PA 16802 USA
[4] Univ Chinese Acad Sci, Sch Cyber Secur, Beijing, Peoples R China
[5] Natl Univ Singapore, Singapore, Singapore
基金
中国国家自然科学基金;
关键词
SAFETY;
D O I
暂无
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Memory-safety issues in operating systems and popular applications are still top security threats. As one widely exploited vulnerability, Use After Free (UAF) resulted in hundreds of new incidents every year. Existing bug diagnosis techniques report the locations that allocate or deallocate the vulnerable object, but cannot provide sufficient information for developers to reason about a bug or synthesize a correct patch. In this work, we identified incorrect reference counting as one common root cause of UAF bugs: if the developer forgets to increase the counter for a newly created reference, the program may prematurely free the actively used object, rendering other references dangling pointers. We call this problem reference miscounting. By proposing an omission-aware counting model, we developed an automatic method, FREEWILL, to diagnose UAF bugs. FREEWILL first reproduces a UAF bug and collects related execution trace. Then, it identifies the UAF object and related references. Finally, FREEWILL compares reference operations with our model to detect reference miscounting. We evaluated FREEWILL on 76 real-world UAF bugs and it successfully confirmed reference miscounting as root causes for 48 bugs and dangling usage for 18 bugs. FREEWILL also identified five null-pointer dereference bugs and failed to analyze five bugs. FREEWILL can complete its analysis within 15 minutes on average, showing its practicality for diagnosing UAF bugs.
引用
收藏
页码:2497 / 2512
页数:16
相关论文
共 21 条
  • [1] Dynamic Detection of Use-After-Free Bugs
    S. A. Asryan
    S. S. Gaissaryan
    Sh. F. Kurmangaleev
    A. M. Aghabalyan
    N. G. Hovsepyan
    S. S. Sargsyan
    [J]. Programming and Computer Software, 2019, 45 : 365 - 371
  • [2] Dynamic Detection of Use-After-Free Bugs
    Asryan, S. A.
    Gaissaryan, S. S.
    Kurmangaleev, Sh F.
    Aghabalyan, A. M.
    Hovsepyan, N. G.
    Sargsyan, S. S.
    [J]. PROGRAMMING AND COMPUTER SOFTWARE, 2019, 45 (07) : 365 - 371
  • [3] Detect use-after-free vulnerabilities in binaries
    Han, Xinhui
    Wei, Shuang
    Ye, Jiayi
    Zhang, Chao
    Ye, Zhiyuan
    [J]. Qinghua Daxue Xuebao/Journal of Tsinghua University, 2017, 57 (10): : 1022 - 1029
  • [4] Detecting use-after-free bugs in embedded C programs
    Wang, Yaxin
    Li, Xiaoqing
    Wu, Gaofei
    Tang, Shijian
    Zhu, Yajie
    Dong, Ting
    [J]. Xi'an Dianzi Keji Daxue Xuebao/Journal of Xidian University, 2021, 48 (01): : 124 - 132
  • [5] Static Detection of Use-After-Free Vulnerability in Binaries via Constrained Path-Sensitive Value-Set Analysis
    Wu, Tianjun
    Yang, Yuexiang
    [J]. BASIC & CLINICAL PHARMACOLOGY & TOXICOLOGY, 2019, 124 : 140 - 140
  • [6] DangSan: Scalable Use-after-free Detection
    van der Kouwe, Erik
    Nigade, Vinod
    Giuffrida, Cristiano
    [J]. PROCEEDINGS OF THE TWELFTH EUROPEAN CONFERENCE ON COMPUTER SYSTEMS (EUROSYS 2017), 2017, : 405 - 419
  • [7] UFO: Predictive Concurrency Use-After-Free Detection
    Huang, Jeff
    [J]. PROCEEDINGS 2018 IEEE/ACM 40TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE), 2018, : 609 - 619
  • [8] Effective Static Analysis of Concurrency Use-After-Free Bugs in Linux Device Drivers
    Bai, Jia-Ju
    Lawall, Julia
    Chen, Qiu-Liang
    Hu, Shi-Min
    [J]. PROCEEDINGS OF THE 2019 USENIX ANNUAL TECHNICAL CONFERENCE, 2019, : 255 - 268
  • [9] Use-After-Free Mitigation via Protected Heap Allocation
    Zhang, Mingbo
    Zonouz, Saman
    [J]. 2018 IEEE CONFERENCE ON DEPENDABLE AND SECURE COMPUTING (DSC), 2018, : 131 - 138
  • [10] A Survey of Detection Methods for Software Use-After-Free Vulnerability
    Lu, Faming
    Tang, Mengfan
    Bao, Yunxia
    Wang, Xiaoyu
    [J]. DATA SCIENCE (ICPCSEE 2022), PT II, 2022, 1629 : 272 - 297