The $100 Billion Vulnerability Crisis
Memory safety vulnerabilities remain one of the most persistent and devastating flaws in critical software systems. Accounting for nearly 70% of all exploitable bugs, these vulnerabilities plague codebases that control mission-critical assets—from power grids and avionics to satellites and weapons systems. In response to the White House Office of the National Cyber Director’s call to adopt memory-safe languages as a national security imperative, DARPA launched TRACTOR (Translating All C TO Rust)—an ambitious program aimed at using AI to automatically convert legacy C code into secure, idiomatic Rust.
DARPA’s objective is not incremental improvement, but the complete eradication of an entire class of vulnerabilities. “After decades grappling with memory safety issues, we’ve reached consensus: bug-finding tools aren’t enough. We need to eliminate the vulnerability class entirely,” the agency declared.
Why Rust?
C has long been valued for its raw performance and low-level control, but those same features—manual memory management, pointer arithmetic, and weak type enforcement—have become the root of severe vulnerabilities like buffer overflows, use-after-free errors, and undefined behaviors. These issues are notoriously difficult to detect and often fatal when exploited.
C’s memory manipulation features, which were once groundbreaking, have become a double-edged sword—opening the door to some of the most dangerous and persistent software vulnerabilities. Buffer overflows, for example, allow attackers to execute arbitrary code remotely, often leading to full system compromise. Use-after-free errors similarly enable malicious actors to seize control by exploiting dangling pointers. Additionally, undefined behaviors inherent in C’s flexible but unsafe memory model create unpredictable and hard-to-detect attack surfaces, making systems vulnerable to subtle and devastating exploits.
Rust addresses these critical issues at their root through its compile-time ownership model and strict borrow checker, which enforce memory safety by design. Rather than patching vulnerabilities after the fact, Rust prevents entire classes of memory errors from ever occurring, all while maintaining performance comparable to C. As Dan Wallach, the TRACTOR Program Manager, puts it, “Rust forces programmers to get things right. Its guardrails free developers to focus on mission logic rather than chasing memory ghosts.” This fundamental shift in how memory is managed makes Rust uniquely suited to securing the software that underpins modern infrastructure.
The Grand Challenge of Transpilation
TRACTOR is tackling the monumental challenge of converting billions of lines of legacy C code—some of which predates the internet itself—into memory-safe Rust. This is not a matter of translation, but transformation.
The challenge of transpiling over five decades of legacy C code into secure, idiomatic Rust is nothing short of monumental. This transformation, central to DARPA’s TRACTOR initiative, must navigate a landscape riddled with architectural quirks, undefined behaviors, and performance constraints, all while preserving the precise semantics of mission-critical software.
A core difficulty lies in balancing semantic fidelity with memory safety. A naive approach might involve wrapping translated C constructs in Rust’s unsafe blocks to preserve behavior. While this maintains functional equivalence, it undermines Rust’s core value proposition: eliminating classes of memory vulnerabilities. TRACTOR instead pursues idiomatic, safe Rust with minimal reliance on unsafe, which demands a deep understanding of the original program’s intent, not just its syntax. For instance, reengineering pointer arithmetic in Linux kernel modules requires completely rethinking memory management while ensuring performance and timing constraints remain intact.
Compounding this is the “hallucination gap” inherent in AI-based transpilation. While models like GPT-4 can generate compilable Rust from C source code in roughly 70% of cases, subtle but critical errors often creep in—particularly when dealing with complex pointer dereferencing, implicit type coercions, or convoluted macro-based logic. TRACTOR Program Manager Dan Wallach aptly warns: “Ask ChatGPT to translate C to Rust and it often looks good—until you find it invented array bounds checks that don’t exist in the original.” These “hallucinated” safety mechanisms may break program logic or mask critical flaws, making manual review and tooling essential.
Verification poses another formidable barrier. Ensuring that translated Rust code behaves identically to its C counterpart is far from trivial. TRACTOR addresses this with a multi-pronged strategy involving cross-language differential fuzzing, which systematically compares input-output behavior across both versions; formal methods, which mathematically prove semantic equivalence; and hardware-in-the-loop testing, vital for validating real-time embedded systems where even minor deviations can lead to failure.
Together, these challenges define the technological frontier of memory-safe modernization. TRACTOR’s success hinges not just on translation accuracy, but on the ability to transform brittle legacy code into resilient, verifiable Rust—without breaking what already works.
Inside TRACTOR: Breakthroughs from 2024–2025
Over the past year, TRACTOR has matured from a bold concept into a multi-stage AI-human hybrid pipeline. The system begins with static analysis that converts C into an intermediate representation (IR), stripping away architecture dependencies. From there, domain-specific LLMs—trained on embedded systems, OS kernels, and financial software—generate Rust code. A “rusticization” module replaces unsafe constructs with idiomatic Rust using constraint-solving techniques. Finally, a validation stage performs differential fuzzing to catch any behavioral discrepancies between the C and Rust outputs.
Recent demonstrations of TRACTOR have unveiled a sophisticated layered architecture designed to address the unique challenges of converting legacy C code into memory-safe Rust. This architecture is not merely a linear pipeline but an integrated framework in which each component contributes to preserving semantic integrity, minimizing unsafe constructs, and validating correctness at scale.
At the front end of the process is the Static Analysis Engine, which ingests raw C source code and decompiles it into an architecture-independent intermediate representation (IR). This abstraction strips away machine-specific details, enabling downstream modules to focus on structural and semantic transformations without being tethered to platform constraints.
The heart of the translation lies in the LLM Translation Cluster, where large language models—each fine-tuned on specific domains such as embedded systems, operating system kernels, or financial software—transform the IR into syntactically valid and semantically aligned Rust. Unlike one-size-fits-all models, this modular specialization improves accuracy, especially when dealing with domain-specific idioms or complex pointer logic.
Once the initial translation is complete, the Rusticization Module refines the output by replacing unsafe Rust blocks with idiomatic, safe alternatives. Powered by constraint solvers and symbolic reasoning, this module restructures code to align with Rust’s ownership model, transforming direct memory manipulation into safe abstractions without degrading performance.
To ensure functional fidelity, TRACTOR employs an Adversarial Validator—a fuzzing-based tool that compares the runtime behavior of the original C code and the transpiled Rust output. By systematically introducing edge-case inputs and monitoring output deviations, this validator detects behavioral drift, which can signal translation flaws, hidden dependencies, or unsafe substitutions.
Together, these layers create a robust and intelligent system capable of not just translating code, but elevating it—modernizing critical software while preserving performance and ensuring security.
The project has also made striking progress in minimizing unsafe code. Ownership inference has reduced unsafe usage by 92% in kernel drivers, while financial software has benefited from synthesized smart pointers. Aerospace control systems have seen a 64% reduction through zero-cost abstraction techniques.
C2Rust-Bench: The Gold Standard for Measuring Progress
To track meaningful advancements in automated C-to-Rust transpilation, researchers developed C2Rust-Bench, a curated dataset of 2,905 functions extracted from a wide range of real-world programs. Unlike full codebases, which can be computationally intensive and opaque for benchmarking, this reduced dataset strikes a crucial balance between complexity and clarity. It captures the most representative patterns and edge cases that commonly challenge transpilation engines, making it a valuable diagnostic tool for development and evaluation.
By using C2Rust-Bench, developers can achieve an 81% reduction in evaluation time while still targeting high-impact areas of transformation. The dataset allows for standardized benchmarking, enables comparative performance tracking across different transpilation approaches, and highlights recurring structures where tools tend to falter or excel. This focused lens has already proven instrumental in accelerating refinement cycles and aligning development with real-world needs.
Unsafe Reduction Techniques: From Fragile to Fortified
Among the most important advances tested with C2Rust-Bench are techniques for minimizing unsafe code blocks, which are necessary for certain low-level operations in Rust but inherently risk undermining the language’s safety guarantees. TRACTOR’s teams have pioneered multiple methods that dramatically reduce the footprint of unsafe code without compromising performance or correctness.
Ownership inference has led to a 92% reduction in unsafe use within kernel drivers by allowing the system to infer borrowing and lifetimes automatically. Smart pointer synthesis, which maps C-style raw pointer patterns into safer Rust abstractions, has yielded a 78% reduction in unsafe code for financial systems. Meanwhile, zero-cost abstractions tailored for aerospace control systems have cut unsafe code by 64%, proving that even performance-critical domains can benefit from memory safety without trade-offs.
These results, drawn directly from C2Rust-Bench evaluations, demonstrate that automated safety is no longer theoretical. With the right tools and datasets, legacy C code can be transformed into robust, maintainable, and future-proof Rust—ushering in a new standard for secure software engineering.
Industry Reactions: A Divided Front
The industry’s response to TRACTOR is a mix of excitement, caution, and pragmatism.
Proponents like Immunant, maintainers of the c2rust project, view TRACTOR as a force multiplier. “We’ve already migrated over 500,000 lines of code for Department of Defense systems. TRACTOR will make this 100x faster,” they noted. The Prossimo Project, which successfully converted the AV1 codec to Rust, observed that while current tools still require human oversight, the trajectory is promising.
Skeptics argue that the problem is fundamentally intractable at scale. Tim McNamara, author of Rust in Action, questioned the feasibility of full automation, asking, “How can you preserve semantics without preserving bugs?” Meanwhile, the Linux kernel team has opted out of TRACTOR entirely, citing irreconcilable differences in memory and concurrency models.
Pragmatists like AdaCore emphasize the need for rigorous validation, especially in regulated sectors. “Proving functional equivalence is the trillion-dollar question,” a spokesperson remarked. Others, like CodeMetal, advocate prioritizing critical infrastructure over generic applications, noting, “Rewriting a thermostat in Rust is not the best use of resources.”
The Road Ahead: Milestones for 2025
Following the Proposers Day in August 2024, which drew 87 participating teams from industry, academia, and government labs, TRACTOR is on track to deliver significant milestones. By early 2026, DARPA aims to achieve 95% automation for MISRA C-compliant code, with less than 5% unsafe usage in output. The system will initially support ARM Cortex-M and RISC-V embedded targets, aligning with Department of Defense priorities for cyber-physical system hardening.
Over the longer term, the TRACTOR program aims to catalyze a profound transformation in how critical software systems are secured and maintained. Its vision extends far beyond static code translation—it aspires to make entire classes of vulnerabilities, such as buffer overflows and use-after-free errors, relics of the past. In this future, infrastructure software isn’t merely rewritten once; it’s continuously hardened through automated processes, with security built in at the code level by design rather than bolted on as an afterthought.
Perhaps most revolutionary is the potential for real-time translation of legacy binaries into memory-safe Rust equivalents. This would enable on-the-fly patching of critical systems without downtime or full system rewrites, ushering in a new paradigm of continuous modernization. Instead of the costly cycle of discovering, patching, and redeploying vulnerable C code, TRACTOR envisions an adaptive, self-fortifying software ecosystem—one where security is not a reactive effort but an embedded, evolving capability.
The Philosophical Divide: Evolution vs. Revolution
TRACTOR has sparked a deep philosophical rift within the software community. Traditionalists argue that with sufficient discipline—using standards like ISO 26262 or MISRA C—memory-safe systems can be built using C. They point out that hard real-time performance requirements are often easier to meet in C than in Rust.
Revolutionaries counter that prevention is better than mitigation. “Why spend $100 patching vulnerabilities when $1 prevents them?” one advocate asked. For them, memory safety is not a luxury but a baseline requirement—akin to requiring buildings to be fireproof. DARPA clearly aligns with this view. As one federal developer put it, “Even if TRACTOR falls short of full automation, it will advance tools that make manual rewrites 10x cheaper. That alone justifies the investment.”
Conclusion: The Inevitable Rust Horizon
TRACTOR is more than an AI tool—it is the vanguard of a new security paradigm. While the road ahead includes challenges in semantic alignment, legacy code cleanup, and formal verification, the progress made in 2025 signals that AI-assisted transpilation is not only viable—it’s accelerating.
Unsafe code can be minimized. Legacy software can be reimagined. And verification tools are evolving fast enough to enable confidence at scale. As Wallach concludes, “We’re not just changing languages—we’re eliminating an entire dimension of cyber risk. The future belongs to systems that can’t be hacked through memory corruption.”
The question is no longer whether critical systems will transition to memory-safe languages—but how quickly. TRACTOR, one line at a time, is building a world where buffer overflows become relics of a riskier past.
International Defense Security & Technology Your trusted Source for News, Research and Analysis