DARWIN: Survival of the Fittest Fuzzing Mutators

Patrick Jauernig, Domagoj Jakobović, Stjepan Picek, Emmanuel Stapf, Ahmad‐Reza Sadeghi

Abstract

Fuzzing is an automated software testing technique broadly adopted by the industry. A popular variant is mutation-based fuzzing, which discovers a large number of bugs in practice. While the research community has studied mutation-based fuzzing for years now, the algorithms' interactions within the fuzzer are highly complex and can, together with the randomness in every instance of a fuzzer, lead to unpredictable effects. Most efforts to improve this fragile interaction focused on optimizing seed scheduling. However, real-world results like Google's FuzzBench highlight that these approaches do not consistently show improvements in practice. Another approach to improve the fuzzing process algorithmically is optimizing mutation scheduling. Unfortunately, existing mutation scheduling approaches also failed to convince because of missing real-world improvements or too many user-controlled parameters whose configuration requires expert knowledge about the target program. This leaves the challenging problem of cleverly processing test cases and achieving a measurable improvement unsolved. We present DARWIN, a novel mutation scheduler and the first to show fuzzing improvements in a realistic scenario without the need to introduce additional user-configurable parameters, opening this approach to the broad fuzzing community. DARWIN uses an Evolution Strategy to systematically optimize and adapt the probability distribution of the mutation operators during fuzzing. We implemented a prototype based on the popular general-purpose fuzzer AFL. DARWIN significantly outperforms the state-of-the-art mutation scheduler and the AFL baseline in our own coverage experiment, in FuzzBench, and by finding 15 out of 21 bugs the fastest in the MAGMA benchmark. Finally, DARWIN found 20 unique bugs (including one novel bug), 66% more than AFL, in widely-used real-world applications.

Introduction

Mutation-based fuzzing, exemplified by tools like American Fuzzy Lop (AFL), has become a cornerstone of modern software security testing. These fuzzers work by taking a set of initial "seed" inputs and applying various mutation operators—such as bit-flips, byte deletions, or integer insertions—to generate new test cases. If a mutated input triggers a new execution path or a crash, it is saved for further exploration.

A critical but often overlooked component of this process is the Havoc Stage, where multiple mutations are applied in rapid succession. The challenge lies in scheduling: out of dozens of available mutation operators, which ones are most likely to yield new coverage for a specific target? Historically, fuzzers have used a uniform random distribution, treating all mutators as equally effective. While some advanced schedulers like MOPT have attempted to optimize this, they often introduce significant computational overhead or require complex manual tuning of "knobs" that demand expert knowledge of the target program. DARWIN addresses these limitations by introducing a lightweight, parameter-free mutation scheduler based on an Evolution Strategy.

The DARWIN Architecture

DARWIN treats mutation selection as a dynamic optimization problem. Instead of relying on a static or manually tuned distribution, it employs a $(\mu + \lambda)$-Evolution Strategy (ES) to adapt the probability distribution of mutation operators on the fly.

Figure 1: Overview of the DARWIN architecture, showing the feedback loop between the instrumented target and the mutation scheduler.

As illustrated in Figure 1, the system operates through a continuous feedback loop:

  1. Initialization: The fuzzer begins with a uniform probability distribution for its mutation operators.
  2. Population Management: DARWIN maintains a set of "parent" probability distributions.
  3. Perturbation: In each generation, it creates "child" distributions by slightly tweaking the weights of the parent distributions (e.g., increasing the probability of a bit-flip while decreasing byte-overwrites).
  4. Fitness Evaluation: The "fitness" of a distribution is determined by its success in discovering new execution paths in the instrumented target.
  5. Selection: Distributions that successfully expand code coverage are retained as parents for the next generation, while less effective ones are discarded.

Crucially, DARWIN is designed to be extremely lightweight, adding only approximately 320 lines of code to the AFL baseline. This ensures that the algorithmic gains in "intelligence" are not offset by a reduction in execution speed—a common pitfall for more complex schedulers.

Experimental Evaluation

To validate DARWIN's effectiveness, the authors conducted extensive testing against the standard AFL baseline and the state-of-the-art scheduler MOPT. The evaluation spanned several rigorous benchmarks:

  • GNU binutils: Standard utilities like objdump and readelf were used to measure raw code coverage.
  • Google FuzzBench: A standardized platform for evaluating fuzzers on diverse real-world targets such as openssl and sqlite3.
  • MAGMA: A ground-truth benchmark containing real-world bugs forward-ported to modern software to test bug-finding speed.

Key Results and Insights

DARWIN demonstrated superior performance across all metrics, particularly in its ability to find deep, complex bugs that other fuzzers missed.

Code Coverage and Efficiency

In coverage experiments, DARWIN consistently outperformed both AFL and MOPT. For instance, on the objdump utility, DARWIN maintained a significantly higher rate of path discovery throughout the 24-hour test period.

Figure 4: Path discovery over time for the objdump utility, comparing DARWIN against AFL, MOPT, and AFL-S.

Beyond raw coverage, DARWIN proved to be highly efficient. It achieved a geometric mean execution speed 48.26% faster than MOPT, proving that an Evolution Strategy can provide sophisticated scheduling without the heavy performance penalties associated with Particle Swarm Optimization used in previous tools.

Real-World Bug Discovery

In practical applications, DARWIN found 20 unique bugs, a 66% improvement over the 12 found by AFL. One of the most notable findings was a novel memory leak in objcopy that had remained undetected for 24 years. This bug was buried deep within the program's logic, requiring a specific sequence of mutations that DARWIN's adaptive strategy was uniquely equipped to prioritize.

Conclusion

DARWIN represents a significant step forward in mutation scheduling. By replacing static distributions and complex, manually-tuned schedulers with a simple yet effective Evolution Strategy, it provides a "set-and-forget" solution that delivers measurable improvements in both coverage and bug discovery. Future work may explore multi-objective optimization, rewarding mutations that not only find new paths but also reach deeper code branches or target specific vulnerability patterns.

Summary updated

BibTeX
@inproceedings{jauernig2023darwin,
  author = {Patrick Jauernig and Domagoj Jakobović and Stjepan Picek and Emmanuel Stapf and Ahmad‐Reza Sadeghi},
  title = {{DARWIN: Survival of the Fittest Fuzzing Mutators}},
  booktitle = {NDSS},
  year = {2023},
  url = {https://openreview.net/forum?id=ZCG1OkzY07u},
}
Figure