Memory safety bugs remain in the top ranks of security vulnerabilities, even after decades of research on their detection and prevention. Various mitigations have been proposed for C/C++, ranging from language dialects to instrumentation. Among these, compiler-based instrumentation is particularly promising, not requiring manual code modifications and being able to achieve precise memory safety. Unfortunately, existing compiler-based solutions compromise in many areas, including performance but also usability and memory safety guarantees. New developments in hardware can help improve performance and security of compiler-based memory safety. ARM Pointer Authentication, added in the ARMv8.3 architecture, is intended to enable hardware-assisted Control Flow Integrity. But since its operations are relatively generic, it also enables other, more comprehensive hardware-supported runtime integrity approaches. As such, we propose PACSafe, a memory safety approach based on ARM Pointer Authentication. PACSafe uses pointer signatures to retrofit full memory safety to C/C++ programs, protecting heap, stack, and globals against temporal and spatial vulnerabilities. We present a full, LLVM-based prototype implementation, running on an M1 MacBook Pro, i.e., on actual ARMv8.3 hardware. Our prototype evaluation shows that the system outperforms similar approaches under real-world conditions. This, together with its compatibility with uninstrumented libraries and cryptographic protection against attacks on metadata, makes PACSafe a viable solution for retrofitting memory safety to C/C++ programs.
翻译:即便经过数十年的检测和预防研究后,内存安全漏洞仍然处于安全弱点的顶层。C/C+++建议采取各种缓解措施,从语言方言到仪表,其中,基于编译器的仪表特别有希望,不需要人工代码修改,也能够实现准确的内存安全。不幸的是,许多领域现有的基于编译器的解决方案折中,包括性能,但也包括可用性和记忆安全保障。硬件方面的新发展有助于改进编译器内存安全性和安全性。ARM点点认证(在ARMV8.3结构中添加),意在实现硬件辅助控制流程完整性。但自其操作相对通用以来,它也为其他更为全面的基于硬件的运行时间完整性方法提供了特别的机会。因此,我们建议采用基于编译器的内存安全方法,即基于性能的软件,即使用指向C/C+程序改写全记忆安全性、保护高容量、堆叠和全球不受时间和空间脆弱性影响。我们用一个完整的、基于LVMMC原型的内存的内存控制流程,在实际的内存系统内,与MAR8的内存系统内,并展示一个真实的系统外的系统。