思考更多,利用更好:通过项目剖析和工作流分解实现状态机引导的测试 harness 自动生成
Thinking More, Harnessing Better: State Machine Guided Harness Automatic Generation with Project Digestion and Workflow Decomposition
AI总结:
研究针对现有大语言模型单轮生成模糊测试 harness 的局限,提出 SynapseFlow,通过数据流感知函数聚合和分阶段回滚算法,经四阶段过程合成 harness,在 25 个开源项目上评估,效果超现有工具,还发现多个未报告错误。
摘要:
高质量的模糊测试 harness 对于有效的灰盒模糊测试至关重要。虽然大语言模型为自动化此任务带来了希望,但现有的单轮生成方法由于粗粒度的函数目标和不匹配的生成工作流而存在幻觉和覆盖不足的问题。我们提出了 SynapseFlow,一种自动 harness 生成器,通过两项关键创新解决了这些限制:数据流感知函数聚合和分阶段、支持回滚的生成工作流分解。SynapseFlow 首先分析源代码以构建结构流程图并提取连贯的函数三元组。然后通过由分阶段回滚算法控制的分解四阶段过程合成 harness 以确保正确性。我们在 25 个实际开源软件项目上评估了 SynapseFlow。实验结果表明,SynapseFlow 优于现有工具(OSS-Fuzz-Gen、CKGFuzzer、PromeFuzz),分别实现了高 3.07 倍、1.71 倍和 4.26 倍的分支覆盖率,以及高 1.77 倍、1.51 倍和 1.36 倍的错误检测率。最重要的是,SynapseFlow 发现了 7 个以前未报告的错误(5 个被分配了 CVE),证明了其在实际错误发现中的实际有效性。
英文摘要:
High-quality fuzz harnesses are essential for effective gray-box fuzzing. While Large Language Models (LLMs) offer promise for automating this task, existing one-turn generation methods suffer from hallucinations and inadequate coverage due to coarse-grained function targeting and misaligned generation workflows. We present SynapseFlow, an automatic harness generator that addresses these limitations through two key innovations: dataflow-aware function aggregation and a staged, rollback-enabled generation workflow decomposition. SynapseFlow first analyzes source code to construct Structural Flow Graphs and extract coherent Function Triplets. It then synthesizes harnesses via a decomposed four-stage process governed by a staged rollback algorithm to ensure correctness. We evaluated SynapseFlow on 25 real-world open-source software projects. The experimental results indicate that SynapseFlow outperforms state-of-the-art tools (OSS-Fuzz-Gen, CKGFuzzer, PromeFuzz), achieving 3.07$\times$, 1.71$\times$, and 4.26$\times$ higher branch coverage, and 1.77$\times$, 1.51$\times$, and 1.36$\times$ higher bug detection rates, respectively. Most importantly, SynapseFlow discovered 7 previously unreported bugs (5 assigned CVEs), demonstrating its practical effectiveness in real-world bug discovery.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。