← Latest papers
💻 computer science

RustGo: Fairly Directed Greybox Fuzzing for Enforcing Rust Memory Safety

RustGo is a new directed greybox fuzzer that leverages Rust-specific static analysis to automatically identify potential memory bug targets and prune irrelevant execution paths, thereby significantly improving fuzzing efficiency and discovering unknown vulnerabilities in unsafe Rust code compared to existing approaches.

Original authors: Dongyeon Yu (Korea University), Jiun Min (Korea University), Yewan Na (Ulsan National Institute of Science and Technology), Mijung Kim (Ulsan National Institute of Science and Technology), Taegyu Kim
Published 2026-08-07
📖 7 min read🧠 Deep dive

Original authors: Dongyeon Yu (Korea University), Jiun Min (Korea University), Yewan Na (Ulsan National Institute of Science and Technology), Mijung Kim (Ulsan National Institute of Science and Technology), Taegyu Kim (The Pennsylvania State University), Yuseok Jeon (Korea University)

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are a detective trying to find a single, tiny flaw in a massive, bustling city. In the world of computer software, this city is a program, and the flaw is a "memory bug"—a mistake where the program tries to grab, use, or throw away data it shouldn't, causing it to crash or get hacked. For decades, the most popular way to find these bugs has been "fuzzing." Think of fuzzing as throwing millions of random, chaotic snowballs at the city walls to see if any of them break a window. Usually, this works well for older languages, but there's a catch: it's incredibly inefficient. You might throw 99 snowballs at the sturdy, unbreakable front door just to find the one weak window in the back alley.

Enter Rust, a modern programming language that acts like a super-strict security guard. Rust's rules are so good that 90% of the city it builds is practically bulletproof; the guard ensures that most of the "windows" (memory areas) are locked tight by default. However, to build certain complex things, Rust allows developers to open a small, special gate called "unsafe code." This is the only place where the strict rules are relaxed, and it's the only place where a memory bug can actually hide. The problem is that existing "snowball-throwing" tools don't know this. They keep throwing snowballs at the 90% of the city that is already safe, wasting time and energy, while missing the few dangerous spots behind the special gate. This paper introduces a new detective tool called RustGo that changes the game by knowing exactly where to throw the snowballs.

The Smart Detective: RustGo

The researchers behind this paper, a team from Korea University and other institutions, realized that throwing snowballs randomly at a Rust program is like trying to find a needle in a haystack by burning the whole haystack down. Since Rust guarantees safety for most of its code, they asked: Why test the safe parts at all? They built RustGo, a "directed greybox fuzzer" that acts like a detective with a map and a magnifying glass, rather than a blindfolded person throwing rocks.

RustGo works in three clever steps to hunt down bugs efficiently:

1. Finding the Right Targets (The Map)
First, RustGo scans the code to find the "unsafe" zones where bugs might hide. But it doesn't just guess. It uses a special kind of analysis to look at how data flows through the program. Imagine the city has many alleys, but some lead to dead ends or loops that never actually happen in real life. RustGo filters these out. It identifies the specific spots where a memory bug could trigger and then merges similar spots together. If two different paths in the code lead to the exact same dangerous outcome, RustGo treats them as one target, so it doesn't waste time checking the same thing twice. In their tests, this step helped them reduce the number of targets they needed to check by about 84%, focusing only on the truly suspicious areas.

2. Cutting the Dead Ends (The Magnifying Glass)
Once RustGo knows where to look, it needs to ignore the rest of the city. In older fuzzing tools, the "map" of the city often included the standard library (the pre-built tools Rust uses), which is huge and full of paths that look reachable but actually aren't. This confused the tools, making them explore useless areas. RustGo introduced a new trick called "target-specific path pruning." It's like having a magical fence that instantly disappears any path that doesn't lead to the specific target you are currently investigating. If the detective is looking for a bug in the bakery, the fence blocks off the paths to the library or the park, even if those paths technically exist in the city. This allowed RustGo to cut away 78.49% of the irrelevant paths that other tools would waste time exploring.

3. Playing Fair (The Round-Robin Strategy)
Here is the final, crucial twist. When a detective has multiple suspects (targets) to check, older tools often get obsessed with the easiest one to reach, ignoring the harder ones. RustGo uses a "dynamic fair toggling" system. Imagine a referee who switches the detective's attention between suspects in a perfect rotation. If the detective spends too much time on Suspect A, the referee immediately switches them to Suspect B, ensuring every suspect gets a fair amount of attention. RustGo does this by giving each target its own "queue" of snowballs and its own "scorecard" to track progress. This ensures that no dangerous spot is left untested just because it's slightly harder to reach.

The Results: Faster and Smarter

The team tested RustGo on 13 real-world Rust applications, ranging from web servers to data processing tools. They compared it against the best existing tools, including the famous AFL++ and several specialized "directed" fuzzers. The results were striking.

Because RustGo stopped wasting time on the safe 90% of the code and focused purely on the dangerous 10%, it found vulnerabilities 2.09 to 5.08 times faster than the other tools. In some cases, like the gimli application, it was more than 10 times faster. To put this in perspective, if an old tool took 10 hours to find a bug, RustGo found it in less than an hour.

But speed isn't the only victory. The team used RustGo to hunt for bugs in the wild, not just in their test lab. They discovered 13 previously unknown memory bugs in real-world software. Of these, 10 were confirmed by the software developers, and 8 have already been fixed. Even more impressively, 6 of these bugs were assigned official security IDs (RUSTSEC), and one received a CVE ID, which is the global standard for tracking serious security flaws. This proves that RustGo isn't just a theoretical idea; it's a practical tool that is already making software safer.

Why This Matters

This paper doesn't just suggest that RustGo is a good idea; it measures it, proves it works, and shows it finding real bugs that others missed. It explicitly argues against the old way of thinking: that we must test every single line of code to be safe. Instead, it shows that by understanding the unique rules of Rust, we can be smarter, faster, and more effective.

The researchers also addressed a common concern: "What if we miss a bug by ignoring the safe parts?" They explain that Rust's safety rules are so strict that spatial memory bugs (like accessing the wrong memory address) simply cannot happen in the safe parts of the code. Therefore, ignoring them doesn't create a blind spot; it just removes the noise. For temporal bugs (using memory after it's been freed), RustGo is careful to ensure it doesn't accidentally prune a path that could lead to a bug, using a "conservative" approach that keeps the safety net wide enough to catch everything.

In the end, RustGo is a testament to the power of specialization. Just as a master chef doesn't use a hammer to crack a nut, a modern fuzzer shouldn't use a blunt instrument on a language as sophisticated as Rust. By tailoring the approach to the language's unique strengths and weaknesses, the authors have created a tool that is not only faster but also fairer, ensuring that every potential danger in the code gets the attention it deserves.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →