2026· IEEE Security & Privacy· pp. 2-11· 0 citations· 13 references
TL;DR
An alternative agentic approach that gives an LLM freedom and guardrails, and a publicly available implementation named ACTOR that outperforms all previous tools to automatically translate C to Rust.
Abstract
— The Rust programming language provides stronger guarantees about memory safety than C. Therefore, translating C to Rust is one way to reduce security vulnerabilities. One common translation strategy uses LLM queries. We present an alternative agentic approach that gives an LLM freedom and guardrails, and a publicly available implementation named ACTOR that outperforms all previous tools. When programming in C, a programmer must manually manage memory and other resources, such as by calling free after each call to malloc or by calling fclose after each call to fopen . It is easy to violate these rules, leading to memory corruption, resource exhaustion, and security vulnerabilities. This is a serious problem, because much of the world’s critical software infrastructure is written in C. The systems programming language Rust is a promising replacement for C. Rust prevents many errors via compile-time analyses, such as for type-checking and ownership. There is a growing movement to replace software written in C by safer versions written in Rust. To date, that replacement has required manual rewriting, which is time-consuming, costly, and unscalable. An alternative approach is to automatically translate C to Rust. Previous C-to-Rust translation tools fall into three categories. Rule-based transpilers like C2Rust [3], Crown [14], and Laertes [2] use language-specific AST transformations and are pinned to specific compiler versions. They break when the input does not match their expectations and cannot be adapted to other language pairs without a complete rewrite. Since they largely target a Rust-specific problem, unsafe blocks, their ideas may not even generalize to other target languages. LLM-assisted translators like SmartC2Rust [13] and C2SaferRust [6] use LLMs for code generation but wrap them in substantial language-specific infrastructure: AST parsers, macro transformers, error-code classifiers, and language-specific segmentation (splitting the C program into small pieces before translating, using knowledge
An alternate agentic approach that gives an LLM freedom and guardrails is presented that gives an LLM freedom and guardrails in the Rust programming language, a promising replacement for C.
Memory-safety bugs are one of the oldest and most common sources of security vulnerabilities, and their modern-day prevalence is a consequence of the widespread use of non-memory-safe languages such as C and C++. Transitioning away from C and C++ to memory-safe languages, namely Rust, to eliminate memory-safety bugs is...
Victor Chen· Companion Proceedings of the...· 0 citations
Rust has emerged as the leading system programming language, offering strong memory and type safety guarantees without compromising performance. This positions it as a compelling alternative to traditional languages like C and C++, which are susceptible to memory security bugs. However, manually transforming C to Rust...
Memory-safety vulnerabilities remain a persistent source of security risk in critical software, much of which is implemented in memory-unsafe languages such as C and C++. Recent advances in programming languages, program analysis, and artificial intelligence have created new opportunities to modernize these legacy syst...
Hamed Okhravi, Brandt Ogden, Noah Luther et al.· 0 citations
How to extend RefinedRust with several of the high-level abstractions that Rust provides, including traits, closures, and iterators, and in a manner such that they can be used in conjunction with unsafe code.
Lennard Gäher, Vincent Lafeychine, Sascha Kehrli et al.· Proceedings of the ACM on Pr...· 0 citations
Rust has emerged as a promising systems programming language for security-critical domains, offering effective protection against memory safety issues through its strong type system and ownership model. However, practical multilingual Rust applications that interact with unsafe languages such as C/C++ via the Foreign F...
Ming-Liang Liu, Bao-Jian Hua· International Test Conferenc...· 0 citations
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.