MineSweeper: A "Clean Sweep" for Drop-In Use-after-Free Prevention

被引:7
作者
Erdos, Marton [1 ]
Ainsworth, Sam [2 ]
Jones, Timothy M. [1 ]
机构
[1] Univ Cambridge, Cambridge, England
[2] Univ Edinburgh, Edinburgh, Midlothian, Scotland
来源
ASPLOS '22: PROCEEDINGS OF THE 27TH ACM INTERNATIONAL CONFERENCE ON ARCHITECTURAL SUPPORT FOR PROGRAMMING LANGUAGES AND OPERATING SYSTEMS | 2022年
基金
英国工程与自然科学研究理事会;
关键词
temporal safety; use-after-free; programming language security;
D O I
10.1145/3503222.3507712
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Low-level languages, which require manual memory management from the programmer, remain in wide use for performance-critical applications. Memory-safety bugs are common, and now a major source of exploits. In particular, a use-after-free bug occurs when an object is erroneously deallocated, whilst pointers to it remain active in memory, and those (dangling) pointers are later used to access the object. An attacker can reallocate the memory area backing an erroneously freed object, then overwrite its contents, injecting carefully chosen data into the host program, thus altering its execution and achieving privilege escalation. We present MineSweeper, a system to mitigate use-after-free vulnerabilities by retaining freed allocations in a quarantine, until no pointers to them remain in program memory, thus preventing their reallocation until it is safe. MineSweeper performs efficient linear sweeps of memory to identify quarantined items that have no dangling pointers to them, and thus can be safely reallocated. This allows MineSweeper to be significantly more efficient than previous transitive marking procedure techniques. MineSweeper, attached to JeMalloc, improves security at an acceptable overhead in memory footprint (11.1% on average) and an execution-time cost of only 5.4% (geometric mean for SPEC CPU2006), with 9.6% additional threaded CPU usage. These figures considerably improve on the state-of-the-art for non-probabilistic drop-in temporal-safety systems, and make MineSweeper the only such scheme suitable for deployment in real-world production environments.
引用
收藏
页码:212 / 225
页数:14
相关论文
共 43 条
[1]   MarkUs: Drop-in use-after-free prevention for low-level languages [J].
Ainsworth, Sam ;
Jones, Timothy M. .
2020 IEEE SYMPOSIUM ON SECURITY AND PRIVACY (SP 2020), 2020, :578-591
[2]  
Ainsworth Sam, 2020, EXPT ARTEFACT MARKUS
[3]  
Akritidis P., 2010, 19 USENIX SEC S, P177
[4]  
[Anonymous], 2001, Advanced return-into-lib
[5]  
ARM, 2019, Memory tagging extension
[6]   Sound Garbage Collection for C using Pointer Provenance [J].
Banerjee, Subarno ;
Devecsery, David ;
Chen, Peter M. ;
Narayanasamy, Satish .
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2020, 4 (OOPSLA)
[7]  
Berger ED, 2006, ACM SIGPLAN NOTICES, V41, P158, DOI 10.1145/1133981.1134000
[8]   Bounding space usage of conservative garbage collectors [J].
Boehm, HJ .
ACM SIGPLAN NOTICES, 2002, 37 (01) :93-100
[9]  
BOEHM HJ, 1991, SIGPLAN NOTICES, V26, P157
[10]   SPEC CPU2017-Next-Generation Compute Benchmark [J].
Bucek, James ;
Lange, Klaus-Dieter ;
von Kistowski, Joakim .
COMPANION OF THE 2018 ACM/SPEC INTERNATIONAL CONFERENCE ON PERFORMANCE ENGINEERING (ICPE '18), 2018, :41-42