RUDRA: Finding Memory Safety Bugs in Rust at the Ecosystem Scale (SOSP '21)

Interesting paper...

PDF: https://sosp2021.mpi-sws.org/papers/sosp21-final341.pdf

Abstract:

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.

24 Likes

That link is 404 for me.

4 Likes

Alternative URL: https://raw.githubusercontent.com/sslab-gatech/Rudra-Artifacts/master/paper/sosp21-paper341.pdf

GH project: GitHub - sslab-gatech/Rudra: Rust Memory Safety & Undefined Behavior Detection

12 Likes

They seem to have taken down the page sometime today...

Wow, great work.

It looks like panic safety is really hard. And today I've also learned that the value returned from catch_unwind can cause another panic!

12 Likes