Metraipolis › archive › dc_cb5b25aea437

C-to-Rust Fallacy: Automatic Refactoring != Memory Security — arXiv:2609.25682

Source
arXiv (en)
Original
https://arxiv.org/abs/2609.25682
License (as archived)
CC0-1.0
Archived
2026-10-08T14:41:59.203Z
SHA-256 of the archived text
4f128ff64abdb7c5d8d9b8a742601ee826fd778d09dc3a1a27c6c065ab176ce0
Stable URL of this page
https://metraipolis.com/documento/dc_cb5b25aea437

How to cite

C-to-Rust Fallacy: Automatic Refactoring != Memory Security — arXiv:2609.25682 — arXiv (en), https://arxiv.org/abs/2609.25682 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_cb5b25aea437 (Metraipolis archive dc_cb5b25aea437, sha256 4f128ff64abdb7c5d8d9b8a742601ee826fd778d09dc3a1a27c6c065ab176ce0)
BibTeX
@misc{dccb5b25aea437,
  title = {C-to-Rust Fallacy: Automatic Refactoring != Memory Security — arXiv:2609.25682},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2609.25682},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_cb5b25aea437; sha256 4f128ff64abdb7c5d8d9b8a742601ee826fd778d09dc3a1a27c6c065ab176ce0},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2609.25682. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

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 requires in-depth domain knowledge of the Rust language features, which requires significant effort for developers. To address this, tools for automatic C-to-Rust refactoring aim to generate safe Rust code leveraging static analysis and Large Language Models (LLMs). While these tools claim to achieve safety by reducing the unsafe Rust, the correlation with improving security is not clear. In this paper, we conduct a comprehensive empirical study on the reliability, safety, and correctness of various C-to-Rust refactoring methods. Specifically, we evaluate C2Rust-analyze, CROWN, C2SaferRust, and FLOURINE using a dataset of 116 C programs with memory security bugs from the NIST Juliet Test Suite. Based on 464 Rust programs generated by these tools, our evaluation focuses on three key aspects: the compilation correctness of the refactored programs, the effectiveness in mitigating original C bugs, and the tendency to introduce additional Rust bugs. The results indicate that 342 Rust programs fail to compile, 177 Rust programs inherit memory security bugs from the original C programs, and 77 new Rust bugs are introduced. We examine the rationale behind tool design and analyze the root cause of errors across various refactoring methods. Our findings indicate that current automated refactoring tools deliver memory safety as they define it, but not the broader memory security when adopting them.

Tema degli esploratori: fiducia digitale e crittografia (retro-catalogo arXiv: annunci del 2026-09-23 in cs.CR).
Categorie arXiv: Cryptography and Security (cs.CR).
Pagina del lavoro: https://arxiv.org/abs/2609.25682 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-08T13:55:11.729Z dalla pagina https://arxiv.org/catchup/cs.CR/2026-09-23?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).