LLM agents audit Rust bindings, report 213 undefined-behavior bugs in widely used crates
A study from arXiv tests whether AI agents can find soundness bugs in safe Rust interfaces to C and C++ code, then ships the idea inside the Crustify audit system.
In plain words
Rust programs often call C or C++ libraries through wrapper interfaces that must enforce Rust's safety rules. If a wrapper is too weak, safe-looking Rust code can trigger undefined behavior. The researchers used AI agents as auditors of these wrappers and built the approach into a tool called Crustify.
What was announced
The paper argues that static analyzers and fuzzers often miss these defects because they rely on fixed patterns or only cover executed paths, so the authors instead studied large language model agents as auditors of binding interfaces. In repeated audits of two crates using Claude Opus 5.5 and DeepSeek V4.1 Flash, agents found undefined behavior and divergences from the wrapped library unprompted, but examined unsafe contracts only when asked. Their findings were almost always real, yet the agents seldom confirmed them with a sanitizer and stopped early. With the same guidance, the open model matched the closed model's defect count at a quarter of the cost.
The authors built these insights into Crustify, an agentic system for C-to-Rust tasks, and ran it on 16 widely used bindings to libraries including OpenSSL, SQLite, libgit2, and V8, on three crates that use them, such as cargo, and on Rust abstractions in the Linux kernel. They report 213 undefined-behavior bugs, 33 incomplete contracts, and 23 divergences in the crates, plus 11 undefined-behavior bugs in the kernel, at a median cost under $50 per audit. Maintainers have fixed 24 of the 78 reported findings.
What it does not show
- The evidence is the paper's abstract only; the full methodology, crate names beyond the examples, and verification details are not available in the supplied passages.
- The reported bug counts and the 24 maintainer fixes come from the authors themselves and are not independently confirmed.
For security and IT teams
- Scope
- The findings cover 16 C and C++ binding crates, three crates using them such as cargo, and Linux kernel Rust abstractions, not all Rust bindings.
Sources
Source-support review completed 5 Dec 2026. This story was drafted with AI assistance and checked against retained source passages. Automated checking is not independent verification.
Coverage: arXiv: abstract.
Updates and corrections
No corrections so far.
First published 5 Dec 2026
New to the subject? AI from the Ground Up starts from the beginning.