Agentic Discovery of Soundness Bugs in Safe Rust Bindings
On the map: LLM agents and tool use → Software engineering coding agents also fits: Agent threats, guardrails and governance
Abstract (arXiv)
Rust 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. We propose LLM agents as auditors of these interfaces, and study how well they do it. We first define a taxonomy of the defects of such interfaces, including undefined behavior, divergences from the wrapped library, and incomplete unsafe contracts. We then measure, in repeated audits of a real-world crate by a closed and an open model, Claude Opus 5.5 and DeepSeek V4.1 Flash, which defect classes agents find, how well they triage them, and what makes them find more. Agents find the first two classes unprompted, but find few incomplete contracts even when asked. Their findings are almost always real, even without an independent reviewer, yet they lack triage discipline: they seldom confirm with a sanitizer, and they stop early. With the same guidance, the open model finds as many defects as the closed one at a quarter of the cost. We integrate these insights in Crustify, an agentic system for automating C-to-Rust tasks, and run it at scale. In 16 widely used crates, including the bindings to the C libraries OpenSSL, SQLite, libgit2, and libcurl and to the C++ engine V8, Crustify found 225 undefined-behavior bugs, 23 behavioral divergences, and 36 incomplete unsafe contracts, between 3 and 61 per crate at a median cost under 50 per audit. In the Linux kernel's Rust abstractions, it found 11 more undefined-behavior bugs and 4 incomplete contracts. Maintainers have fixed 26 of the 83 findings that we reported.
Key facts. No citing papers in the map yet (data through 24 Nov 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 15 of its 61 references that are in the map. Submitted 24 Nov 2026, announced 25 Nov 2026.
Builds on
15 of 61 references.
Closest ancestors · 1
Same direction, newest first
Other references · 14
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 9,589
- 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 9,360
- 2026SoK: DARPA's AI Cyber Challenge (AIxCC): Competition Design, Architectures, and Lessons Learnedcited by 12
- 2021RULF: Rust Library Fuzzing via API Dependency Graph Traversalcited by 6
- 2021SafeDrop: Detecting Memory Deallocation Bugs of Rust Programs via Static Data-Flow Analysiscited by 4
- 2024A Study of Undefined Behavior Across Foreign Function Boundaries in Rust Librariescited by 4
- 2026Revelio: Cost-Efficient Agentic Memory Safety Vulnerability Detection For Repository-Scale Codebasescited by 4
- 2023Yuga: Automatically Detecting Lifetime Annotation Bugs in the Rust Languagecited by 2
- 2023Fuzz Driver Synthesis for Rust Generic APIscited by 2
- 2025TYPEPULSE: Detecting Type Confusion Bugs in Rust Programscited by 2
- 2025deepSURF: Detecting Memory Safety Vulnerabilities in Rust Through Fuzzing LLM-Augmented Harnessescited by 2
- 2026Kani: A Model Checker for Rustcited by 1
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026LACUNA: Safe Agents as Recursive Program Holes
- 2026Who Tests the Testers? Systematic Enumeration and Coverage Audit of LLM Agent Tool Call Safety
- 2026When Passing Tests Hides Vulnerabilities: An Empirical Study of Silent Failures in Agentic Systems
- 2026SmartOracle -- An Agentic Approach to Mitigate Noise in Differential Oracles
- 2026MOSAIC-Bench: Measuring Compositional Vulnerability Induction in Coding Agents
- 2026Evaluating and Improving Automated Repository-Level Rust Issue Resolution with LLM-based Agents
- 2026ARQ: Agentic CodeQL Query Refinement for C/C++ Vulnerability Detection
- 2026Securing LLM Agents Need Intent-to-Execution Integrity