arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2408.11456cs.PL
收藏

Cage:硬件加速的安全WebAssembly

Cage: Hardware-Accelerated Safe WebAssembly

Martin Fink, Dimitrios Stavrakakis, Dennis Sprokholt, Soham Chakraborty, Jan-Erik Ekberg, Pramod Bhatotia

AI总结:

提出硬件加速的WASM工具链Cage,利用Arm的MTE和PAC特性为未修改应用提供时空内存安全并提升沙箱性能,运行时和内存开销极小。

摘要:

WebAssembly(WASM)是一个极其通用且日益流行的编译目标。它能在多个领域(如移动、边缘、云)以接近原生的性能执行用多种语言(如C/C++)编写的应用程序。尽管WASM具有沙箱特性,能将应用程序与其他实例和宿主平台隔离,但WASM本身并不为用底层不安全语言编写的应用程序提供任何内存安全保证。为此,我们提出了Cage,这是一个硬件加速的WASM工具链,支持未经修改即编译为WASM的应用程序,并利用多种Arm硬件特性,旨在丰富WASM的内存安全属性。具体而言,Cage利用Arm的内存标记扩展(MTE)来(i)为堆和栈分配提供空间和时间内存安全,以及(ii)提升WASM沙箱机制的性能。Cage进一步采用Arm的指针身份验证(PAC)来防止泄露的指针被其他WASM实例重用,从而增强WASM的安全属性。我们基于64位WASM实现了该系统。我们提供了一个支持Arm MTE和PAC的WASM编译器与运行时。在此基础上,Cage基于LLVM的编译器工具链对未修改的应用程序进行转换,为栈和堆分配提供空间和时间内存安全,并防止函数指针重用。我们在真实硬件上的评估表明,Cage产生的运行时开销极小(<5.8%)且内存开销极低(<3.7%),并能提升WASM沙箱机制的性能,实现超过5.1%的加速,同时提供高效的内存安全保证。

英文摘要:

WebAssembly (WASM) is an immensely versatile and increasingly popular compilation target. It executes applications written in several languages (e.g., C/C++) with near-native performance in various domains (e.g., mobile, edge, cloud). Despite WASM's sandboxing feature, which isolates applications from other instances and the host platform, WASM does not inherently provide any memory safety guarantees for applications written in low-level, unsafe languages. To this end, we propose Cage, a hardware-accelerated toolchain for WASM that supports unmodified applications compiled to WASM and utilizes diverse Arm hardware features aiming to enrich the memory safety properties of WASM. Precisely, Cage leverages Arm's Memory Tagging Extension (MTE) to (i) provide spatial and temporal memory safety for heap and stack allocations and (ii) improve the performance of WASM's sandboxing mechanism. Cage further employs Arm's Pointer Authentication (PAC) to prevent leaked pointers from being reused by other WASM instances, thus enhancing WASM's security properties. We implement our system based on 64-bit WASM. We provide a WASM compiler and runtime with support for Arm's MTE and PAC. On top of that, Cage's LLVM-based compiler toolchain transforms unmodified applications to provide spatial and temporal memory safety for stack and heap allocations and prevent function pointer reuse. Our evaluation on real hardware shows that Cage incurs minimal runtime (<5.8%) and memory (<3.7%) overheads and can improve the performance of WASM's sandboxing mechanism, achieving a speedup of over 5.1%, while offering efficient memory safety guarantees.

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

↑