ERIM:使用内存保护密钥(MPK)实现安全、高效的进程内隔离
ERIM: Secure, Efficient In-process Isolation with Memory Protection Keys (MPK)
摘要:
隔离敏感状态和数据可以提高许多应用程序的安全性和健壮性。例子包括保护加密密钥免受OpenSSL的Heartbleed bug等漏洞的攻击,或者保护语言运行时免受用不安全语言编写的本机库的攻击。当跨隔离边界的运行时引用相对不频繁时,则可以使用传统的基于页面的硬件隔离,因为内核或管理程序介导的域切换的成本是可以容忍的。然而,一些应用,例如面向网络的服务中的加密会话密钥的隔离,需要非常频繁的域切换。在这样的应用程序中,内核或管理程序介导的域切换的开销是禁止的。在本文中,我们提出了ERIM,一种新的技术,提供硬件强制隔离与x86 CPU上的低开销,即使在高开关速率(ERIM的测量开销小于1%,每秒100,000开关)。其关键思想是将保护密钥(MPK)与二进制检查结合起来,MPK是最近添加到x86中的一项功能,允许在用户空间中切换保护域,以防止规避。我们表明,ERIM可以应用于新的和现有的应用程序,不需要编译器的变化,可以运行在一个股票Linux内核,并具有低的运行时开销,即使在高域切换率。
英文摘要:
Isolating sensitive state and data can increase the security and robustness of many applications. Examples include protecting cryptographic keys against exploits like OpenSSL's Heartbleed bug or protecting a language runtime from native libraries written in unsafe languages. When runtime references across isolation boundaries occur relatively infrequently, then conventional page-based hardware isolation can be used, because the cost of kernel- or hypervisor-mediated domain switching is tolerable. However, some applications, such as the isolation of cryptographic session keys in network-facing services, require very frequent domain switching. In such applications, the overhead of kernel- or hypervisor-mediated domain switching is prohibitive. In this paper, we present ERIM, a novel technique that provides hardware-enforced isolation with low overhead on x86 CPUs, even at high switching rates (ERIM's measured overhead is less than 1% for 100,000 switches per second). The key idea is to combine protection keys (MPKs), a feature recently added to x86 that allows protection domain switches in userspace, with binary inspection to prevent circumvention. We show that ERIM can be applied with little effort to new and existing applications, doesn't require compiler changes, can run on a stock Linux kernel, and has low runtime overhead even at high domain switching rates.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。