Skip to main content
QUICK REVIEW

[论文解读] Intel MPX Explained: An Empirical Study of Intel MPX and Software-based Bounds Checking Approaches

Oleksii Oleksenko, Dmitrii Kuvaiskii|arXiv (Cornell University)|Feb 2, 2017
Security and Verification in Computing参考文献 30被引用 43
一句话总结

本文评估了英特尔MPX(一种用于C/C++程序的硬件辅助边界检查扩展),并与基于软件的解决方案(如AddressSanitizer、SoftBound和SAFECode)进行比较。尽管其在空间错误防护方面表现强劲,但英特尔MPX的性能开销高达约50%(平均值),工具链不成熟,缺乏时间错误检测能力,且在多线程和内存布局灵活性方面存在根本性限制,因此尽管设计前景良好,仍不适用于广泛生产环境。

ABSTRACT

Memory-safety violations are a prevalent cause of both reliability and security vulnerabilities in systems software written in unsafe languages like C/C++. Unfortunately, all the existing software-based solutions to this problem exhibit high performance overheads preventing them from wide adoption in production runs. To address this issue, Intel recently released a new ISA extension - Memory Protection Extensions (Intel MPX), a hardware-assisted full-stack solution to protect against memory safety violations. In this work, we perform an exhaustive study of the Intel MPX architecture to understand its advantages and caveats. We base our study along three dimensions: (a) performance overheads, (b) security guarantees, and (c) usability issues. To put our results in perspective, we compare Intel MPX with three prominent software-based approaches: (1) trip-wire - AddressSanitizer, (2) object-based - SAFECode, and (3) pointer-based - SoftBound. Our main conclusion is that Intel MPX is a promising technique that is not yet practical for widespread adoption. Intel MPX's performance overheads are still high (roughly 50% on average), and the supporting infrastructure has bugs which may cause compilation or runtime errors. Moreover, we showcase the design limitations of Intel MPX: it cannot detect temporal errors, may have false positives and false negatives in multithreaded code, and its restrictions on memory layout require substantial code changes for some programs.

研究动机与目标

  • 评估英特尔MPX在真实系统中的性能、安全保证和可用性。
  • 将英特尔MPX与三种主流基于软件的边界检查技术(AddressSanitizer(三重检测器)、SoftBound(指针基于)和SAFECode(对象基于))进行比较。
  • 识别阻碍英特尔MPX在生产环境中采用的性能瓶颈、安全漏洞和可用性问题。
  • 评估英特尔MPX是否能为用C/C++编写的系统软件提供实用且低开销的内存安全。

提出的方法

  • 使用来自标准基准测试的多样化真实世界C/C++程序,对英特尔MPX进行了详尽的实证评估。
  • 测量在不同编译器(GCC和ICC)及不同优化级别下的运行时性能开销,并与基于软件的替代方案进行比较。
  • 通过测试对已知内存安全漏洞(包括缓冲区溢出和悬空指针问题)的检测能力,评估安全覆盖范围。
  • 通过识别因内存布局限制或工具链错误导致无法在英特尔MPX下编译或运行的程序,分析其可用性。
  • 研究多线程行为,以检测并发执行场景下的误报和漏报。
  • 使用微基准测试隔离并分析边界检查指令执行和边界寄存器内存访问中的性能瓶颈。

实验结果

研究问题

  • RQ1与AddressSanitizer、SoftBound和SAFECode等基于软件的边界检查解决方案相比,英特尔MPX的实际性能开销是多少?
  • RQ2英特尔MPX在多大程度上能提供对空间和时间内存安全违规行为的防护?
  • RQ3编译器和运行时基础设施的局限性在多大程度上影响了英特尔MPX在实际应用中的可用性和可靠性?
  • RQ4英特尔MPX在多线程和内存布局约束方面存在哪些根本性架构限制?
  • RQ5考虑到其当前的实现状态,英特尔MPX能否被视为生产系统中软件工具的可行替代方案?

主要发现

  • 英特尔MPX的平均运行时性能开销约为50%,主要原因是边界检查指令在单个执行端口上执行效率低下,以及边界寄存器内存访问的昂贵两级地址转换。
  • 支持性编译器基础设施尚不成熟:GCC-MPX的开销最高可达150%,而ICC-MPX存在关键性错误,导致约10%的程序无法正确编译或运行。
  • 英特尔MPX无法防范时间错误(如use-after-free或悬空指针解引用),而SoftBound和SAFECode则提供了某种形式的时间安全防护。
  • 英特尔MPX在多线程程序中同时存在误报和漏报,表明其与并发执行存在根本性不兼容,且若不引入性能惩罚,难以轻易修复。
  • 由于严格的内存布局限制,8–13%的评估程序在未进行大量代码修改的情况下无法正确运行,另有18%的程序需要非侵入式手动修复。
  • 尽管其空间错误检测能力强大,但英特尔MPX尚未达到生产就绪状态;由于性能和可用性更优,AddressSanitizer仍是唯一可行的选择,即使其安全保证较弱。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。