arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.03373cs.CR
收藏

SeMalloc:语义感知的内存分配器

SeMalloc: Semantics-Informed Memory Allocator

Ruizhe Wang, Meng Xu, N. Asokan

AI总结:

本文提出SeMalloc,一种基于新型SemaType类型的内存分配器,通过传递堆对象语义来平衡UAF防护中的安全性、运行时与内存开销,有效阻止类型混淆并使UAF更难以利用。

摘要:

释放后使用(UAF)是内存不安全语言中一个严重且普遍的问题。尽管已经提出了许多解决方案,但在安全性、运行时开销和内存开销之间取得平衡(一个不可能的三元组)是困难的。在本文中,我们展示了一种通过向分配器传递更多关于堆对象的语义,使其做出明智分配决策来平衡这个三元组的方法。更具体地说,我们提出了一种新的线程、上下文和流敏感的“类型”概念——SemaType,以捕获语义,并原型化了一个基于SemaType的分配器,旨在实现不可能三元组中的最佳权衡。在SeMalloc中,只有从相同调用点并通过相同函数调用栈分配的堆对象才可能共享虚拟内存地址,这有效地阻止了类型混淆攻击,并使UAF漏洞更难以利用。通过广泛的实证评估,我们表明SeMalloc是现实可行的:(a)SeMalloc能有效阻止我们测试的所有真实世界漏洞;(b)基准程序使用SeMalloc运行甚至比使用默认堆分配器稍快,内存开销平均在41%到84%之间;(c)SeMalloc在安全性和开销之间的平衡严格优于其他密切相关的工作。

英文摘要:

Use-after-free (UAF) is a critical and prevalent problem in memory unsafe languages. While many solutions have been proposed, balancing security, run-time cost, and memory overhead (an impossible trinity) is hard. In this paper, we show one way to balance the trinity by passing more semantics about the heap object to the allocator for it to make informed allocation decisions. More specifically, we propose a new notion of thread-, context-, and flow-sensitive "type", SemaType, to capture the semantics and prototype a SemaType-based allocator that aims for the best trade-off amongst the impossible trinity. In SeMalloc, only heap objects allocated from the same call site and via the same function call stack can possibly share a virtual memory address, which effectively stops type-confusion attacks and makes UAF vulnerabilities harder to exploit. Through extensive empirical evaluation, we show that SeMalloc is realistic: (a) SeMalloc is effective in thwarting all real-world vulnerabilities we tested; (b) benchmark programs run even slightly faster with SeMalloc than the default heap allocator, at a memory overhead averaged from 41% to 84%; and (c) SeMalloc balances security and overhead strictly better than other closely related works.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑