[论文解读] Zest: Validity Fuzzing and Parametric Generators for Effective Random Testing
Zest 是一种反馈驱动的技术,可将 QuickCheck 风格的随机输入生成器转换为确定性参数化生成器,以提升具有结构化输入的程序在语义分析阶段的代码覆盖率和错误检测能力。通过将未类型参数空间中的变异映射到输入域的结构性变化,并利用代码覆盖率和有效性反馈,Zest 实现了 1.03 倍至 2.81 倍更高的分支覆盖率,并在 Maven 和 Rhino 等 Java 工具中发现了 10 个新错误,通常在每个错误发现后 10 分钟内完成。
Programs expecting structured inputs often consist of both a syntactic analysis stage, which parses raw input, and a semantic analysis stage, which conducts checks on the parsed input and executes the core logic of the program. Generator-based testing tools in the lineage of QuickCheck are a promising way to generate random syntactically valid test inputs for these programs. We present Zest, a technique which automatically guides QuickCheck-like randominput generators to better explore the semantic analysis stage of test programs. Zest converts random-input generators into deterministic parametric generators. We present the key insight that mutations in the untyped parameter domain map to structural mutations in the input domain. Zest leverages program feedback in the form of code coverage and input validity to perform feedback-directed parameter search. We evaluate Zest against AFL and QuickCheck on five Java programs: Maven, Ant, BCEL, Closure, and Rhino. Zest covers 1.03x-2.81x as many branches within the benchmarks semantic analysis stages as baseline techniques. Further, we find 10 new bugs in the semantic analysis stages of these benchmarks. Zest is the most effective technique in finding these bugs reliably and quickly, requiring at most 10 minutes on average to find each bug.
研究动机与目标
- 提升具有结构化输入的程序在语义分析阶段的随机输入生成效果。
- 解决现有基于生成器的测试工具在针对深层语义检查而非仅语法有效性方面的局限性。
- 开发一种技术,自动引导输入生成过程,以探索未测试或存在漏洞的语义逻辑路径。
- 减少在真实程序的语义分析组件中发现细微错误所需的时间和精力。
提出的方法
- 通过引入参数化输入模型,将随机输入生成器转换为确定性参数化生成器。
- 将未类型参数空间中的变异映射到输入域的结构性变异,实现针对性探索。
- 利用代码覆盖率和输入有效性反馈,引导参数搜索向未测试或无效路径推进。
- 通过反馈驱动的搜索迭代优化参数,以最大化语义分析逻辑的覆盖率。
- 利用输入语法结构和语义约束,生成既符合语法规则又具备语义多样性的输入。
实验结果
研究问题
- RQ1反馈驱动的参数搜索能否提升结构化输入程序中语义分析逻辑的覆盖率?
- RQ2由有效性与覆盖率反馈引导的参数化生成器能否优于传统随机生成器以发现错误?
- RQ3此类技术在检测真实程序中先前未知的错误方面效率如何?
- RQ4所发现漏洞的性能开销和检测时间是多少?
主要发现
- 与基线技术相比,Zest 在五个 Java 基准程序的语义分析阶段实现了 1.03 倍至 2.81 倍更高的分支覆盖率。
- Zest 在 Maven、Ant、BCEL、Closure 和 Rhino 的语义分析组件中发现了 10 个新错误。
- Zest 平均在 10 分钟内定位每个错误,证明了其高效性。
- 在所评估的方法中,Zest 是在可靠且快速识别语义分析错误方面最有效的技术。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。