FRIES: Fuzzing Rust Library Interactions via Efficient Ecosystem-Guided Target Generation
Xizhe Yin, Yang Feng, Qingkai Shi, Zixi Liu, Hongwang Liu, Baowen Xu
摘要
Rust has been extensively used in software development in the past decades due to its memory safety mechanisms and gradually matured ecosystems. Enhancing the quality of Rust libraries is critical to Rust ecosystems as the libraries are often the core component of software systems. Nevertheless, we observe that existing approaches fall short in testing Rust API interactions - they either lack a Rust ownership-compliant API testing method, fail to handle the large search space of function dependencies, or are limited by pre-selected codebases, resulting in inefficiencies in finding errors. To address these issues, we propose a fuzzing technique, namely FRIES, that efficiently synthesizes and tests complex API interactions to identify defects in Rust libraries, and therefore promises to significantly improve the quality of Rust libraries. Behind our approach, a key technique is to traverse a weighted API dependency graph, which encodes not only syntactic dependency between functions but also the common usage patterns mined from the Rust ecosystem that reflect the programmer’s thinking. Combined with our efficient generation algorithm, such a graph structure significantly reduces the search space and lets us focus on finding hidden bugs in common application scenarios. Meanwhile, an ownership assurance algorithm is specially designed to ensure the validity of the generated Rust programs, notably improving the success rate of compiling fuzz targets. Experimental results demonstrate that this technique can indeed generate high-quality fuzz targets with minimal computational resources, while more efficiently discovering errors that have a greater impact on actual development, thereby mitigating the impact on the robustness of programs in the Rust ecosystem. So far, FRIES has identified 130 bugs, including 84 previously unknown bugs, in 20 well-known latest versions of Rust libraries, of which 54 have been confirmed.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 4 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- MirChecker: Detecting Bugs in Rust Programs via Static Analysis 引用了 Understanding memory and thread safety practices and issues in real-world Rust programs
- Don't Panic! Finding Bugs Hidden Behind Rust Runtime Safety Checks 引用了 MirChecker: Detecting Bugs in Rust Programs via Static Analysis
- Rudra: Finding Memory Safety Bugs in Rust at the Ecosystem Scale 引用了 Understanding memory and thread safety practices and issues in real-world Rust programs
- deepSURF: Detecting Memory Safety Vulnerabilities in Rust Through Fuzzing LLM-Augmented Harnesses 引用了 Rudra: Finding Memory Safety Bugs in Rust at the Ecosystem Scale
- deepSURF: Detecting Memory Safety Vulnerabilities in Rust Through Fuzzing LLM-Augmented Harnesses 引用了 Understanding memory and thread safety practices and issues in real-world Rust programs
- MUTATO: Enhancing Fuzz Drivers with Adaptive API Option Mutation 引用了 APICraft: Fuzz Driver Generation for Closed-source SDK Libraries
- RustGo: Fairly Directed Greybox Fuzzing for Enforcing Rust Memory Safety 引用了 MirChecker: Detecting Bugs in Rust Programs via Static Analysis
- RustGo: Fairly Directed Greybox Fuzzing for Enforcing Rust Memory Safety 引用了 Don't Panic! Finding Bugs Hidden Behind Rust Runtime Safety Checks
- RustGo: Fairly Directed Greybox Fuzzing for Enforcing Rust Memory Safety 引用了 Rudra: Finding Memory Safety Bugs in Rust at the Ecosystem Scale
- RustGo: Fairly Directed Greybox Fuzzing for Enforcing Rust Memory Safety 引用了 deepSURF: Detecting Memory Safety Vulnerabilities in Rust Through Fuzzing LLM-Augmented Harnesses
引用它的顶会 Paper4
- deepSURF: Detecting Memory Safety Vulnerabilities in Rust Through Fuzzing LLM-Augmented HarnessesGeorgios C. Androutsopoulos, Antonio BianchiS&P 2026 · 5 次引用
- Don't Panic! Finding Bugs Hidden Behind Rust Runtime Safety ChecksZeyang Zhuang, Zilun Wang, Wei Meng, Michael R. LyuCCS 2025
- MUTATO: Enhancing Fuzz Drivers with Adaptive API Option MutationShuangxiang Kan, Xiao Cheng, Yuekang LiNDSS 2026
- RustGo: Fairly Directed Greybox Fuzzing for Enforcing Rust Memory SafetyDongyeon Yu, Jiun Min, Yewan Na, Mijung Kim 等CCS 2026
它引用的 Paper10
- Understanding memory and thread safety practices and issues in real-world Rust programsBoqin Qin, Yilun Chen, Zeming Yu, Linhai Song 等PLDI 2020 · 112 次引用
- APICraft: Fuzz Driver Generation for Closed-source SDK LibrariesCen Zhang, Xingwei Lin, Yuekang Li, Yinxing Xue 等USENIX Security 2021 · 64 次引用
- MirChecker: Detecting Bugs in Rust Programs via Static AnalysisZhuohua Li, Jincheng Wang, Mingshen Sun, John C. S. LuiCCS 2021 · 63 次引用
- Rudra: Finding Memory Safety Bugs in Rust at the Ecosystem ScaleYechan Bae, Youngsuk Kim, Ammar Askar, Jungwon Lim 等SOSP 2021 · 61 次引用
- Morest: Model-based RESTful API Testing with Execution FeedbackYi Liu, Yuekang Li, Gelei Deng, Yang Liu 等ICSE 2022 · 52 次引用
相关 Paper
- RPG: Rust Library Fuzzing with Pool-based Fuzz Target Generation and Generic SupportZhiwu Xu, Bohao Wu, Cheng Wen, Bin Zhang 等ICSE 2024 · 9 次引用
- RULF: Rust Library Fuzzing via API Dependency Graph TraversalJianfeng Jiang, Hui Xu, Yangfan ZhouASE 2021 · 44 次引用
- Crabtree: Rust API Test Synthesis Guided by Coverage and TypeYoshiki Takashima, Chanhee Cho, Ruben Martins, Limin Jia 等OOPSLA 2024 · 3 次引用
- Validating Rust Compilers with Trait-Type Constraint GraphXin Lai, Ming Wen, Xiaofei Liao, Hai JinSOSP 2026
- A Study of Undefined Behavior Across Foreign Function Boundaries in Rust LibrariesIan McCormack, Joshua Sunshine, Jonathan AldrichICSE 2025 · 5 次引用
