Lune

CCS2021Top-tier venue

MirChecker: Detecting Bugs in Rust Programs via Static Analysis

Zhuohua Li, Jincheng Wang, Mingshen Sun, John C. S. Lui

Abstract

Safe system programming is often a crucial requirement due to its critical role in system software engineering. Conventional low-level programming languages such as C and assembly are efficient, but their inherent unsafe nature makes it undesirable for security-critical scenarios. Recently, Rust has become a promising alternative for safe system-level programming. While giving programmers fine-grained hardware control, its strong type system enforces many security properties including memory safety. However, Rust's security guarantee is not a silver bullet. Runtime crashes and memory-safety errors still harass Rust developers, causing damaging exploitable vulnerabilities, as reported by numerous studies. In this paper, we present and evaluate MirChecker, a fully automated bug detection framework for Rust programs by performing static analysis on Rust's Mid-level Intermediate Representation (MIR). Based on the observation of existing bugs found in Rust codebases, our approach keeps track of both numerical and symbolic information, detects potential runtime crashes and memory-safety errors by using constraint solving techniques, and outputs informative diagnostics to users. We evaluate MirChecker on both buggy code snippets extracted from existing Common Vulnerabilities and Exposures (CVE) and real-world Rust codebases. Our experiments show that MirChecker can detect all the issues in our code snippets, and is capable of performing bug finding in real-world scenarios, where it detected a total of 33 previously unknown bugs including 16 memory-safety issues from 12 Rust packages (crates) with an acceptable false-positive rate.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

24 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • An Empirical Study of Rust-for-Linux: The Success, Dissatisfaction, and Compromise cites Securing unsafe rust programs with XRust
  • An Empirical Study of Rust-for-Linux: The Success, Dissatisfaction, and Compromise cites Understanding memory and thread safety practices and issues in real-world Rust programs
  • An Empirical Study of Rust-for-Linux: The Success, Dissatisfaction, and Compromise cites Is rust used safely by software developers?
  • Is unsafe an Achilles' Heel? A Comprehensive Study of Safety Requirements in Unsafe Rust Programming cites Understanding memory and thread safety practices and issues in real-world Rust programs
  • Is unsafe an Achilles' Heel? A Comprehensive Study of Safety Requirements in Unsafe Rust Programming cites Is rust used safely by software developers?
  • Rust for Embedded Systems: Current State and Open Problems cites Securing unsafe rust programs with XRust
  • Rust for Embedded Systems: Current State and Open Problems cites Understanding memory and thread safety practices and issues in real-world Rust programs
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers24

  1. An Empirical Study of Rust-for-Linux: The Success, Dissatisfaction, and CompromiseHongyu Li, Liwei Guo, Yexuan Yang, Shangguang Wang et al.USENIX ATC 2024 · 29 citations
  2. VeriSMo: A Verified Security Module for Confidential VMsZiqiao Zhou, Anjali, Weiteng Chen, Sishuai Gong et al.OSDI 2024 · 27 citations
  3. Combining Structured Static Code Information and Dynamic Symbolic Traces for Software Vulnerability PredictionHuanting Wang, Zhanyong Tang, Shin Hwei Tan, Jie Wang et al.ICSE 2024 · 15 citations
  4. Is unsafe an Achilles' Heel? A Comprehensive Study of Safety Requirements in Unsafe Rust ProgrammingMohan Cui, Shuran Sun, Hui Xu, Yangfan ZhouICSE 2024 · 12 citations
  5. Rust for Embedded Systems: Current State and Open ProblemsAyushi Sharma, Shashank Sharma, Sai Ritvik Tanksalkar, Santiago Torres-Arias et al.CCS 2024 · 12 citations

Builds on3

  1. Understanding memory and thread safety practices and issues in real-world Rust programsBoqin Qin, Yilun Chen, Zeming Yu, Linhai Song et al.PLDI 2020 · 112 citations
  2. Is rust used safely by software developers?Ana Nora Evans, Bradford Campbell, Mary Lou SoffaICSE 2020 · 57 citations
  3. Securing unsafe rust programs with XRustPeiming Liu, Gang Zhao, Jeff HuangICSE 2020 · 28 citations

Related papers

  1. CULPA: Universal Detection of Memory-Safety Bugs in Unsafe Rust Through the Lens of Safety RequirementsHung-Mao Chen, Bo Lu, Xu He, Xiaokuan Zhang et al.USENIX Security 2026
  2. Miri: Practical Undefined Behavior Detection for RustRalf Jung, Benjamin Kimock, Christian Poveda, Eduardo Sánchez Muñoz et al.POPL 2026 · 8 citations
  3. RustSan: Retrofitting AddressSanitizer for Efficient Sanitization of RustKyuwon Cho, Jongyoon Kim, Kha Dinh Duy, Hajeong Lim et al.USENIX Security 2024 · 7 citations
  4. Aliasing Limits on Translating C to Safe RustMehmet Emre, Peter Boyland, Aesha Parekh, Ryan Schroeder et al.OOPSLA 2023 · 32 citations
  5. Translating C to safer RustMehmet Emre, Ryan Schroeder, Kyle Dewey, Ben HardekopfOOPSLA 2021 · 60 citations
Dusk over the sea between two cliffs drawn in fine vertical lines