arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2110.04788cs.CR
收藏

Garmr:捍卫北京大学沙盒的大门

Garmr: Defending the gates of PKU-based sandboxing

Alexios Voulimeneas, Jonas Vinck, Ruben Mechelinck, Stijn Volckaert

摘要:

用户空间的内存保护密钥(PKU)是一个新的硬件功能,它允许程序将虚拟内存页分配给保护域,并使用廉价的非特权指令更改域访问权限。几种进程内内存隔离方法利用此功能来防止不受信任的代码访问敏感的程序状态和数据。通常,基于PKU的隔离方案需要与CFI等缓解措施结合使用,因为不受信任的代码在受到危害时,可以使用非特权指令或操作系统API绕过PKU访问权限。最近,研究人员提出了完全独立的基于PKU的内存隔离方案,不依赖于其他缓解措施。这些系统使用防漏洞调用门在可信和不可信代码之间转移控制,以及防止不可信代码篡改PKU基础设施的沙箱。在本文中,我们表明,这些解决方案是不完整的。我们首先开发了两个概念验证攻击对国家的最先进的PKU为基础的内存隔离计划。然后,我们提出了Garmr,一个基于PKU的沙箱框架,可以克服现有沙箱的局限性。我们将Garmr应用于几个内存隔离方案,并表明它是实用,高效和安全的。

英文摘要:

Memory Protection Keys for Userspace (PKU) is a recent hardware feature that allows programs to assign virtual memory pages to protection domains, and to change domain access permissions using inexpensive, unprivileged instructions. Several in-process memory isolation approaches leverage this feature to prevent untrusted code from accessing sensitive program state and data. Typically, PKU-based isolation schemes need to be used in conjunction with mitigations such as CFI because untrusted code, when compromised, can otherwise bypass the PKU access permissions using unprivileged instructions or operating system APIs. Recently, researchers proposed fully self-contained PKUbased memory isolation schemes that do not rely on other mitigations. These systems use exploit-proof call gates to transfer control between trusted and untrusted code, as well as a sandbox that prevents tampering with the PKU infrastructure from untrusted code. In this paper, we show that these solutions are not complete. We first develop two proof-of-concept attacks against a state-of-the-art PKU-based memory isolation scheme. We then present Garmr, a PKU-based sandboxing framework that can overcome limitations of existing sandboxes. We apply Garmr to several memory isolation schemes and show that it is practical, efficient and secure.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑