Lune

USENIX Security2023顶会

TRust: A Compilation Framework for In-process Isolation to Protect Safe Rust against Untrusted Code

Inyoung Bang, Martin Kayondo, Hyungon Moon, Yunheung Paek

摘要

Rust was invented to help developers build highly safe systems. It comes with a variety of programming constructs that put emphasis on safety and control of memory layout. Rust enforces strict discipline about a type system and ownership model to enable compile-time checks of all spatial and temporal safety errors. Despite this advantage in security, the restrictions imposed by Rust's type system make it difficult or inefficient to express certain designs or computations. To ease or simplify their programming, developers thus often include untrusted code from unsafe Rust or external libraries written in other languages. Sadly, the programming practices embracing such untrusted code for flexibility or efficiency subvert the strong safety guarantees by safe Rust. This paper presents TRUST, a compilation framework which against untrusted code present in the program, provides trustworthy protection of safe Rust via in-process isolation. Its main strategy is allocating objects in an isolated memory region that is accessible to safe Rust but restricted from being written by the untrusted. To enforce this, TRUST employs software fault isolation and x86 protection keys. It can be applied directly to any Rust code without requiring manual changes. Our experiments reveal that TRUST is effective and efficient, incurring runtime overhead of only 7.55% and memory overhead of 13.30% on average when running 11 widely used crates in Rust.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 9 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Securing Mixed Rust with Hardware Capabilities 引用了 RustSan: Retrofitting AddressSanitizer for Efficient Sanitization of Rust
  • Securing Mixed Rust with Hardware Capabilities 引用了 MetaSafe: Compiling for Protecting Smart Pointer Metadata to Ensure Safe Rust Integrity
  • MetaSafe: Compiling for Protecting Smart Pointer Metadata to Ensure Safe Rust Integrity 引用了 ERIM: Secure, Efficient In-process Isolation with Protection Keys (MPK)
  • ERIM: Secure, Efficient In-process Isolation with Protection Keys (MPK) 引用了 Shreds: Fine-Grained Execution Units with Private Memory
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper9

  1. An Empirical Study of Rust-for-Linux: The Success, Dissatisfaction, and CompromiseHongyu Li, Liwei Guo, Yexuan Yang, Shangguang Wang 等USENIX ATC 2024 · 29 次引用
  2. RustSan: Retrofitting AddressSanitizer for Efficient Sanitization of RustKyuwon Cho, Jongyoon Kim, Kha Dinh Duy, Hajeong Lim 等USENIX Security 2024 · 7 次引用
  3. ERASan: Efficient Rust Address SanitizerJiun Min, Dongyeon Yu, Seongyun Jeong, Dokyung Song 等S&P 2024 · 6 次引用
  4. MetaSafe: Compiling for Protecting Smart Pointer Metadata to Ensure Safe Rust IntegrityMartin Kayondo, Inyoung Bang, Yeongjun Kwak, Hyungon Moon 等USENIX Security 2024 · 2 次引用
  5. Securing Mixed Rust with Hardware CapabilitiesJason Zhijingcheng Yu, Fangqi Han, Kaustab Choudhury, Trevor E. Carlson 等CCS 2025 · 1 次引用

它引用的 Paper12

  1. ERIM: Secure, Efficient In-process Isolation with Protection Keys (MPK)Anjo Vahldiek-Oberwagner, Eslam Elnikety, Nuno O. Duarte, Michael Sammler 等USENIX Security 2019 · 247 次引用
  2. Shreds: Fine-Grained Execution Units with Private MemoryYaohui Chen, Sebassujeen Reymondjohnson, Zhichuang Sun, Long LuS&P 2016 · 116 次引用
  3. TypeSan: Practical Type Confusion DetectionIstván Haller, Yuseok Jeon, Hui Peng, Mathias Payer 等CCS 2016 · 97 次引用
  4. Towards Memory Safe Enclave Programming with Rust-SGXHuibo Wang, Pei Wang, Yu Ding, Mingshen Sun 等CCS 2019 · 86 次引用
  5. FreeGuard: A Faster Secure Heap AllocatorSam Silvestro, Hongyu Liu, Corey Crosser, Zhiqiang Lin 等CCS 2017 · 71 次引用

相关 Paper

  1. Securing unsafe rust programs with XRustPeiming Liu, Gang Zhao, Jeff HuangICSE 2020 · 28 次引用
  2. How do programmers use unsafe rust?Vytautas Astrauskas, Christoph Matheja, Federico Poli, Peter Müller 等OOPSLA 2020 · 78 次引用
  3. Is rust used safely by software developers?Ana Nora Evans, Bradford Campbell, Mary Lou SoffaICSE 2020 · 57 次引用
  4. Building Bridges: Safe Interactions with Foreign Languages through OmniglotLeon Schuermann, Jack Toubes, Tyler Potyondy, Pat Pannuto 等OSDI 2025
  5. SafeFFI: Efficient Sanitization at the Boundary Between Safe and Unsafe Code in Rust and Mixed-Language ApplicationsOliver Braunsdorf, Tim Lange, Konrad Hohentanner, Julian Horsch 等USENIX Security 2026
黄昏的海面,两侧是细线勾勒的悬崖