Rudra: Finding Memory Safety Bugs in Rust at the Ecosystem Scale
Yechan Bae, Youngsuk Kim, Ammar Askar, Jungwon Lim, Taesoo Kim
摘要
Rust is a promising system programming language that guarantees memory safety at compile time. To support diverse requirements for system software such as accessing low-level hardware, Rust allows programmers to perform operations that are not protected by the Rust compiler with the unsafe keyword. However, Rust's safety guarantee relies on the soundness of all unsafe code in the program as well as the standard and external libraries, making it hard to reason about their correctness. In other words, a single bug in any unsafe code breaks the whole program's safety guarantee.
In this paper, we introduce RUDRA, a program that analyzes and reports potential memory safety bugs in unsafe Rust. Since a bug in unsafe code threatens the foundation of Rust's safety guarantee, our primary focus is to scale our analysis to all the packages hosted in the Rust package registry. RUDRA can scan the entire registry (43k packages) in 6.5 hours and identified 264 previously unknown memory safety bugs-leading to 76 CVEs and 112 RustSec advisories being filed, which represent 51.6% of memory safety bugs reported to RustSec since 2016. The new bugs RUDRA found are non-trivial, subtle, and often made by Rust experts: two in the Rust standard library, one in the official futures library, and one in the Rust compiler. RUDRA is open-source, and part of its algorithm is integrated into the official Rust linter.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 26 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- An Empirical Study of Rust-for-Linux: The Success, Dissatisfaction, and Compromise 引用了 RedLeaf: Isolation and Communication in a Safe Operating System
- An Empirical Study of Rust-for-Linux: The Success, Dissatisfaction, and Compromise 引用了 Understanding memory and thread safety practices and issues in real-world Rust programs
- An Empirical Study of Rust-for-Linux: The Success, Dissatisfaction, and Compromise 引用了 How do programmers use unsafe rust?
- How do programmers use unsafe rust? 引用了 Understanding memory and thread safety practices and issues in real-world Rust programs
- Theseus: an Experiment in Operating System Structure and State Management 引用了 Understanding memory and thread safety practices and issues in real-world Rust programs
- RPG: Rust Library Fuzzing with Pool-based Fuzz Target Generation and Generic Support 引用了 Understanding memory and thread safety practices and issues in real-world Rust programs
- Is unsafe an Achilles' Heel? A Comprehensive Study of Safety Requirements in Unsafe Rust Programming 引用了 RustBelt meets relaxed memory
- Is unsafe an Achilles' Heel? A Comprehensive Study of Safety Requirements in Unsafe Rust Programming 引用了 Understanding memory and thread safety practices and issues in real-world Rust programs
- Rust for Embedded Systems: Current State and Open Problems 引用了 Understanding memory and thread safety practices and issues in real-world Rust programs
- Rust for Embedded Systems: Current State and Open Problems 引用了 How do programmers use unsafe rust?
引用它的顶会 Paper26
- An Empirical Study of Rust-for-Linux: The Success, Dissatisfaction, and CompromiseHongyu Li, Liwei Guo, Yexuan Yang, Shangguang Wang 等USENIX ATC 2024 · 29 次引用
- Verus: A Practical Foundation for Systems VerificationAndrea Lattuada, Travis Hance, Jay Bosamiya, Matthias Brun 等SOSP 2024 · 22 次引用
- Is unsafe an Achilles' Heel? A Comprehensive Study of Safety Requirements in Unsafe Rust ProgrammingMohan Cui, Shuran Sun, Hui Xu, Yangfan ZhouICSE 2024 · 12 次引用
- Rust for Embedded Systems: Current State and Open ProblemsAyushi Sharma, Shashank Sharma, Sai Ritvik Tanksalkar, Santiago Torres-Arias 等CCS 2024 · 12 次引用
- RPG: Rust Library Fuzzing with Pool-based Fuzz Target Generation and Generic SupportZhiwu Xu, Bohao Wu, Cheng Wen, Bin Zhang 等ICSE 2024 · 9 次引用
它引用的 Paper8
- Understanding memory and thread safety practices and issues in real-world Rust programsBoqin Qin, Yilun Chen, Zeming Yu, Linhai Song 等PLDI 2020 · 112 次引用
- RedLeaf: Isolation and Communication in a Safe Operating SystemVikram Narayanan, Tianjiao Huang, David Detweiler, Dan Appel 等OSDI 2020 · 86 次引用
- How do programmers use unsafe rust?Vytautas Astrauskas, Christoph Matheja, Federico Poli, Peter Müller 等OOPSLA 2020 · 78 次引用
- RustBelt meets relaxed memoryHoang-Hai Dang, Jacques-Henri Jourdan, Jan-Oliver Kaiser, Derek DreyerPOPL 2020 · 68 次引用
- Theseus: an Experiment in Operating System Structure and State ManagementKevin Boos, Namitha Liyanage, Ramla Ijaz, Lin ZhongOSDI 2020 · 67 次引用
相关 Paper
- CULPA: Universal Detection of Memory-Safety Bugs in Unsafe Rust Through the Lens of Safety RequirementsHung-Mao Chen, Bo Lu, Xu He, Xiaokuan Zhang 等USENIX Security 2026
- Miri: Practical Undefined Behavior Detection for RustRalf Jung, Benjamin Kimock, Christian Poveda, Eduardo Sánchez Muñoz 等POPL 2026 · 8 次引用
- Rusted Types: Static Detection of Rust Type Confusion BugsZeyang Zhuang, Wei Meng, Michael R. LyuICSE 2026
- ERASan: Efficient Rust Address SanitizerJiun Min, Dongyeon Yu, Seongyun Jeong, Dokyung Song 等S&P 2024 · 6 次引用
- deepSURF: Detecting Memory Safety Vulnerabilities in Rust Through Fuzzing LLM-Augmented HarnessesGeorgios C. Androutsopoulos, Antonio BianchiS&P 2026 · 5 次引用
