[Paper Review] Matryoshka: Fuzzing Deeply Nested Branches
This paper proposes Matryoshka, a greybox fuzzer that efficiently explores deeply nested conditional branches by analyzing control flow and taint flow dependencies. It uses three strategies—reachability prioritization, satisfiability prioritization, and joint optimization—to solve complex path constraints, achieving significantly higher code coverage and discovering 41 new bugs with 12 CVEs in 13 open-source programs.
Greybox fuzzing has made impressive progress in recent years, evolving from heuristics-based random mutation to approaches for solving individual path constraints. However, they have difficulty solving path constraints that involve deeply nested conditional statements, which are common in image and video decoders, network packet analyzers, and checksum tools. We propose an approach for addressing this problem. First, we identify all the control flow-dependent conditional statements of the target conditional statement. Next, we select the data flow-dependent conditional statements. Finally, we use three strategies to find an input that satisfies all conditional statements simultaneously. We implemented this approach in a tool called Matryoshka and compared its effectiveness on 13 open source programs against other state-of-the-art fuzzers. Matryoshka found significantly more unique crashes than AFL, QSYM, and Angora. We manually classified those crashes into 41 unique new bugs, and obtained 12 CVEs. Our evaluation also uncovered the key technique contributing to Matryoshka's impressive performance: it collects only the nesting constraints that may cause the target conditional statements unreachable, which greatly simplifies the constraints that it has to solve.
Motivation & Objective
- To address the challenge of coverage-based greybox fuzzers in reaching deeply nested conditional branches in real-world software.
- To identify and resolve path constraints involving multiple nested conditionals that traditional fuzzers fail to solve.
- To reduce the search space by focusing only on conditionals that can make a target branch unreachable.
- To improve fuzzer effectiveness in discovering vulnerabilities in image/video decoders, network parsers, and checksum tools.
- To design a unified framework that combines reachability, satisfiability, and joint optimization strategies for constraint solving.
Proposed method
- Identifies control flow-dependent conditionals that must be satisfied for a target branch to be reachable.
- Applies taint analysis to select only input bytes that flow into relevant conditionals, reducing search space.
- Prioritizes mutation based on reachability: focuses on conditionals that block the target path if unsatisfied.
- Uses satisfiability prioritization to guide mutations toward inputs that satisfy the most constraining predicates first.
- Employs joint optimization to simultaneously satisfy multiple interdependent conditionals by analyzing shared input dependencies.
- Integrates dynamic taint tracking (DTA++) to avoid under-tainting while minimizing over-tainting in data transformations.
Experimental results
Research questions
- RQ1Can a fuzzer effectively explore deeply nested conditional branches that are unreachable due to prior control dependencies?
- RQ2How can taint and control flow dependencies be jointly modeled to reduce the complexity of path constraint solving?
- RQ3What mutation strategies are most effective for solving interdependent path constraints in nested conditionals?
- RQ4To what extent can reachability and satisfiability prioritization improve code coverage in real-world programs?
- RQ5Can a unified strategy combining reachability, satisfiability, and joint optimization outperform existing fuzzers in vulnerability discovery?
Key findings
- Matryoshka achieved significantly higher cumulative line and branch coverage than AFL, QSYM, and Angora on 13 open-source programs.
- The tool discovered 41 unique new bugs, 12 of which were assigned CVE identifiers.
- Over 90% of unsolved constraints in Angora were due to nested conditionals, highlighting the problem's prevalence.
- The three core strategies—reachability, satisfiability, and joint optimization—were complementary and collectively solved more constraints than any single strategy alone.
- Dynamic taint tracking with DTA++ enabled precise input byte selection, reducing unnecessary mutations and improving efficiency.
- The approach effectively handled complex real-world programs such as image decoders and network packet analyzers, where nested conditionals are common.
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.