paperbot · PL 论文追踪

全部论文 待读 收藏

P2 BOGO

BOGO:在 MPX 空间安全之上复用边界元数据的轻量级完整内存安全
ASPLOS Proceedings of the Twenty-Fourth International Conference on Architectural Support for Programming Languages and Operating Systems2019匹配度 1/10 · 该论文聚焦于利用 Intel MPX 实现运行时内存安全(空间与时间安全),属于系统安全与运行时管理方向,不涉及静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析,与用户当前研究画像几乎无交集。引用 47 inbox
Tong Zhang, Dongyoon Lee, Changhee Jung
crossref: 2026-09-12

AI 速览

一句话:复用 Intel MPX 的边界元数据来同时提供空间与时间安全,以低开销实现完整内存安全。

内存安全违规包括越界访问(空间安全)与释放后使用(时间安全)。Intel 的 Memory Protection Extensions(MPX)提供硬件加速的边界检查,但只保证空间安全,不提供时间安全。本文提出 BOGO,一个透明的轻量级完整内存安全方案:它在 MPX 的空间安全之上补充时间安全,而不维护额外的元数据,而是复用 MPX 已有的边界元数据。在 free 时,BOGO 扫描 MPX 边界表并使悬垂指针的边界失效,此后对悬垂指针的使用会被 MPX 直接报告为越界错误。由于全表扫描代价过高,BOGO 只跟踪少量热 MPX 边界表页在 free 时检查,并借助页错误机制捕获可能漏掉的悬垂指针,从而保证时间安全保护的可靠性(soundness)。在 SPEC CPU 2006 基准上,BOGO 以 60% 运行时开销与 36% 内存开销提供完整内存安全;在最坏情况下 malloc/free 密集的基准上为 2.7 倍减速,对真实应用仅有约 1.34 倍开销。

问题
Intel MPX 只提供硬件加速的空间安全(越界检查),无法检测释放后使用等时间安全违规;而单独为时间安全维护元数据会带来高昂开销。
方法
BOGO 复用 MPX 的边界元数据统一支持空间与时间安全:在 free 时扫描 MPX 边界表使悬垂指针的边界失效,使其后续使用被 MPX 当作越界错误捕获;为控制扫描成本,只跟踪少量热的边界表页,并利用页错误机制兜底以保证不漏检。
评估
在 SPEC CPU 2006 上测得 60% 运行时开销与 36% 内存开销;最坏情况下 malloc/free 密集型基准减速 2.7 倍,真实应用开销约 1.34 倍。
原文摘要(Abstract)

A memory safety violation occurs when a program has an out-of-bound (spatial safety) or use-after-free (temporal safety) memory access. Given its importance as a security vulnerability, recent Intel processors support hardware-accelerated bound checks, called Memory Protection Extensions (MPX). Unfortunately, MPX provides no temporal safety. This paper presents BOGO, a lightweight full memory safety enforcement scheme that transparently guarantees temporal safety on top of MPX's spatial safety. Instead of tracking separate metadata for temporal safety, BOGO reuses the bounds metadata maintained by MPX for both spatial and temporal safety. On free, BOGO scans the MPX bound tables to invalidate the bound of dangling pointers; any following use-after-free error can be detected by MPX as an out-of-bound error. Since scanning the entire MPX bound tables could be expensive, BOGO tracks a small set of hot MPX bound table pages to check on free, and relies on the page fault mechanism to detect any potentially missing dangling pointer, ensuring sound temporal safety protection. Our evaluation shows that BOGO provides full memory safety at 60% runtime overhead and at 36% memory overhead for SPEC CPU 2006 benchmarks. We also show that BOGO incurs reasonable 2.7x slowdown for the worst-case malloc-free intensive benchmarks; and moderate 1.34x overhead for real-world applications.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot4872,
  title = {BOGO},
  author = {Tong Zhang and Dongyoon Lee and Changhee Jung},
  booktitle = {ASPLOS},
  year = {2019},
  doi = {10.1145/3297858.3304017}
}