Mon CHÉRI:利用条件能力缓解未初始化内存访问
Mon CHÉRI: Mitigating Uninitialized Memory Access with Conditional Capabilities
AI总结:
本研究针对 C/C++ 中未初始化变量导致的内存安全漏洞,提出扩展 CHERI 能力模型引入“条件能力”,在硬件架构层面实现“先写后读”等策略,以高检测精度和约 3.5% 的低开销有效缓解未初始化内存访问问题。
摘要:
在 C 和 C++ 等语言中,高达 10% 的内存安全漏洞源于未初始化变量。本研究针对未初始化内存问题的普遍性及缺乏适当软件缓解措施的现状,提出硬件层面的架构保护。基于能力的寻址机制(如剑桥大学的 CHERI)缓解了许多内存缺陷,包括架构层面的空间和时间安全违规。然而,CHERI 无法处理未初始化变量引发的未定义行为。我们扩展了 CHERI 能力模型以包含“条件能力”,从而支持基于先前操作的内存访问策略。这允许执行满足内存安全目标的策略,例如“若无至少一次先前写入则禁止读取内存”(Write-before-Read)。我们提出了架构扩展、编译器支持,并在 QEMU 全系统模拟器和修改后的基于 FPGA 的 CHERI-RISCV 软核上对方法进行了详细评估。评估表明,条件能力具有实用性,检测准确率高,且仅增加约 3.5% 的开销,与基线 CHERI 能力的成本相当。
英文摘要:
Up to 10% of memory-safety vulnerabilities in languages like C and C++ stem from uninitialized variables. This work addresses the prevalence and lack of adequate software mitigations for uninitialized memory issues, proposing architectural protections in hardware. Capability-based addressing, such as the University of Cambridge's CHERI, mitigates many memory defects, including spatial and temporal safety violations at an architectural level. CHERI, however, does not handle undefined behavior from uninitialized variables. We extend the CHERI capability model to include "conditional capabilities", enabling memory-access policies based on prior operations. This allows enforcement of policies that satisfy memory-safety objectives such as "no reads to memory without at least one prior write" (Write-before-Read). We present our architecture extension, compiler support, and detailed evaluation of our approach on the QEMU full-system simulator and a modified FPGA-based CHERI-RISCV softcore. Our evaluation shows conditional capabilities are practical, with high detection accuracy while adding a small (~3.5%) overhead which is comparable to the cost of baseline CHERI capabilities.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。