With the increasing popularity of AArch64 processors in general-purpose computing, securing software running on AArch64 systems against control-flow hijacking attacks has become a critical part toward secure computation. Shadow stacks keep shadow copies of function return addresses and, when protected from illegal modifications and coupled with forward-edge control-flow integrity, form an effective and proven defense against such attacks. However, AArch64 lacks native support for write-protected shadow stacks, while software alternatives either incur prohibitive performance overhead or provide weak security guarantees. We present InversOS, the first hardware-assisted write-protected shadow stacks for AArch64 user-space applications, utilizing commonly available features of AArch64 to achieve efficient intra-address space isolation (called Privilege Inversion) required to protect shadow stacks. Privilege Inversion adopts unconventional design choices that run protected applications in the kernel mode and mark operating system (OS) kernel memory as user-accessible; InversOS therefore uses a novel combination of OS kernel modifications, compiler transformations, and another AArch64 feature to ensure the safety of doing so and to support legacy applications. We show that InversOS is secure by design, effective against various control-flow hijacking attacks, and performant on selected benchmarks and applications (incurring overhead of 7.0% on LMBench, 7.1% on SPEC CPU 2017, and 3.0% on Nginx web server).
翻译:随着AArch64处理器在通用计算中的日益普及,保护在AArch64系统上运行的软件免受控制流劫持攻击已成为确保安全计算的关键部分。阴影栈只保留函数返回地址的阴影副本,并且如果受到非法修改的保护并与前向控制流完整性相结合,则形成一种有效且经过实践验证的防御措施。然而,AArch64缺乏对写保护阴影栈的原生支持,而软件替代方案要么产生限制性的性能开销,要么提供弱的安全保证。本文提出了InversOS,这是首个为AArch64用户空间应用程序提供硬件辅助的写保护阴影栈,利用AArch64的常用功能实现所需的高效地址空间内部隔离(称为特权反转)。 特权反转采用非传统的设计选择,将受保护的应用程序在内核模式下运行,并将操作系统(OS)内存标记为用户可访问。因此,InversOS使用OS内核修改,编译器转换和另一个AArch64特性的新组合来确保其安全性并支持遗留应用程序。我们展示了InversOS的安全设计、对各种控制流劫持攻击的有效性以及在选定的基准测试和应用程序(在LMBench上产生7.0%的开销,在SPEC CPU 2017上产生7.1%的开销,在Nginx Web服务器上产生3.0%的开销)上的性能。