RISC-V is a promising open-source architecture primarily targeted for embedded systems. Programs compiled using the RISC-V toolchain can run bare-metal on the system, and, as such, can be vulnerable to several memory corruption vulnerabilities. In this work, we present HeapSafe, a lightweight hardware assisted heap-buffer protection scheme to mitigate heap overflow and use-after-free vulnerabilities in a RISC-V SoC. The proposed scheme tags pointers associated with heap buffers with metadata indices and enforces tag propagation for commonly used pointer operations. The HeapSafe hardware is decoupled from the core and is designed as a configurable coprocessor and is responsible for validating the heap buffer accesses. Benchmark results show a 1.5X performance overhead and 1.59% area overhead, while being 22% faster than a software protection. We further implemented a HeapSafe-nb, an asynchronous validation design, which improves performance by 27% over the synchronous HeapSafe.
翻译:RISC-V是主要针对嵌入系统的很有希望的开放源码结构。 使用RISC-V工具链汇编的程序可以在系统中运行光金属,因此可能容易发生一些记忆腐败的弱点。 在这项工作中,我们介绍了一个轻量硬件辅助堆积缓冲保护计划,即HeapSafe(一个轻巧的硬件辅助堆积-缓冲保护计划),以缓解在RISC-V SoC(一个RISC-V SoC)中的堆积溢出和使用无损的脆弱性。 拟议的计划将与堆积缓冲相关的点标标标与元数据指数挂上,并强制执行常用指针操作的传播标记。 HeapSafe 硬件与核心脱钩,设计成一个可配置共合处理器,负责验证堆积缓冲通道。 基准结果表明,1.5X性能管理费和1.59%的区域管理费比软件保护快22%。 我们还实施了一个Heapsafe-nb(一个非同步的验证设计,使同步的HeapSafe-nb)的性能提高27%的性。