arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2312.17677cs.CRcs.SE
收藏

提示模糊测试用于模糊驱动程序生成

Prompt Fuzzing for Fuzz Driver Generation

Yunlong Lyu, Yuxuan Xie, Peng Chen, Hao Chen

AI总结:

提出PromptFuzz,一种覆盖率引导的提示模糊测试工具,通过迭代生成模糊驱动程序来探索未发现的库代码,在14个真实库上相比OSS-Fuzz和Hopper分别提升1.61倍和1.63倍分支覆盖率,并检测到33个真实新错误。

摘要:

编写高质量的模糊驱动程序不仅耗时,而且需要对库有深入的理解。然而,最先进的自动模糊驱动程序生成技术未能达到预期。虽然从消费代码派生的模糊驱动程序可以达到深层状态,但其覆盖率有限。相反,解释性模糊测试可以探索大多数API调用,但需要在大型搜索空间中进行大量尝试。我们提出了PromptFuzz,一种用于提示模糊测试的覆盖率引导的模糊器,它迭代地生成模糊驱动程序以探索未发现的库代码。为了在提示模糊测试期间探索模糊驱动程序中的API使用,我们提出了几项关键技术:指导性程序生成、错误程序验证、覆盖率引导的提示变异和约束模糊调度器。我们实现了PromptFuzz,并在14个真实世界的库上进行了评估。与OSS-Fuzz和Hopper(最先进的模糊驱动程序生成工具)相比,PromptFuzz生成的模糊驱动程序分别实现了比OSS-Fuzz和Hopper高1.61倍和1.63倍的分支覆盖率。此外,PromptFuzz生成的模糊驱动程序在总共49次崩溃中检测到33个真实的、新的错误,其中30个错误已得到各自社区的确认。

英文摘要:

Crafting high-quality fuzz drivers not only is time-consuming but also requires a deep understanding of the library. However, the state-of-the-art automatic fuzz driver generation techniques fall short of expectations. While fuzz drivers derived from consumer code can reach deep states, they have limited coverage. Conversely, interpretative fuzzing can explore most API calls but requires numerous attempts within a large search space. We propose PromptFuzz, a coverage-guided fuzzer for prompt fuzzing that iteratively generates fuzz drivers to explore undiscovered library code. To explore API usage in fuzz drivers during prompt fuzzing, we propose several key techniques: instructive program generation, erroneous program validation, coverage-guided prompt mutation, and constrained fuzzer scheduling. We implemented PromptFuzz and evaluated it on 14 real-world libraries. Compared with OSS-Fuzz and Hopper (the state-of-the-art fuzz driver generation tool), fuzz drivers generated by PromptFuzz achieved 1.61 and 1.63 times higher branch coverage than those by OSS-Fuzz and Hopper, respectively. Moreover, the fuzz drivers generated by PromptFuzz detected 33 genuine, new bugs out of a total of 49 crashes, out of which 30 bugs have been confirmed by their respective communities.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑