arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2306.08127cs.CRcs.PL
收藏

内部是友是敌?探索进程内隔离以维护不安全Rust的内存安全

Friend or Foe Inside? Exploring In-Process Isolation to Maintain Memory Safety for Unsafe Rust

Ericsson Security Research(爱立信安全研究);imec-DistriNet, KU Leuven(imec-DistriNet,鲁汶大学)

Merve Gülmez, Thomas Nyman, Christoph Baumann, Jan Tobias Mühlberg

AI总结:

本文探索利用内存保护密钥的进程内隔离机制,保护Rust安全代码免受不安全代码的内存违规影响,实现高效自动化与应用程序回卷。

摘要:

Rust是一种流行的内存安全系统编程语言。为了与硬件交互或调用非Rust库,Rust提供了不安全语言特性,将确保内存安全的责任转移给开发者。若未能做到这一点,可能导致不安全代码中的内存安全违规,进而危及整个应用程序的安全性。在本工作中,我们探索使用内存保护密钥进行进程内隔离,作为保护安全程序段免受不安全段中可能发生的安全违规的机制。我们的方法易于使用且全面,因为它能防止基于堆和栈的违规。我们进一步比较了基于进程和进程内的隔离机制,以及数据序列化、通信和上下文切换的必要要求。我们的结果表明,进程内隔离可以既有效又高效,允许高度自动化,并实现了应用程序回卷的概念,即安全程序段可以检测并安全处理不安全代码中的违规。

英文摘要:

Rust is a popular memory-safe systems programming language. In order to interact with hardware or call into non-Rust libraries, Rust provides \emph{unsafe} language features that shift responsibility for ensuring memory safety to the developer. Failing to do so, may lead to memory safety violations in unsafe code which can violate safety of the entire application. In this work we explore in-process isolation with Memory Protection Keys as a mechanism to shield safe program sections from safety violations that may happen in unsafe sections. Our approach is easy to use and comprehensive as it prevents heap and stack-based violations. We further compare process-based and in-process isolation mechanisms and the necessary requirements for data serialization, communication, and context switching. Our results show that in-process isolation can be effective and efficient, permits for a high degree of automation, and also enables a notion of application rewinding where the safe program section may detect and safely handle violations in unsafe code.

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

↑