ELFuzz: Efficient Input Generation via LLM-driven Synthesis Over Fuzzer Space

Chuyang Chen, Brendan Dolan-Gavitt, Zhiqiang Lin · DOI

Introduction

Fuzzing is a cornerstone of modern software security, yet its effectiveness is often bottlenecked by the complexity of input formats. Systems that process structured text—such as SQL databases, XML parsers, and language compilers—require inputs that adhere to strict syntactic and semantic rules. Traditional mutation-based fuzzers, which apply random bit-flips to seed inputs, frequently fail to bypass early-stage validation logic, leaving deep-seated code paths unexplored.

To address this, researchers have turned to generation-based fuzzing. This approach utilizes predefined grammars or specifications to produce valid test cases. However, the manual construction of these specifications is a Herculean task; for instance, the development of the Csmith compiler fuzzer required over 80,000 lines of code. Automated grammar synthesis tools exist but often struggle with scalability, fail to capture intricate semantic constraints (e.g., variable definition-use chains), or introduce significant runtime overhead.

Methodology: Synthesis Over Fuzzer Space

ELFuzz introduces a paradigm shift by synthesizing standalone Python programs—the fuzzers themselves—rather than rigid grammars. This approach leverages the expressive power of general-purpose programming languages to handle complex logic naturally.

LLM-Driven Evolutionary Loop

ELFuzz employs an evolutionary strategy powered by a local Large Language Model (LLM), specifically CodeLlama-13B. Starting from a primitive script that generates random bytes, the system iteratively improves the fuzzer through three primary mutation operations:

  1. Splicing: Merging logic from two high-performing fuzzers.
  2. Completion: Prompting the LLM to finish a truncated fuzzer script.
  3. Infilling: Tasking the LLM with rewriting or optimizing specific segments of the code.

The Concept of Fuzzer Space

The core innovation of ELFuzz is the "fuzzer space," a mathematical framework used to guide the evolutionary process. Traditional fuzzers are often evaluated based on a scalar coverage metric (e.g., total lines hit). However, this ignores the diversity of coverage.

ELFuzz maps each synthesized fuzzer into a lattice structure based on the specific set of code edges it exercises. This allows the system to recognize that a fuzzer covering a small but unique set of edges is more valuable than one with higher total coverage that only hits common paths. To maintain a manageable population of "elite" fuzzers, ELFuzz utilizes a Set Cover approximation algorithm, ensuring the selected pool maximizes the union of all discovered code paths.

Experimental Evaluation

The effectiveness of ELFuzz was rigorously tested across seven diverse real-world systems: jsoncpp (JSON), libxml2 (XML), re2 (Regex), SQLite (SQL), CPython (Python), cvc5 (SMT-LIB 2), and librsvg (SVG).

To evaluate bug-finding performance, the researchers utilized FixReverter to inject thousands of realistic, artificial vulnerabilities into libxml2, SQLite, and CPython. This provided a controlled environment to compare ELFuzz against state-of-the-art baselines.

Key Insights and Results

The empirical results demonstrate that ELFuzz significantly advances the state of the art in automated fuzzer generation.

Performance and Coverage

ELFuzz achieved remarkable coverage gains, notably reaching up to 434.8% more edge coverage than the next best tool on the cvc5 benchmark. This success is attributed to the LLM's ability to synthesize code that understands semantic dependencies, such as generating a table in SQL and subsequently querying it—a task that remains difficult for grammar-based approaches.

Vulnerability Discovery

In controlled bug-finding experiments, ELFuzz triggered up to 216.7% more injected bugs than competing tools, often discovering them in a fraction of the time. More importantly, a 14-day deployment on the latest version of the cvc5 SMT solver led to the discovery of five previously unknown zero-day vulnerabilities. Three of these were confirmed as exploitable, including a high-severity format string injection.

The Importance of Fuzzer Space Guidance

Ablation studies confirmed that the "fuzzer space" guidance is critical to the system's performance. Removing this component resulted in a performance degradation of up to 62.5%, proving that tracking the specific sets of covered code is far more effective than optimizing for raw coverage counts.

Conclusion and Future Work

ELFuzz demonstrates that LLMs can be effectively harnessed to automate the creation of high-performance, format-aware fuzzers. By treating the fuzzer as a program and navigating the fuzzer space, the framework overcomes the limitations of manual grammar specification and traditional coverage metrics.

Future research directions include evolving the fuzzer dynamically during the fuzzing campaign to adapt to new code paths in real-time. Additionally, while ELFuzz currently starts from a naive random-byte generator, initializing the process with an LLM-generated "seed" fuzzer could further accelerate the discovery of complex input structures. Despite potential challenges with data contamination in LLMs, ELFuzz represents a significant step toward fully autonomous, high-efficiency security testing.

Summary updated

BibTeX
@inproceedings{chen2025elfuzz,
  author = {Chuyang Chen and Brendan Dolan-Gavitt and Zhiqiang Lin},
  title = {{ELFuzz: Efficient Input Generation via LLM-driven Synthesis Over Fuzzer Space}},
  booktitle = {USENIX Security},
  year = {2025},
}
Figure