DARWIN: Survival of the Fittest Fuzzing Mutators

Patrick Jauernig, Domagoj Jakobovic, Stjepan Picek, Emmanuel Stapf, Ahmad-Reza Sadeghi · DOI

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 is a cornerstone of modern software security. It works by taking a "seed" input and applying various mutations—such as flipping bits, swapping bytes, or deleting chunks—to observe if the modified input triggers a program crash. Despite its success, most industry-standard fuzzers, like AFL, treat all mutation operators with equal probability. This approach ignores the fact that the effectiveness of a specific mutation often depends heavily on the target program's structure.

Previous attempts to optimize mutation scheduling, such as MOPT, utilized complex algorithms like Particle Swarm Optimization. However, these methods often introduced significant computational overhead or required expert-level parameter tuning. Consequently, they frequently failed to demonstrate consistent improvements in rigorous, large-scale benchmarks like Google’s FuzzBench. DARWIN addresses these challenges by introducing an automated, adaptive mutation scheduler that requires zero manual tuning.

Methodology: The DARWIN Scheduler

DARWIN integrates a $(\mu + \lambda)$-Evolution Strategy directly into the fuzzer's "havoc" stage. The core idea is to treat the probability distribution of mutation operators as an optimization problem that evolves in real-time based on feedback from the target program.

DARWIN's integration into the fuzzer's havoc stage, showing the feedback loop between the mutation scheduler and the instrumented target.

As shown in the architecture above, DARWIN maintains a probability distribution (the "parent"). During the fuzzing process, it generates variations of this distribution ("children"), evaluates their performance based on the resulting code coverage (fitness score), and selects the most successful distribution to be the next parent. This lightweight design uses binary encoding and fast random number generation to ensure that the "smarter" scheduling does not come at the cost of execution speed. In fact, DARWIN achieves a 48% higher execution speed than MOPT.

Evaluation and Key Results

DARWIN was evaluated across a diverse set of benchmarks, including GNU binutils, Google FuzzBench, MAGMA, and LAVA-M. A key finding was the importance of adaptation; a static optimized distribution is significantly less effective than one that adapts as the fuzzer reaches deeper code paths.

Comparison of path discovery over time for objcopy, showing DARWIN consistently outperforming AFL, MOPT, and AFL-S.

Performance Highlights:

  • Superior Coverage: DARWIN achieved a geometric mean improvement of 6.77% in edge coverage over MOPT and 1.73% over the AFL baseline. As seen in the objcopy benchmark, DARWIN discovers more paths faster than competing tools.
  • Bug Discovery: In the MAGMA benchmark, DARWIN found 15 out of 21 bugs the fastest. In real-world applications, it discovered 20 unique bugs—a 66% increase over AFL—including a 24-year-old memory leak in objcopy.
  • Zero-Tuning: DARWIN is a plug-and-play solution, requiring no manual configuration, making it accessible for broad industrial use.

Conclusion and Future Work

DARWIN demonstrates that an adaptive, evolution-based mutation scheduler can provide measurable improvements in fuzzing efficiency and bug discovery without the complexity of manual tuning. While highly effective for general mutation, future work could explore combining DARWIN with grammar-aware techniques for structured inputs or incorporating multi-objective fitness functions to optimize for crash frequency alongside code coverage.

Summary updated

BibTeX
@inproceedings{jauernig2023darwin,
  author = {Patrick Jauernig and Domagoj Jakobovic 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