[Paper Review] Badger: Complexity Analysis with Fuzzing and Symbolic Execution
Badger is a hybrid complexity analysis framework that combines fuzzing and symbolic execution to efficiently discover worst-case time and space complexity vulnerabilities in Java programs. By jointly guiding input generation toward high-resource paths, it achieves significantly faster discovery of worst-case executions than either technique alone.
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.
Motivation & Objective
- To address the challenge of identifying worst-case time and space complexity vulnerabilities that arise when execution costs deviate significantly from average cases.
- To overcome the limitations of fuzzing—such as poor path reachability in deep code paths—by integrating symbolic execution.
- To mitigate symbolic execution's path explosion problem by using fuzzing to guide exploration toward high-cost paths.
- To develop a scalable, hybrid approach that leverages the strengths of both techniques for efficient complexity analysis in real-world Java applications.
Proposed method
- Badger integrates fuzzing and symbolic execution in a synergistic manner to explore program paths that maximize resource cost (time or space).
- Fuzzing generates diverse inputs to increase code coverage and target high-cost paths, especially in shallow or easily reachable regions.
- Symbolic execution is customized to prioritize paths that increase resource cost, using constraints to guide search toward worst-case scenarios.
- The framework uses a feedback loop where fuzzing identifies promising input regions, and symbolic execution explores deep or complex paths within them.
- Implementation is built on Kelinci (fuzzing) and Symbolic PathFinder (symbolic execution), tailored for Java programs.
- Resource cost is modeled as a metric tracked per execution path, used to guide both fuzzing and symbolic execution toward worst-case behavior.
Experimental results
Research questions
- RQ1Can a hybrid approach combining fuzzing and symbolic execution effectively discover worst-case complexity vulnerabilities in Java programs?
- RQ2How does the integration of fuzzing and symbolic execution improve the efficiency of finding high-cost execution paths compared to using either technique in isolation?
- RQ3To what extent can symbolic execution be guided to avoid path explosion while still exploring deep, high-cost paths?
- RQ4How does Badger's performance compare to standalone fuzzing or symbolic execution in terms of time-to-detection of worst-case executions?
Key findings
- Badger significantly reduces the time required to generate worst-case executions compared to using fuzzing or symbolic execution alone.
- The hybrid approach achieves higher efficiency in discovering high-resource-cost paths by combining the broad input exploration of fuzzing with the targeted path traversal of symbolic execution.
- By guiding symbolic execution toward high-cost paths, Badger mitigates the path explosion problem common in symbolic execution.
- The integration of fuzzing and symbolic execution enables the discovery of worst-case complexity bugs that are otherwise difficult to trigger with either technique in isolation.
- Evaluation on Java applications confirms that Badger outperforms standalone approaches in both speed and effectiveness for worst-case complexity analysis.
- The framework demonstrates practical scalability and effectiveness in real-world software analysis scenarios.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.