paperbot · PL 论文追踪

全部论文 待读 收藏

P1 How Effective Are They? Exploring Large Language Model Based Fuzz Driver Generation

它们有多有效?探索基于大语言模型的模糊测试驱动器生成
ISSTA Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis2024匹配度 6/10 · 该论文属于 LLM 用于程序分析与测试的交叉方向,系统评测了 LLM 生成 fuzz driver 的有效性、提示策略与工业差距,并包含工业界落地案例,与“LLM/Agent 作为工具改进程序分析”的关切有一定重合。但它聚焦模糊测试中的 fuzz driver 生成,而非静态分析/形式化验证,也不涉及浮点或贝叶斯程序分析,因此不构成研究方向核心。引用 35 inbox
Cen Zhang, Yaowen Zheng, Mingqiang Bai, Yeting Li, Wei Ma, Xiaofei Xie, Yuekang Li, Limin Sun, Yang Liu
crossref: 2026-09-12

AI 速览

一句话:首个系统性实证研究:大规模评测 LLM 生成 fuzz driver 的有效性、提示策略与工业界差距。

模糊测试驱动器(fuzz driver)是库 API 模糊测试的关键,但自动生成正确、鲁棒的 API 使用代码十分困难。基于 LLM 的文本化生成方法比传统程序分析生成器更通用、可读,但其有效性与挑战尚缺乏系统认识。本文开展首个深入研究:构建覆盖 30 个常用 C 项目、共 86 个问题的数据集,设计 6 种提示策略,在 5 个先进 LLM 与 5 种温度设置下评估 736,430 个 driver(8.5 亿 token),并与工业界 driver 进行 3.75 CPU 年的大规模模糊测试对比。结果发现:LLM 生成 driver 的模糊测试效果已接近工业水平,但对 API 细节复杂的场景仍力不从心;重复查询、示例查询与迭代查询三类提示设计有益;扩展 API 使用范围、引入语义 oracle 检测逻辑缺陷仍有很大提升空间。相关经验已用于改进 OSS-Fuzz-Gen。

问题
基于 LLM 生成 fuzz driver 是有前景的新方向,但其实际有效性、适用边界与潜在挑战尚缺乏系统性的实证认识。
方法
构建含 30 个广泛使用 C 项目、86 个生成问题的数据集,设计 6 种提示策略,在 5 个 SOTA LLM、5 种温度设置下共生成并评估 736,430 个 fuzz driver,并与工业界使用的 driver 进行对比。
评估
通过总计 3.75 CPU 年的大规模模糊测试实验,比较 LLM 生成 driver 与工业界 driver 的模糊测试效果,并分析提示策略、API 复杂度等对生成质量的影响。
原文摘要(Abstract)

Fuzz drivers are essential for library API fuzzing. However, automatically generating fuzz drivers is a complex task, as it demands the creation of high-quality, correct, and robust API usage code. An LLM-based (Large Language Model) approach for generating fuzz drivers is a promising area of research. Unlike traditional program analysis-based generators, this text-based approach is more generalized and capable of harnessing a variety of API usage information, resulting in code that is friendly for human readers. However, there is still a lack of understanding regarding the fundamental issues on this direction, such as its effectiveness and potential challenges. To bridge this gap, we conducted the first in-depth study targeting the important issues of using LLMs to generate effective fuzz drivers. Our study features a curated dataset with 86 fuzz driver generation questions from 30 widely-used C projects. Six prompting strategies are designed and tested across five state-of-the-art LLMs with five different temperature settings. In total, our study evaluated 736,430 generated fuzz drivers, with 0.85 billion token costs ($8,000+ charged tokens). Additionally, we compared the LLM-generated drivers against those utilized in industry, conducting extensive fuzzing experiments (3.75 CPU-year). Our study uncovered that: 1) While LLM-based fuzz driver generation is a promising direction, it still encounters several obstacles towards practical applications; 2) LLMs face difficulties in generating effective fuzz drivers for APIs with intricate specifics. Three featured design choices of prompt strategies can be beneficial: issuing repeat queries, querying with examples, and employing an iterative querying process; 3) While LLM-generated drivers can yield fuzzing outcomes that are on par with those used in the industry, there are substantial opportunities for enhancement, such as extending contained API usage, or integrating semantic oracles to facilitate logical bug detection. Our insights have been implemented to improve the OSS-Fuzz-Gen project, facilitating practical fuzz driver generation in industry.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot8569,
  title = {How Effective Are They? Exploring Large Language Model Based Fuzz Driver Generation},
  author = {Cen Zhang and Yaowen Zheng and Mingqiang Bai and Yeting Li and Wei Ma and Xiaofei Xie and Yuekang Li and Limin Sun and Yang Liu},
  booktitle = {ISSTA},
  year = {2024},
  doi = {10.1145/3650212.3680355}
}