paperbot · PL 论文追踪

全部论文 待读 收藏

P2 FRIES: Fuzzing Rust Library Interactions via Efficient Ecosystem-Guided Target Generation

FRIES:通过高效的生态系统引导目标生成对 Rust 库交互进行模糊测试
ISSTA Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis2024匹配度 2/10 · 该论文属于 Rust 库 API 交互的模糊测试与测试目标生成,核心是动态测试和依赖图引导的 fuzzing,并未涉及用户重点关注静态分析、LLM/Agent 与程序分析交叉、浮点程序分析或贝叶斯程序分析。仅因同属程序语言/软件工程领域而具有较弱相关性。引用 7 inbox
Xizhe Yin, Yang Feng, Qingkai Shi, Zixi Liu, Hongwang Liu, Baowen Xu
crossref: 2026-09-12

AI 速览

一句话:FRIES 遍历编码生态使用模式的加权 API 依赖图并保证所有权合规,高效生成 fuzz target 以测试 Rust 库交互。

Rust 库是生态系统的核心组件,但其 API 交互测试面临挑战:现有方法缺乏符合所有权规则的 API 测试手段,难以应对函数依赖的巨大搜索空间,且受限于预选代码库,查错效率低。本文提出模糊测试技术 FRIES,高效合成并测试复杂 API 交互以发现 Rust 库缺陷。其核心是遍历加权 API 依赖图,该图既编码函数间的语法依赖,也编码从 Rust 生态挖掘的常见使用模式,从而显著缩小搜索空间,聚焦常见应用场景中的隐藏缺陷;同时设计所有权保证算法确保生成程序有效,提高 fuzz target 的编译成功率。实验表明,FRIES 能以极少计算资源生成高质量 fuzz target,并更高效地发现对实际开发影响更大的错误。在 20 个知名 Rust 库的最新版本中,FRIES 共发现 130 个 bug,其中 84 个为先前未知,54 个已被确认。

问题
现有方法在测试 Rust API 交互时,缺乏符合所有权规则的 API 测试方法,难以处理函数依赖的巨大搜索空间,或受限于预选代码库,导致发现错误的效率低下。
方法
FRIES 遍历加权 API 依赖图,该图同时编码函数间的语法依赖与从 Rust 生态挖掘的常见使用模式,以缩小搜索空间;并设计所有权保证算法确保生成的 Rust 程序有效可编译。
评估
在 20 个知名 Rust 库的最新版本上进行实验,FRIES 以极少计算资源生成高质量 fuzz target,共发现 130 个 bug,其中 84 个为先前未知、54 个已被确认。
原文摘要(Abstract)

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.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot8556,
  title = {FRIES: Fuzzing Rust Library Interactions via Efficient Ecosystem-Guided Target Generation},
  author = {Xizhe Yin and Yang Feng and Qingkai Shi and Zixi Liu and Hongwang Liu and Baowen Xu},
  booktitle = {ISSTA},
  year = {2024},
  doi = {10.1145/3650212.3680348}
}