LLM agents find soundness bugs in widely used Rust bindings
Original title: Agentic Discovery of Soundness Bugs in Safe Rust Bindings
Crustify reported 225 undefined-behavior bugs across 16 crates; maintainers fixed 26 of 83 reported findings.
Researchers tested LLM agents as auditors of safe Rust interfaces over unsafe library and system code. Their system, Crustify, audited 16 widely used crates, including bindings to OpenSSL, SQLite, libgit2, libcurl, and V8, and reported 225 undefined-behavior bugs, 23 behavioral divergences, and 36 incomplete unsafe contracts. It also reported 11 undefined-behavior bugs and 4 incomplete contracts in Linux kernel Rust abstractions. Agents seldom confirmed findings with a sanitizer and often stopped early.
Unconfirmed: The authors say findings are almost always real even without an independent reviewer; only reported fixes are confirmed by maintainers.
- Findings ranged from 3 to 61 per crate, at a median cost under $50.
- DeepSeek V4.1 Flash matched Claude Opus 5.5 under the same guidance at a quarter of the cost.
- Agents found undefined behavior and divergences unprompted, but few incomplete contracts.
- Maintainers fixed 26 of the 83 findings that were reported.
Impact: Safe Rust can trigger undefined behavior
| Product | Affected |
|---|---|
| Rust bindings to OpenSSL | — |
| Rust bindings to SQLite | — |
| Rust bindings to libgit2 | — |
| Rust bindings to libcurl | — |
| Rust bindings to V8 | — |
| Linux kernel Rust abstractions | — |
- AI models
- Claude Opus 5.5DeepSeek V4.1 Flash
From the original article
1 min read at arxiv.orgRust crates confine unsafe code, such as calls into C or C++ libraries or system calls, behind safe interfaces that must uphold Rust's invariants. If an interface encodes one rule of the code beneath it too weakly, a program written in purely safe Rust can cause undefined behavior. Static analyzers and fuzzers are bound to fixed patterns or to the paths they execute.
By Marius Momeu · arxiv.org
A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.