xTag:通过英特尔x86-64上基于软件的指针标记来缓解释放后修复漏洞
xTag: Mitigating Use-After-Free Vulnerabilities via Software-Based Pointer Tagging on Intel x86-64
摘要:
在以不安全的程序设计语言(如C/C++)实现的复杂应用中,存储器安全在实践中仍然是一个未解决的问题。过去已经提出了许多不同类型的防御来缓解这个问题。最有希望的下一步是硬件和软件级别的更紧密集成:现代缓解技术要么使用硬件扩展加速,要么通过ISA的扩展在硬件中实现。特别是,ARM或ARM提出的内存标记有望解决实际内存安全的许多问题。不幸的是,Intel x86-64代表了桌面和服务器领域最重要的ISA,它缺乏对硬件加速内存标记的支持,因此内存标记被认为对该平台不实用。在本文中,我们提出了一个有效的,软件的指针标记计划的Intel x86-64的基础上,一种新的元数据嵌入方案的设计和实现。其基本思想是将多个虚拟页别名化为一个物理页,以便我们可以有效地将标记位嵌入到指针中。此外,我们介绍了几个优化,显着降低这种方法的内存标记的性能影响。基于此方案,我们提出了一种新的使用后免费缓解方案,称为xTag,提供更好的性能和强大的安全性能相比,国家的最先进的方法。我们还展示了如何减轻双重自由的漏洞。我们的方法是高度兼容的,允许指针在插装和非插装代码之间来回传递,而不会丢失元数据,它甚至与内联汇编兼容。我们的结论是,在我们的内存标记方案之上构建漏洞缓解机制在Intel x86-64上是可行的,这一点可以通过有效防止Firefox Web浏览器中的释放后使用漏洞来证明。
英文摘要:
Memory safety in complex applications implemented in unsafe programming languages such as C/C++ is still an unresolved problem in practice. Many different types of defenses have been proposed in the past to mitigate this problem. The most promising next step is a tighter integration of the hardware and software level: modern mitigation techniques are either accelerated using hardware extensions or implemented in the hardware by extensions of the ISA. In particular, memory tagging, as proposed by ARM or SPARC, promises to solve many issues for practical memory safety. Unfortunately, Intel x86-64, which represents the most important ISA for both the desktop and server domain, lacks support for hardware-accelerated memory tagging, so memory tagging is not considered practical for this platform. In this paper, we present the design and implementation of an efficient, software-only pointer tagging scheme for Intel x86-64 based on a novel metadata embedding scheme. The basic idea is to alias multiple virtual pages to one physical page so that we can efficiently embed tag bits into a pointer. Furthermore, we introduce several optimizations that significantly reduce the performance impact of this approach to memory tagging. Based on this scheme, we propose a novel use-after-free mitigation scheme, called xTag, that offers better performance and strong security properties compared to state-of-the-art methods. We also show how double-free vulnerabilities can be mitigated. Our approach is highly compatible, allowing pointers to be passed back and forth between instrumented and non-instrumented code without losing metadata, and it is even compatible with inline assembly. We conclude that building exploit mitigation mechanisms on top of our memory tagging scheme is feasible on Intel x86-64, as demonstrated by the effective prevention of use-after-free bugs in the Firefox web browser.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。