MirChecker: Detecting Bugs in Rust Programs via Static Analysis


연구 분야: Strategies



학회: CCS '21: Proceedings of the 2021 ACM SIGSAC Conference on Computer and Communications Security


초록

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.


Author Profile
Zhuohua Li

The Chinese University of Hong Kong Shatin N.T. Hong Kong

Hong Kong
Author Profile
Jincheng Wang

The Chinese University of Hong Kong Shatin N.T. Hong Kong

Hong Kong
Author Profile
Mingshen Sun

Baidu Security Beijing China

China

📄 논문 정보

발행 연도 2021년
인용수 49
출판 국가 China, Hong Kong
사이트 ACM
좋아요 수 0

연관 논문 목록 (377건)