Despite decades of efforts to resolve, memory safety violations are still persistent and problematic in modern systems. Various defense mechanisms have been proposed, but their deployment in real systems remains challenging because of performance, security, or compatibility concerns. In this paper, we propose RV-CURE, a RISC-V capability architecture that implements full-system support for full memory safety. For capability enforcement, we first propose a compiler technique, data-pointer tagging (DPT), applicable to protecting all memory types. It inserts a pointer tag in a pointer address and associates that tag with the pointer's capability metadata. DPT enforces a capability check for every memory access by a tagged pointer and thereby prevents illegitimate memory accesses. Furthermore, we investigate and present lightweight hardware extensions for DPT based on the open-source RISC-V BOOM processor. We observe that a capability-execution pipeline can be implemented in parallel with the existing memory-execution pipeline without intrusive modifications. With our seamless hardware integration, we achieve low-cost capability checks transparently performed in hardware. Altogether, we prototype RV-CURE as a synthesized RTL processor and conduct full-system evaluations on FPGAs running Linux OS. Our evaluations show that RV-CURE achieves strong memory safety at a 10.8% slowdown across the SPEC 2017 C/C++ workloads.
翻译:尽管经过数十年的努力解决,内存安全违规问题在现代系统中仍然持续存在且难以应对。研究者提出了多种防御机制,但由于性能、安全或兼容性方面的顾虑,这些机制在实际系统中的部署仍面临挑战。本文提出RV-CURE——一种RISC-V能力架构,实现了全系统支持的全面内存安全。在能力强制机制方面,我们首先提出一种适用于保护所有内存类型的编译器技术——数据指针标记(DPT)。该技术在指针地址中插入指针标签,并将该标签与指针的能力元数据关联。DPT通过标记指针为每次内存访问强制进行能力检查,从而阻止非法内存访问。此外,我们基于开源RISC-V BOOM处理器研究并提出了轻量级硬件扩展方案。我们观察到,能力执行流水线可与现有内存执行流水线并行实现,无需侵入式修改。通过无缝硬件集成,我们实现了在硬件中透明执行的低成本能力检查。最终,我们以综合RTL处理器为原型实现RV-CURE,并在运行Linux操作系统的FPGA上进行全系统评估。评估表明,RV-CURE在SPEC 2017 C/C++基准测试中仅以10.8%的性能开销实现了强大的内存安全保护。