Skip to main content
QUICK REVIEW

[论文解读] ERIM: Secure and Efficient In-process Isolation with Memory Protection Keys

Anjo Vahldiek-Oberwagner, Eslam Elnikety|arXiv (Cornell University)|Jan 21, 2018
Security and Verification in Computing参考文献 24被引用 16
一句话总结

ERIM 引入了一种高性能、硬件保护的进程内隔离技术,利用英特尔的内存保护键(MPK)和二进制重写,实现对不受信任的应用程序与受信任的安全库之间的安全、频繁切换。该技术实现了接近 ASLR 的性能,同时具备强硬件强制隔离,支持每个 CPU 核心每秒高达一百万次安全访问,性能开销可忽略不计。

ABSTRACT

Many applications can benefit from isolating sensitive data in a secure library. Examples include protecting cryptographic keys behind a narrow cryptography API to defend against vulnerabilities like OpenSSL's Heartbleed bug. When such a library is called relatively infrequently, page-based hardware isolation can be used, because the cost of kernel-mediated domain switching is tolerable. However, some applications require very frequent domain switching, such as isolating code pointers to prevent control flow hijack attacks in code-pointer integrity (CPI). These applications have relied on weaker isolation techniques like address-space layout randomization (ASLR), which allow efficient switching but have proved vulnerable to attack. In this paper, we present ERIM, a novel technique that combines the security of hardware-enforced isolation with a switching performance near that of ASRL. ERIM can support sensitive data access up to a million times per CPU core a second with low overhead. The key idea is to combine memory protection keys (MPKs), a feature recently added to Intel CPUs, with binary rewriting to prevent circumvention. ERIM provides three primitives: isolation, call gates, and syscall mediation. We show how to apply ERIM to isolate frequently accessed session keys (not just the long-term keys) in nginx, a high performance web server, and how to isolate sensitive data in CPI. Our measurements indicate a negligible degradation in performance, even with very high rates of switching between the untrusted application and the secure library.

研究动机与目标

  • 解决传统基于页的隔离在高频安全访问场景下的性能瓶颈问题。
  • 克服地址空间布局随机化(ASLR)在控制流完整性与加密密钥保护方面的安全局限性。
  • 为 Web 服务器和 CPI 系统等性能关键型应用中的敏感数据提供高效、硬件保护的隔离机制。
  • 设计一种兼具强隔离保证与低切换成本的系统,适用于频繁、细粒度的安全调用。
  • 为现有高性能软件栈提供一种实用且可部署的敏感数据保护解决方案。

提出的方法

  • 利用英特尔的内存保护键(MPK)在不受信任的应用程序代码与安全库之间强制执行硬件级内存隔离。
  • 使用二进制重写技术对应用程序进行插桩,强制正确使用 MPK 指令,防止恶意代码绕过保护机制。
  • 引入三种核心原语:隔离(内存保护)、调用门(受控转换)和系统调用中介(安全的系统调用处理)。
  • 在编译时将基于 MPK 的隔离集成到应用程序二进制文件中,确保所有对敏感数据的访问均通过受监控的、安全的转换路径进行。
  • 设计系统以最小化陷阱和特权切换开销,实现在频繁切换场景下的近似 ASLR 性能。
  • 将该技术应用于真实工作负载,包括用于会话密钥保护的 nginx 和代码指针完整性(CPI)系统。

实验结果

研究问题

  • RQ1硬件强制隔离是否足够高效,能够支持每秒高达一百万次的频繁安全调用,而不会造成显著性能下降?
  • RQ2如何有效结合内存保护键(MPK)与二进制重写技术,防止攻击并确保隔离正确性?
  • RQ3在高频安全操作场景下,基于 MPK 的隔离在安全性和性能方面相较于 ASLR 的优势有多大?
  • RQ4ERIM 是否能有效部署于真实世界中的高性能系统(如 nginx),而不会引入不可接受的性能开销?
  • RQ5ERIM 的设计如何防止通过代码重用或权限提升攻击绕过隔离机制?

主要发现

  • ERIM 实现了每秒高达一百万次的安全访问,性能接近 ASLR,同时具备强硬件隔离能力。
  • 即使在极端工作负载下,ERIM 的性能开销也可忽略不计,高频场景下的性能下降测量值低于 1%。
  • 二进制重写技术有效防止了恶意代码绕过 MPK 保护,确保了隔离机制的完整性。
  • ERIM 在 nginx 中成功保护了会话密钥,证明了其在真实世界高性能 Web 服务器中的实际适用性。
  • 该系统在维持强隔离保证的同时,实现了不受信任代码区域与受信任代码区域之间高效、频繁的切换。
  • ERIM 的设计为加密密钥管理与控制流完整性(CPI)用例均提供了安全、低开销的隔离机制。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

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