Isolating sensitive data and state 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 page-based hardware isolation can be used, because the cost of kernel- or hypervisor-mediated domain switching is tolerable. However, some applications, such as isolating cryptographic session keys in a network-facing application or isolating frequently invoked native libraries in managed runtimes, require very frequent domain switching. In such applications, the overhead of kernel- or hypervisormediated domain switching is prohibitive. In this paper, we present ERIM, a novel technique that provides hardware-enforced isolation with low overhead, even at high switching rates (ERIM's average overhead is less than 1% for 100,000 switches per second). The key idea is to combine memory protection keys (MPKs), a feature recently added to Intel CPUs 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.
翻译:隔离敏感数据和状态可以提高许多应用程序的安全和稳健性。 例如保护加密密钥, 防止像 OpenSSL 的“ 心脏错误” 那样的开发, 或保护语言运行时间不受本地图书馆以不安全语言撰写的开发。 当运行时, 相对不频繁地出现跨越隔离边界的情况时, 可以使用基于页面的硬件隔离, 因为内核或超高视屏的网域切换成本不高。 但是, 一些应用程序, 如在网络屏蔽应用程序中隔离加密会话键, 或者在管理运行时隔离经常引用的本地图书馆, 需要非常频繁的域切换 。 在这类应用程序中, 内核或超高视屏的域端切换时间的顶部非常高。 在本文中, 我们展示一种新技术, 硬件强制隔离, 即使是在高开关率( ERIM 平均管理费用在每秒100,000 开关中不到1% ) 。 关键的想法是将存储保护密钥( MPKs), 最近在 Intel CPU 中添加了一种特性, 允许用户空间的保护域切换开关,,, 使用双盘检查是高的操作检查 避免 。