[论文解读] PTAuth: Temporal Memory Safety via Robust Points-to Authentication
PTAuth 是一种硬件辅助的运行时系统,通过在 ARMv8.3+ 架构上使用指针认证码(PAC)检测所有类型的堆内存时间性内存损坏——如使用已释放内存、重复释放和无效释放。通过在指针和内存中的对象 ID 中内联嵌入加密认证码(AC),PTAuth 在每次解引用时实现高效、受元数据完整性保护的检查,实现 100% 检测率,仅带来 26% 的性能开销(软件模拟 PAC),以及 2% 的内存开销。
Temporal memory corruptions are commonly exploited software vulnerabilities that can lead to powerful attacks. Despite significant progress made by decades of research on mitigation techniques, existing countermeasures fall short due to either limited coverage or overly high overhead. Furthermore, they require external mechanisms (e.g., spatial memory safety) to protect their metadata. Otherwise, their protection can be bypassed or disabled. To address these limitations, we present robust points-to authentication, a novel runtime scheme for detecting all kinds of temporal memory corruptions. We built a prototype system, called PTAuth, that realizes this scheme on ARM architectures. PTAuth contains a customized compiler for code analysis and instrumentation and a runtime library for performing the points-to authentication as a protected program runs. PTAuth leverages the Pointer Authentication Code (PAC) feature, provided by the ARMv8.3 and later CPUs, which serves as a simple hardware-based encryption primitive. PTAuth uses minimal in-memory metadata and protects its metadata without requiring spatial memory safety. We report our evaluation of PTAuth in terms of security, robustness and performance using 150 vulnerable programs from Juliet test suite and the SPEC CPU2006 benchmarks. PTAuth detects all three categories of heap-based temporal memory corruptions, generates zero false alerts, and slows down program execution by 26% (this number was measured based on software-emulated PAC; it is expected to decrease to 20% when using hardware-based PAC). We also show that PTAuth incurs 2% memory overhead thanks to the efficient use of metadata.
研究动机与目标
- 为解决现有时间性内存损坏检测技术的局限性,这些技术通常需要空间内存安全、开销高或覆盖范围有限。
- 设计一种运行时系统,检测所有类型的堆内存时间性内存损坏,而无需依赖外部空间安全机制。
- 最小化元数据大小并优化元数据布局,以提升性能并兼容指针传播。
- 利用硬件辅助的指针认证码(PAC)保护元数据完整性,而无需额外的空间安全机制。
- 在真实工作负载中实现高检测精度,同时保持低性能和内存开销。
提出的方法
- PTAuth 为每个堆分配的对象分配一个唯一 ID,并将其存储在对象的基地址处。
- 它使用密钥、对象 ID 和基地址计算加密认证码(AC),并通过 ARM 的指针认证码(PAC)功能将 AC 嵌入指针的未使用位中。
- 在每次指针解引用时,PTAuth 重新计算 AC 并与存储值进行验证,以检测篡改或非法使用。
- 系统使用定制编译器在代码中插入内联检查,并通过运行时库管理 AC 的生成与验证。
- 操作系统的补丁配置 PAC 设置,以支持所需的指针认证语义。
- 元数据完整性通过 PAC 的硬件级签名得到保障,使得伪造或损坏的元数据可在不依赖空间内存安全的情况下被检测到。
实验结果
研究问题
- RQ1是否可以设计一种运行时系统,在不依赖外部空间内存安全的前提下,检测所有形式的堆内存时间性内存损坏?
- RQ2是否可以仅通过硬件辅助的指针认证,实现高检测精度并保持极低的性能和内存开销?
- RQ3如何高效地存储和验证元数据,以支持指针解引用检查,同时不增加攻击面?
- RQ4是否可以使内嵌在指针和对象中的内联元数据在抵抗损坏的同时保持高性能?
- RQ5使用 PAC 实现指针的统一完整性与身份验证检查的系统,在实际性能和内存开销方面表现如何?
主要发现
- PTAuth 在 Juliet 测试套件中的 150 个存在漏洞的程序上,对三类堆内存时间性内存损坏——使用已释放内存、重复释放和无效释放——实现了 100% 的检测准确率。
- 在评估过程中,系统未产生任何误报或漏报,表明检测精度和召回率均达到完美水平。
- 在软件模拟 PAC 的情况下,PTAuth 平均性能开销为 26%,预计使用原生硬件 PAC 后可降低至 20%。
- 内存开销仅为 2%,这是由于元数据(对象 ID 和 PAC 标签)极小且布局高效。
- PTAuth 的元数据保护对篡改具有强鲁棒性,因为 PAC 确保在验证期间可检测到对 AC 或 ID 的任何修改。
- 该系统对试图绕过元数据保护的攻击具有抗性,因为 AC 计算中的密钥可防止未经授权者伪造元数据。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。