Enhancing a Lock-and-Key Scheme With MTE to Mitigate Use-After-Frees

被引:0
|
作者
Bang, Inyoung [1 ]
Kayondo, Martin [1 ]
You, Junseung [1 ]
Kwon, Donghyun [2 ]
Cho, Yeongpil [3 ]
Paek, Yunheung [1 ]
机构
[1] Seoul Natl Univ, Interuniv Semicond Res Ctr, Dept Elect & Comp Engn, Seoul 08826, South Korea
[2] Pusan Natl Univ, Sch Comp Sci & Engn, Busan 46241, South Korea
[3] Hanyang Univ, Dept Comp Sci, Seoul 04763, South Korea
关键词
Hardware; memory management; memory safety; security; tagging architecture; temporal safety;
D O I
10.1109/ACCESS.2023.3343777
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Preventing Use-After-Free (UAF) bugs is crucial to ensure temporal memory safety. Against UAF attacks, much research has adopted a well-known approach, lock-and-key, in which unique, disposable locks and keys are first assigned respectively to objects and pointers, and then on every memory access, checked for a match. Attention has been drawn again to this approach by recent work that capitalizes on a vast abundance of virtual address (VA) space in the lock assignment, thus being able to prevent UAFs in stripped binary. However, as this VA-based lock-and-key scheme tends to rapidly consume virtual space, it is likely to suffer from high performance overhead. In this paper, we propose a new scheme, called the VA tagging, whose goal is to tackle this performance problem with the support of the Memory Tagging Architecture (MTA) introduced in several commodity processors. In our scheme, the original VA-based locks are augmented with tags of MTA. As a VA-based lock can be assigned to multiple objects with different tags, the same VA is reused for many objects without compromising temporal safety. We have observed in our experiments that this tagging scheme lowers the VA consumption rate drastically by one order of magnitude. We implement a light-weight memory allocator, Vatalloc, by modifying existing allocators, dlmalloc and jemalloc, to employ the VA tagging scheme for efficient prevention of UAFs. Our evaluation shows that Vatalloc with allocator modifications only incurs 1.70% (on dlmalloc) and 3.05% (on jemalloc) of runtime overhead without considering performance degradation of MTE. As a result of simulating the tagging architecture assuming the worst-case, postulating MTE precise trapping mode incurs performance overhead of 30.9% based on dlmalloc, and 25.5% based on jemalloc. If imprecise mode is assumed, the slowdown is measured 16.9% for dlmalloc and 12.0% for jemalloc respectively. Vatalloc only incurs 19.0% and 3.0% memory overhead for dlmalloc and jemalloc respectively.
引用
收藏
页码:5462 / 5476
页数:15
相关论文
empty
未找到相关数据