[论文解读] Badger: Complexity Analysis with Fuzzing and Symbolic Execution
Badger 是一种混合复杂度分析框架,结合模糊测试与符号执行,以高效发现 Java 程序中的最坏情况时间与空间复杂度漏洞。通过协同引导输入生成以指向高资源消耗路径,其发现最坏情况执行的速度显著快于单独使用任一技术。
Hybrid testing approaches that involve fuzz testing and symbolic execution have shown promising results in achieving high code coverage, uncovering subtle errors and vulnerabilities in a variety of software applications. In this paper we describe Badger - a new hybrid approach for complexity analysis, with the goal of discovering vulnerabilities which occur when the worst-case time or space complexity of an application is significantly higher than the average case. Badger uses fuzz testing to generate a diverse set of inputs that aim to increase not only coverage but also a resource-related cost associated with each path. Since fuzzing may fail to execute deep program paths due to its limited knowledge about the conditions that influence these paths, we complement the analysis with a symbolic execution, which is also customized to search for paths that increase the resource-related cost. Symbolic execution is particularly good at generating inputs that satisfy various program conditions but by itself suffers from path explosion. Therefore, Badger uses fuzzing and symbolic execution in tandem, to leverage their benefits and overcome their weaknesses. We implemented our approach for the analysis of Java programs, based on Kelinci and Symbolic PathFinder. We evaluated Badger on Java applications, showing that our approach is significantly faster in generating worst-case executions compared to fuzzing or symbolic execution on their own.
研究动机与目标
- 为解决最坏情况时间与空间复杂度漏洞的识别挑战,此类漏洞通常在执行成本与平均情况显著偏离时出现。
- 通过集成符号执行,克服模糊测试在深层代码路径中路径可达性差的局限。
- 通过使用模糊测试引导探索高成本路径,缓解符号执行的路径爆炸问题。
- 开发一种可扩展的混合方法,充分利用两种技术的优势,实现在真实世界 Java 应用中的高效复杂度分析。
提出的方法
- Badger 以协同方式集成模糊测试与符号执行,以探索最大化资源消耗(时间或空间)的程序路径。
- 模糊测试生成多样化输入,以提升代码覆盖率并聚焦于高成本路径,尤其在浅层或易达区域。
- 符号执行经过定制,优先选择增加资源消耗的路径,利用约束引导搜索朝向最坏情况场景。
- 该框架采用反馈循环机制:模糊测试识别出有潜力的输入区域,符号执行则在其中探索深层或复杂路径。
- 实现基于 Kelinci(模糊测试)与 Symbolic PathFinder(符号执行),专为 Java 程序定制。
- 资源消耗以每条执行路径的度量进行建模,用于引导模糊测试与符号执行共同朝向最坏情况行为。
实验结果
研究问题
- RQ1结合模糊测试与符号执行的混合方法能否有效发现 Java 程序中的最坏情况复杂度漏洞?
- RQ2模糊测试与符号执行的集成如何提升发现高成本执行路径的效率,相较于单独使用任一技术?
- RQ3在仍能探索深层高成本路径的前提下,符号执行在多大程度上可被引导以避免路径爆炸?
- RQ4在检测最坏情况执行的时间方面,Badger 的性能与独立使用模糊测试或符号执行相比如何?
主要发现
- 与单独使用模糊测试或符号执行相比,Badger 显著减少了生成最坏情况执行所需的时间。
- 该混合方法通过结合模糊测试的广泛输入探索能力与符号执行的精准路径遍历能力,在发现高资源消耗路径方面实现了更高的效率。
- 通过引导符号执行聚焦于高成本路径,Badger 缓解了符号执行中常见的路径爆炸问题。
- 模糊测试与符号执行的集成使得原本难以通过单一技术触发的最坏情况复杂度错误得以被发现。
- 在 Java 应用上的评估表明,Badger 在最坏情况复杂度分析的速度与有效性方面均优于独立方法。
- 该框架在真实世界软件分析场景中展现出实际的可扩展性与有效性。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。