论文标题
RISC-V的有效可密封保护键
Efficient Sealable Protection Keys for RISC-V
论文作者
论文摘要
随着基于软件的攻击数量的持续增加,越来越多的努力将敏感的数据和受信任的软件组件与不信任的第三方组件隔离开来。硬件辅助内部过程内部隔离机制使软件开发人员能够将过程分配为隔离组件,从而从不受信任的组件中安全敏感数据。但是,大多数现有的硬件辅助内部隔离机制(例如ARM和IBM功率)都依赖于昂贵的内核操作来在受信任和未经信任的域之间切换。最近,英特尔引入了一个新的硬件功能,用于内部过程内存隔离,称为内存保护密钥(MPK),该功能使用户空间进程以有效的方式切换域。尽管英特尔MPK的效率使开发人员能够将其利用为常见用例,例如代码销钉完整性,但有限数量的唯一域(16)禁止在需要大量域的OpenSSL中使用其使用。此外,Intel MPK遭受了无用的无用漏洞使用。为了解决这些缺点,在本文中,我们为RISC-V开放ISA(称为Sealpk)提出了一种有效的进程内隔离技术,该技术最多支持1024个独特的域。 SEALPK通过利用懒惰的分配方法来防止保护密钥使用后的无用问题。为了进一步加强Sealpk,我们设计了三个新颖的密封特征,以保护分配的域,相关页面以及它们的权限免受攻击者的修改或篡改。为了证明我们的设计的可行性,我们在RISC-V火箭处理器上实现Sealpk,为其提供操作系统支持,并在FPGA上进行设计。我们通过利用Sealpk在FPGA原型上实现孤立的影子堆栈来证明其效率。
With the continuous increase in the number of software-based attacks, there has been a growing effort towards isolating sensitive data and trusted software components from untrusted third-party components. A hardware-assisted intra-process isolation mechanism enables software developers to partition a process into isolated components and in turn secure sensitive data from untrusted components. However, most of the existing hardware-assisted intra-process isolation mechanisms in modern processors, such as ARM and IBM Power, rely on costly kernel operations for switching between trusted and untrusted domains. Recently, Intel introduced a new hardware feature for intra-process memory isolation, called Memory Protection Keys (MPK), which enables a user-space process to switch the domains in an efficient way. While the efficiency of Intel MPK enables developers to leverage it for common use cases such as Code-Pointer Integrity, the limited number of unique domains (16) prohibits its use in cases such as OpenSSL where a large number of domains are required. Moreover, Intel MPK suffers from the protection key use-after-free vulnerability. To address these shortcomings, in this paper, we propose an efficient intra-process isolation technique for the RISC-V open ISA, called SealPK, which supports up to 1024 unique domains. SealPK prevents the protection key use-after-free problem by leveraging a lazy de-allocation approach. To further strengthen SealPK, we devise three novel sealing features to protect the allocated domains, their associated pages, and their permissions from modifications or tampering by an attacker. To demonstrate the feasibility of our design, we implement SealPK on a RISC-V Rocket processor, provide the OS support for it, and prototype our design on an FPGA. We demonstrate the efficiency of SealPK by leveraging it to implement an isolated shadow stack on our FPGA prototype.