Introduction
Symbolic execution is a robust technique for identifying software vulnerabilities by treating program inputs as symbolic variables. However, it frequently encounters the "structured input problem," where engines struggle to generate valid inputs for programs requiring specific formats, such as TIFF images or complex network protocols. In these scenarios, symbolic engines often exhaust computational resources exploring thousands of paths that terminate at initial input validation checks, failing to reach the program's core logic. This "input modeling hurdle" typically requires manual source code instrumentation, a process that is both labor-intensive and error-prone.
The InVaSion Framework
To address these challenges, the InVaSion tool guides symbolic execution engines like KLEE through structured input spaces. InVaSion utilizes a custom Input Specification Language (ISL) to model valid input formats, allowing the engine to bypass trivial validation errors and focus on deeper program states.
The system operates through a multi-stage pipeline. First, a high-level ISL description of the input format is provided. A compiler then translates this into a low-level representation. Simultaneously, a Program Modifier adapts the target program to interact with this specification, creating a "non-deterministic" version that leverages the symbolic engine's native forking capabilities to explore only valid input paths.
Input Specification and Translation
The core of InVaSion is its expressive ISL, which extends standard Finite State Automata (FSA) with guarded transitions, registers for state tracking, and commands for register updates. This allows the modeling of semantic dependencies—such as length fields or count-dependent structures—which are common in real-world data formats but difficult for context-free grammars to capture.
As shown in the figure above, the high-level specification (a) is compiled into a low-level FSA (b). This translation process ensures that the non-deterministic choices made during symbolic execution are consistent with the intended input model. Furthermore, InVaSion employs "input slicing" to fragment complex specifications into disjoint constraints. This optimization prevents the underlying SMT solvers from becoming overwhelmed by massive, monolithic input rules, maintaining high execution efficiency.
Evaluation and Key Results
InVaSion was evaluated against baseline KLEE using benchmarks from the Siemens Suite, MiBenchmarks, and complex real-world utilities like TiffSplit. The results demonstrate a significant improvement in testing efficacy:
- Coverage Improvement: Average branch coverage increased from 24.97% to 67.84%.
- Efficiency: InVaSion reached 50% coverage in the same time KLEE reached only 21%.
- Expressivity: Complex formats like TIFF were modeled with approximately 35 states, proving the ISL's conciseness and power.
Conclusion
InVaSion effectively bridges the gap between high-level input requirements and low-level symbolic exploration. By automating the generation of valid symbolic inputs through an expressive ISL and efficient translation, it dramatically increases the depth and breadth of program analysis. Future work will focus on automatically inferring ISL specifications from sample inputs and implementing scheduling heuristics to prioritize bug-prone input patterns.
Summary updated