Many applications can benefit from isolating sensitive data in a secure library. Examples include protecting cryptographic keys behind a narrow crypto 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 or hypervisor-mediated domain switching is tolerable. However, some applications, such as isolating session keys in a web server or isolating the safe region in code-pointer integrity (CPI), require very frequent switching. In such applications, the overhead of kernel-based or hypervisor-mediated domain switching is prohibitively high. 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. Our measurements indicate only a small degradation in performance, even with very high rates of switching between the untrusted application and the secure library.
翻译:在安全的图书馆中将敏感数据隔离开来,许多应用程序可以获益于在安全的图书馆中将敏感数据隔离开来。示例包括保护窄小加密 API 背后的加密密钥,以抵御脆弱性,如 OpenSSL 的心脏错误。当这种图书馆被称作相对不常见时,可以使用基于页面的硬件隔离,因为内核介质或超高视场介质的域转换成本是可以承受的。但是,有些应用程序,例如网络服务器中孤立会话键或将安全区域隔离在代码点完整性中(CPI),需要非常频繁地切换。在这种应用程序中,内核或超视镜介质域转换的域转换的间接费用过高。在本文中,我们提出ERIM,一种新技术,即使在高切换率(ERIM 的10万开关的平均管理费低于1% ) 。关键的想法是将存储保护密钥(MPKs)合并起来,这是Intel CPUs最近添加的一种特性,允许用户空间中允许保护域开关,同时进行二手检查以防止绕开关。我们的测量仅显示小退化,即使在图书馆之间也非常高的应用程序。我们的测量显示小的降解。