The Art of Fuzzing, Part 1: foundations
Overview
This is the first of five articles on fuzz testing. It introduces the technique from first principles and is intended to be read before the others. The later parts assume the vocabulary and the worked example developed here.
- Sections 1 and 2 define fuzzing, place it among other methods for finding vulnerabilities, and trace its origins.
- Sections 3 and 4 describe the components of a fuzzer and the main families of fuzzing techniques: blackbox, grammar-based, whitebox and greybox.
- Section 5 presents a small experiment that measures why coverage feedback is so effective.
- Sections 6 and 7 work through one memory-safety bug from first failure to regression test, and then examine the role of the test oracle.
- Sections 8 to 11 cover tool selection, common pitfalls, triage and reporting, and the emerging use of language models in fuzzing.
The series continues with Part 2 (native code and managed languages), Part 3 (web applications, APIs and network protocols) Part 4 (applications built on large language models) and Part 5 (the FuzzTest, LibAFL and WinAFL frameworks). Part 5 ends with a reference table of every tool covered in the series, what each is for and where it is used.
1. Introduction
Fuzz testing, or fuzzing, is the automatic generation and execution of test inputs with the goal of finding inputs that cause a program to fail. In security practice the term usually refers to testing code that processes untrusted input, such as file parsers, network services and document renderers, where a failure may indicate an exploitable vulnerability [2]. A fuzzer repeatedly constructs an input, runs the program on it, observes the result, and records any input that triggers a failure, so that the failure can later be reproduced and analysed.
The motivation is straightforward. Developers tend to test the inputs they anticipate, whereas attackers deliberately supply the inputs nobody anticipated: empty files, truncated records, length fields that disagree with the data that follows, and combinations of values that no specification describes. Code that parses such inputs is often large, old and written in C or C++ for performance, and a single unchecked length can allow an attacker to read or corrupt memory. Godefroid notes that Microsoft Windows alone supports more than 360 file formats, each handled by parsing code that must survive arbitrary input [2].
Fuzzing is one of three broad approaches to finding such vulnerabilities. Static analysis inspects code without running it; it is fast but tends to report false alarms and to miss bugs. Manual review and penetration testing are flexible and can find design flaws, but they are labour-intensive and difficult to scale. Fuzzing occupies a different position: every failure it reports comes with a concrete input that reproduces it, so it produces essentially no false positives, but it is computationally expensive and offers no guarantee of finding every bug [2], [3]. Its practical value has made it a standard part of secure development. Microsoft's Security Development Lifecycle requires fuzzing at every untrusted interface [2], and Google's OSS-Fuzz service, which fuzzes more than a thousand open-source projects continuously, had helped fix around 13,000 vulnerabilities and 50,000 other bugs by May 2025 [5].
2. Origins
The usual account of fuzzing's origin begins in the autumn of 1988 at the University of Wisconsin. Barton Miller was connected to a Unix system over a dial-up line, and electrical noise on the line corrupted the characters he typed. Several standard utilities crashed on the corrupted input. Miller recognised that random input could serve as a systematic test, and he set it as a class project: generate random character streams, feed them to the standard Unix utilities, and record which programs crash or hang. The resulting 1990 study found that roughly a quarter of the utilities tested failed in this way [1]. Miller called the random-input generator fuzz, and the name stuck.
Purely random input is effective against programs that read unstructured text, but its weakness becomes apparent on programs with a defined input format. Most parsers begin by checking a header, a magic number or a version field, and they reject the input at the first check if it is malformed. A random input almost never passes these checks, so the program exits early and the code behind the checks is never executed. Wagner describes this as the problem of “early exits”: random testing exercises the outermost layer of the parser and little else [3].
Two responses to this problem shaped the field. The first was mutational fuzzing, which starts from one or more valid example inputs, called seeds, and applies small random changes to them. Because the mutated inputs remain close to valid, they tend to pass the early checks and reach deeper code. The second was to describe the input format explicitly, as a grammar or a model, and generate inputs that conform to it. Both ideas remain in use, and Section 4 examines them together with the two later developments, symbolic execution and coverage feedback, that define modern fuzzing.
3. The anatomy of a fuzzer
Although fuzzers differ widely in design, almost every fuzzing setup can be decomposed into the five components shown in Table 1. Wagner's description of AFL identifies three of them (a mutator, a coverage oracle and a bug oracle) as the essential subroutines [3]; the harness and the reproducer complete the picture from the user's side.
| Component | Role | Example |
|---|---|---|
| Generator or mutator | Produces the next test input, either from a model of the format or by modifying an existing input | Flip a bit, delete a range of bytes, insert a dictionary token |
| Harness | Adapts the program under test so that the fuzzer can supply an input and observe the outcome | A function that receives a byte buffer and passes it to parse_packet() |
| Oracle | Decides whether a given execution constitutes a failure | The process crashed; a sanitizer reported an out-of-bounds read; a decoded value differs from the encoded one |
| Feedback | Reports information about the execution that guides the choice of future inputs | The input executed a branch that no previous input had executed |
| Reproducer | The saved failing input, together with the command that replays it | A file named crash-7ae6… and the binary that crashes on it |
Three further terms recur throughout the series. The corpus is the collection of inputs that the fuzzer has retained because they were useful, usually because they produced new feedback; it begins as the set of seeds and grows during a campaign. A sanitizer is a set of run-time checks inserted by the compiler into a test build, which converts silent errors such as out-of-bounds reads into immediate, reported failures; AddressSanitizer is the most widely used example [14]. A campaign is a single fuzzing run against a target with a fixed configuration and time budget.
4. A taxonomy of fuzzing techniques
Godefroid classifies fuzzing techniques into three main families, blackbox, grammar-based and whitebox, together with a set of approaches that combine them [2]. Coverage-guided greybox fuzzing, which is the dominant practical technique today, is best understood as one of those combinations. This section describes each family and its limitations.
4.1 Blackbox fuzzing
A blackbox fuzzer treats the program as opaque. It supplies inputs and observes only external outcomes, typically whether the program crashed, hung or produced an error. In its common mutational form, it takes a well-formed seed, overwrites a small number of randomly chosen bytes with random values, and runs the program on the result [2]. The approach requires no knowledge of the program's internals and no description of the input format, which makes it cheap to deploy. Its effectiveness depends heavily on the quality and diversity of the seeds: well-formed seeds exercise more of the program, and the mutation rate must be low enough that the input remains recognisable to the parser. Its main limitation is that it cannot tell which inputs are making progress, so it has no means of concentrating effort on promising inputs.
4.2 Grammar-based fuzzing
A grammar-based fuzzer is given a description of the input format, either as a formal grammar or as code that constructs inputs, and generates inputs that satisfy it. Tools in this family include SPIKE, Peach and Sulley [2], and the boofuzz tool used in Part 3 is a descendant of Sulley. Because the generated inputs are structurally valid, they pass the parser's syntactic checks and reach the application logic behind them, which makes this approach particularly effective for highly structured inputs such as programming languages, markup documents and network protocols. The cost is human effort: the grammar must be written by hand, which is laborious and error-prone, and the fuzzer can only be as good as the grammar it is given [2]. Property-based testing, introduced by QuickCheck [9] and used in Section 7, is a close relative: the user specifies a generator for structured values and a property they must satisfy.
4.3 Whitebox fuzzing
Whitebox fuzzing uses dynamic symbolic execution to derive inputs directly from the program's conditions. Starting from a concrete input, the fuzzer executes the program while recording each branch condition as a constraint over the input. It then negates one constraint at a time and asks a constraint solver for an input that satisfies the modified set, which drives execution down the other side of that branch [2]. Consider a function that computes y = x + 3 and aborts if y == 13. Starting from x = 0, symbolic execution records the constraint x + 3 ≠ 13; negating and solving it yields x = 10, which reaches the abort immediately. A random fuzzer choosing a 32-bit value for x would succeed with probability 1 in 232.
Microsoft's SAGE tool brought this technique to large binaries. According to Godefroid, SAGE ran for more than 1,000 machine-years from 2008 onwards and found roughly one third of all the bugs discovered by file fuzzing during the development of Windows 7, bugs that had been missed by static analysis and blackbox fuzzing [2], [11]. Open-source tools in the same tradition include KLEE [12]. The limitation of whitebox fuzzing is scale: the number of execution paths in a real program is enormous, and symbolic reasoning about pointer arithmetic, floating point and system calls is often imprecise or too slow, so the search is incomplete in practice [2].
4.4 Greybox fuzzing
Greybox fuzzing sits between the two extremes. It observes a lightweight summary of each execution, almost always which branches were taken, and uses that information to decide which inputs to keep and mutate further, without any symbolic reasoning. The idea was popularised by Michał Zalewski's American Fuzzy Lop (AFL) in 2013, which Wagner describes as having outperformed all previous fuzzers on release [3]. The core algorithm, simplified, is as follows.
1. Initialise a queue Q with the seed inputs.
2. Repeat:
2.1 Select an input x from Q.
2.2 Generate mutations m1, ..., mk of x.
2.3 For each mi, run the program and record which branches it executed.
If mi triggers the bug oracle, report it.
If mi executed a branch never seen before, add mi to Q.
The effect of step 2.3 is cumulative. An input that makes partial progress through the program's checks is retained and becomes the starting point for further mutation, so the fuzzer can satisfy a sequence of conditions one at a time rather than all at once. Zalewski demonstrated this by running AFL against a JPEG decoder from a seed that was not an image at all; the fuzzer eventually synthesised valid JPEG files, guided by nothing except branch coverage [3], [4]. Section 5 measures the same effect on a small example. libFuzzer, the coverage-guided engine built into the Clang compiler, applies the same principle to individual functions rather than whole programs [8].
4.5 Hybrid and portfolio approaches
The families are not exclusive. Hybrid fuzzers run a greybox fuzzer for speed and invoke symbolic execution only when coverage stops increasing, in order to solve the specific conditions that random mutation cannot. Taint-based fuzzers identify which input bytes influence a given branch and concentrate mutation on those bytes. Portfolio approaches run several fuzzers in parallel and share their findings, combining their complementary strengths [2]. In practice, the choice of technique depends on the input format: fully automatic blackbox and greybox fuzzing work well on binary formats when good seeds are available, while complex text formats such as source code usually require a grammar [2].
5. Why coverage feedback works: an experiment
The claim that coverage feedback turns one improbable event into a sequence of probable ones can be tested directly. This section compares a blind random fuzzer with libFuzzer on a program whose failure is guarded by a four-byte header.
5.1 Environment
The experiments in this article require Clang with the libFuzzer runtime. The Clang distributed with macOS does not include libFuzzer, so the simplest portable environment is a Linux container. All results reported below were produced in this environment with Clang 14.0.6:
mkdir fuzzlab && cd fuzzlab
docker run --rm -it -v "$PWD:/lab" -w /lab debian:bookworm-slim bash
# inside the container
apt-get update && apt-get install -y clang-14 libclang-rt-14-dev python3-venv
5.2 The target
Figure 2 shows the program under test. It aborts only when the input begins with the four bytes FUZZ, and each byte is checked by a separate conditional statement. The call to abort() stands in for a vulnerability located behind a format check.
#include <cstddef>
#include <cstdint>
#include <cstdlib>
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
if (size >= 4 && data[0] == 'F')
if (data[1] == 'U')
if (data[2] == 'Z')
if (data[3] == 'Z')
abort(); // stands in for the bug behind the header
return 0;
}
magic.cc: a failure guarded by a four-byte header.5.3 Blind random testing
A fuzzer that generates four random bytes per attempt must match all four simultaneously. The probability of success is (1/256)4, or about one in 4.3 billion, so the expected number of attempts per success is about 4.3 billion. To measure this, a simple loop generated random four-byte inputs and counted how many matched one, two, three and four leading bytes. The loop performs no program execution, process creation or file input, so it runs far faster than any real fuzzer could. In 30 seconds it made almost 15 billion attempts:
tries: 14948000000
matched 1 byte(s): 58388016
matched 2 byte(s): 228006
matched 3 byte(s): 900
matched 4 byte(s): 4
The counts fall by a factor of roughly 256 at each stage, as expected, and only four attempts reached the failure. A real target typically executes thousands of inputs per second rather than hundreds of millions. At 10,000 executions per second, the expected time to the first failure would be about 430,000 seconds, or five days.
5.4 Coverage-guided testing
The same program was then compiled with libFuzzer. The flag -fsanitize=fuzzer links the fuzzing engine and instruments every branch. The flag -fno-sanitize-coverage=trace-cmp disables a further optimisation, discussed in Section 5.5, so that the measurement reflects branch coverage alone:
clang++-14 -g -O1 -fsanitize=fuzzer -fno-sanitize-coverage=trace-cmp magic.cc -o magic
mkdir -p corpus
./magic corpus
#26 NEW cov: 3 ft: 4 corp: 2/5b ...
#375 NEW cov: 4 ft: 5 corp: 3/9b ...
#16362 NEW cov: 5 ft: 6 corp: 4/14b ...
==4622== ERROR: libFuzzer: deadly signal
artifact_prefix='./'; Test unit written to ./crash-fbf328f3...
Each line marked NEW records an input that executed a branch not previously seen; the number after cov: rises by one each time, and the run ended after 0.19 seconds. Over seven runs with different random seeds, the number of executions required ranged from 33,000 to 137,000, with a median of about 107,000, roughly 40,000 times fewer than the blind approach.
| Method | Attempts to first failure | Time at 10,000 executions per second |
|---|---|---|
| Blind random (expected) | about 4,300,000,000 | about 5 days |
| Coverage-guided (median of 7 runs) | about 107,000 | about 11 seconds |
magic.cc.The explanation follows Wagner's analysis of a similar example [3]. When a mutation happens to produce an input whose first byte is F, that input executes the second conditional for the first time, so the fuzzer adds it to the corpus. Subsequent mutations of that input need only find the second byte, which requires on the order of 256 attempts multiplied by the number of positions the mutator might choose. The same applies to the third and fourth bytes. The search therefore costs roughly four times 256 times a positional factor, rather than 256 to the fourth power. Real formats are built from exactly such checks: magic numbers, version fields, type tags and keywords, which is why coverage feedback is effective on them.
5.5 Comparison feedback
The example above compares one byte per conditional. Real code often compares a whole 32-bit word at once, as in if (magic != 0x50DA4E50). In that case there are no intermediate branches for coverage to reward, and a greybox fuzzer is reduced to blind search over 232 values. Two engineering solutions exist. The AFL plugin LAF-Intel splits wide comparisons into sequences of byte comparisons at compile time, recreating the staircase of Figure 2. libFuzzer instead records the operands of comparisons at run time and inserts the expected values into future inputs [3]. The latter is what the trace-cmp instrumentation provides, and it is enabled by default. On the four-byte example it made little measurable difference; on formats with long magic strings it is often decisive.
6. A worked example: from failure to fix
This section follows a single memory-safety bug through the complete fuzzing workflow: detection, interpretation, reproduction, minimisation, repair and regression testing.
6.1 The target and the campaign
Figure 3 shows a parser for a simple packet format. The first byte declares the number of payload bytes that follow, and the parser reads the last declared payload byte without checking that the packet is long enough. The harness copies the input into a heap buffer of exactly the input's length, so that any read beyond the end falls outside the allocation and can be detected.
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <memory>
static volatile uint8_t observed;
static void parse_packet(const uint8_t* data, size_t size) {
if (size < 1) return;
size_t declared = data[0];
if (declared == 0) return;
// Deliberate bug: no check that declared < size.
observed = data[declared];
}
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
if (size == 0) return 0;
auto copy = std::make_unique<uint8_t[]>(size);
std::memcpy(copy.get(), data, size);
parse_packet(copy.get(), size);
return 0;
}
packet.cc: a length field that is trusted without validation.The packet 01 41 is valid: it declares one payload byte and supplies it. The packet 02 41 declares two payload bytes but supplies only one, so the parser reads one byte past the end of the buffer. In an ordinary build such a read usually returns whatever happens to lie in adjacent memory, and the program continues without any visible failure. The target is therefore compiled with AddressSanitizer and UndefinedBehaviorSanitizer, which turn the read into a reported error, and the campaign starts from a single valid seed:
clang++-14 -std=c++17 -O1 -g -fno-omit-frame-pointer \
-fsanitize=fuzzer,address,undefined -fno-sanitize-recover=undefined \
packet.cc -o fuzz_packet
mkdir -p seeds artifacts
printf '\001A' > seeds/valid
./fuzz_packet seeds -max_total_time=30 -max_len=64 -artifact_prefix=artifacts/
The shell escape \001 produces the byte value 1. The option -max_len=64 bounds the input size, which is a deliberate limitation that Section 9 returns to. The fuzzer stopped at the first failure, typically within a second.
6.2 Interpreting the report
==4624==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xffffaa200584 ...
READ of size 1 at 0xffffaa200584 thread T0
#0 ... in parse_packet(unsigned char const*, unsigned long) /lab/packet.cc:13:16
Test unit written to artifacts/crash-7ae6918e80dbdee7f84f12004ab67019b23636dc
A sanitizer report is best read in a fixed order. The first line gives the class of error, here a heap buffer overflow. The second gives the kind and size of the access, a one-byte read. The first stack frame located in the program's own source identifies the faulting statement, here line 13 of packet.cc, which is the expression data[declared]. The remainder of the report, not shown, records where the undersized buffer was allocated. Addresses and file names vary between runs and machines.
It is important to distinguish what the report establishes from what it does not. It establishes that a read beyond the allocation occurs on this input. It does not by itself establish that the bytes read are sensitive, that an attacker can observe them, or that the defect can be exploited further; those questions belong to the analysis described in Section 10.
6.3 Reproduction
A failure that can be reproduced only by the fuzzer is of limited use. The analyst should be able to construct a failing input from an understanding of the defect:
printf '\002A' > truncated.bin
./fuzz_packet truncated.bin
This hand-written two-byte input produces the same report, which confirms both the diagnosis and the analyst's understanding of the input format.
6.4 Minimisation
Inputs produced by a fuzzer often contain bytes that are irrelevant to the failure. Minimisation removes them while preserving the failure, which simplifies analysis and makes the eventual report clearer:
./fuzz_packet -minimize_crash=1 -max_total_time=30 \
-exact_artifact_path=smaller.bin artifacts/crash-*
./fuzz_packet smaller.bin
The reduced input should always be replayed, because a minimiser preserves a failure and may occasionally converge on a different defect from the original one. Fuzzers apply the same idea internally. AFL trims each newly retained input to the shortest form that produces the same coverage, and it periodically reduces the corpus to a smaller subset with the same total coverage, an instance of the set-cover problem that it approximates greedily [3]. Both techniques increase the number of useful executions per second.
6.5 Repair and regression
The defect is repaired by validating the declared length before use. In a copy of the source, packet_fixed.cc, the guard becomes if (declared == 0 || declared >= size) return;. The repaired build is then checked against the known failing input and subjected to a new campaign:
clang++-14 -std=c++17 -O1 -g -fno-omit-frame-pointer \
-fsanitize=fuzzer,address,undefined -fno-sanitize-recover=undefined \
packet_fixed.cc -o fuzz_packet_fixed
./fuzz_packet_fixed truncated.bin
./fuzz_packet_fixed seeds -max_total_time=30
Both steps complete without error. The file truncated.bin should be retained permanently as a regression input, so that every future build is checked against the original failure. Together, these steps constitute the basic fuzzing workflow: detection, interpretation, reproduction, minimisation, repair and regression. Every tool discussed in this series implements some variation of it.
7. The test oracle
The experiments so far have used the simplest oracle: the program crashed, or a sanitizer reported a memory error. This oracle has the attractive property of producing almost no false positives [3], but it detects only those defects that manifest as crashes, and many serious vulnerabilities do not.
Heartbleed, disclosed in April 2014, is the standard illustration. A missing length check in OpenSSL's handling of the TLS heartbeat extension allowed a remote client to read up to 64 KB of server memory per request, potentially exposing private keys, credentials and session data. The vulnerable server did not crash; it returned the leaked memory in a well-formed response. The defect was found independently by a Google researcher and by engineers at Codenomicon, who discovered it while improving a feature of their fuzzing product that checks whether a server's responses are consistent with its inputs, rather than merely whether the server remains alive [7]. A fuzzer equipped only with a crash oracle would have exercised the vulnerable code without reporting anything.
The general lesson is that the fuzzer determines which inputs are explored, while the oracle determines which defects can be recognised. A price parser that converts the string "-1" into a negative charge does not crash; it becomes detectable only once the oracle encodes the rule that accepted prices are non-negative. Formulating such rules requires an understanding of the application's security requirements, and it is the part of fuzzing that most depends on human expertise.
7.1 Example: a round-trip property
Figure 4 shows a record format that joins a name and a role with a colon. It behaves correctly on every input a developer is likely to try. The test states a single property: decoding an encoded record must return the original values. Hypothesis, a property-based testing library for Python, generates names from a small alphabet and shrinks any counterexample to a minimal form [10].
from hypothesis import given, strategies as st
def encode_record(name, role):
return f"{name}:{role}"
def decode_record(record):
name, role = record.split(":")
return name, role
@given(st.text(alphabet="ab:", max_size=20), st.sampled_from(["user", "admin"]))
def test_record_round_trip(name, role):
assert decode_record(encode_record(name, role)) == (name, role)
test_properties.py: a round-trip property for a delimited record format.python3 -m venv .venv
.venv/bin/pip install 'hypothesis==6.170.23' 'pytest==9.2.0'
.venv/bin/python -m pytest -q test_properties.py
E ValueError: too many values to unpack (expected 2)
E name=':',
E role='user',
FAILED test_properties.py::test_record_round_trip
The minimal counterexample is a name consisting of a single colon, which the format does not escape. The security relevance becomes clear when the defect is considered from an attacker's perspective. A user who registers the name bob:admin with the role user produces the stored record bob:admin:user, and any other component that reads the second field as the role will interpret it as admin. No crash occurs at any point; only the property reveals the defect.
7.2 Common classes of oracle
| Oracle | Property checked | Typical defects found |
|---|---|---|
| Sanitizer | No out-of-bounds access, use after free or undefined arithmetic | Memory corruption in C and C++ |
| Round trip | decode(encode(x)) == x | Escaping and serialisation errors |
| Differential | Two implementations of the same specification agree | Parser disagreements, request smuggling |
| Metamorphic | A known transformation of the input has a known effect on the output | Logic errors in systems without a reference implementation |
| Invariant | A domain rule holds in every reachable state | Negative balances, inconsistent totals |
| Authorisation | A principal never accesses another principal's objects | Insecure direct object references, data leakage by AI agents |
| Resource | A small input never consumes disproportionate time or memory | Algorithmic denial of service, decompression bombs |
8. Selecting a technique
The appropriate fuzzer depends primarily on the form of the target and on how much of its internal behaviour can be observed. Table 4 summarises the starting points used in this series. Web applications deserve a brief note here because they illustrate how much the oracle matters even for simple tools. Many web servers answer requests for missing pages with a success status and an error page, a behaviour known as a soft 404, so an oracle based on status codes alone reports every guess as a discovery. Part 3 addresses this by first measuring the server's normal response and then filtering on deviations from it.
| Target | Suggested starting point | Covered in |
|---|---|---|
| C or C++ library with source | libFuzzer, then AFL++ | Parts 1 and 2 |
| Executable without source | AFL++ in QEMU or FRIDA mode | Part 2 |
| Go, Rust, Python, Java or JavaScript code | Native language fuzzers: go test -fuzz, cargo-fuzz, Atheris, Jazzer, Jazzer.js | Part 2 |
| Business logic in any language | Property-based testing: Hypothesis, fast-check | Part 1 |
| Web application | ffuf, feroxbuster | Part 3 |
| API with an OpenAPI description | Schemathesis, RESTler | Part 3 |
| Network protocol | boofuzz, AFLNet | Part 3 |
| Application built on a language model | Canary-based tests, then garak, promptfoo or PyRIT | Part 4 |
| Operating system kernel | syzkaller | Part 2 |
9. Common pitfalls
Several mistakes recur in practice, and most of them cause a campaign to run for a long time while testing very little.
- An over-broad harness. A harness that catches every exception, for example with
except Exception: passin Python, suppresses the very failures the fuzzer is meant to detect. Only the specific errors that the code is documented to raise for invalid input should be caught. - Early rejection. If coverage stops increasing within the first minute, most inputs are probably being rejected by the first validation check. Valid seeds and a dictionary of format keywords, supplied to libFuzzer with
-dict=, usually address this. - Equating crashes with bugs. Many distinct crashing inputs often share one root cause. Fuzzers group crashes heuristically, for example by the top frames of the stack trace or by coverage [3], but the groups are approximate, and the analyst must still determine the number of distinct defects.
- Non-reproducible failures. A failure that occurs only within the fuzzer frequently reflects state carried over between inputs, a timeout, or a defect in the harness rather than in the target.
- Unstated limitations. Every campaign excludes some part of the input space: the 64-byte limit in Section 6 excludes defects that require longer inputs, a single-threaded harness cannot expose races, and a harness that violates the API's documented preconditions can produce failures that no real caller could trigger. These limitations should be recorded alongside the results.
10. From failure to finding
A failing input is evidence of a defect, but it does not yet constitute a finding that can be reported. Before reporting, the analyst should be able to answer five questions. Can the failure be reproduced in a fresh process from the saved input? What is the smallest input that triggers the same failure? Which operation is the first to go wrong? Can a real user or attacker deliver this input through the program's actual interface? And which parts of the conclusion were observed, and which are inferred? The last distinction matters most when assessing impact: a heap overflow on a read is an observation, whereas the claim that it discloses secrets or allows code execution is a hypothesis that requires separate evidence.
The following template organises a report around these questions and is suitable for vulnerability disclosures, competition write-ups and internal defect tickets alike.
Title: [component] accepts [input] and violates [property]
Build: commit, version, platform, build flags
Entry point: how a real user supplies this input
Reproducer: exact file or request, plus the replay command
Expected: the property or documented contract
Observed: error, response, relevant log lines
Root cause: first incorrect operation, with the source line
Impact: what was demonstrated; untested hypotheses listed separately
Fix check: regression replay and a new fuzzing campaign
11. Language models in fuzzing
Large language models have recently been applied to several stages of the fuzzing workflow, with uneven results. The most significant success so far concerns harness generation. In 2024, Google's OSS-Fuzz team used a language model to write new fuzz harnesses for open-source projects; one of these harnesses found an out-of-bounds memory access in OpenSSL, CVE-2024-9143, which Google believes had been present for about twenty years and would not have been found with the existing human-written harnesses [6].
Other applications have been less convincing. Wagner reports that asking a model to generate test inputs directly yields modest results, mostly limited to well-known, text-based formats, and that a more promising direction is to have the model write programs that generate inputs, then evolve those programs according to the coverage their outputs achieve, as in the ELFuzz system [3]. A reasonable division of labour at present is to use language models to draft harnesses and generators, which are then compiled, run and checked for coverage, and to reserve judgements about whether a failure matters for the analyst. A model should never be permitted to resolve a failing test by weakening or deleting its assertion. A prompt along the following lines produces a useful first draft of a harness:
Read the attached parser, public API and build files.
Write a minimal fuzz harness for [engine and version] on [platform].
Call the real entry point. Explain input ownership, length rules,
setup and cleanup. Catch only documented rejection errors.
Give one valid seed, one boundary input and the exact build command.
Show how to confirm coverage reaches the real parser.
Mark every assumption. Do not invent APIs that are not in the files.
Part 4 provides further prompts for property discovery, coverage analysis, triage and the testing of language-model applications themselves.
12. Conclusion
This article introduced fuzz testing from its origins in Miller's experiments with random input to the coverage-guided tools in use today. It described the components common to all fuzzers and the main families of technique, then measured the effect of coverage feedback directly: on a target guarded by a four-byte header, libFuzzer needed a median of about 107,000 executions where blind random testing would need about 4.3 billion. A worked example took a heap buffer over-read through detection, interpretation, reproduction, minimisation, repair and regression, and a property-based test showed how a well-chosen oracle reveals defects that never cause a crash. The principal points are the following.
- Fuzzing trades computation for human effort. It reports few false positives and supplies a reproducer for every failure, but it is computationally expensive and cannot guarantee that all defects have been found.
- Feedback is what makes modern fuzzing effective. Retaining inputs that reach new code decomposes an improbable search into a sequence of tractable steps, which is why greybox fuzzing has displaced purely random testing.
- The oracle bounds what can be found. A crash oracle detects only crashes, whereas properties such as round trips, invariants and authorisation rules extend fuzzing to logic and access-control defects, as the case of Heartbleed illustrates.
- A failing input is the beginning of an analysis, not its conclusion. Reproduction, minimisation, root-cause analysis and a demonstrated route from the real interface are required before a failure becomes a finding.
- Language models are most useful as assistants to the workflow. They can draft harnesses and generators effectively, but their output must be compiled, measured and checked like any other code.
Several questions remain open in the field, among them how to fuzz large distributed systems effectively, how to infer input grammars automatically, and how to evaluate fuzzers fairly given the high variance between runs [2], [13]. Part 2 takes up the last of these in a practical form, by examining what fuzzing statistics do and do not measure.
Exercises
The following CyberLearner laboratories can each be approached with the techniques described above.
- HostTrick. An administrative page is accessible only with a particular forwarding header and host value. Fuzzing header names and values together, with two small wordlists, identifies the combination.
- PathProwler. A filter removes
../sequences from file paths. Fuzzing the path parameter with traversal variants, and observing which responses change in size, reveals the bypass. - PanelPilot. An AI agent retrieves records by a reference code supplied by the user. The appropriate oracle is an authorisation property: whose record was returned?
- StackSmash. A sufficiently long input crashes the service. Fuzzing finds the crash quickly; converting it into control of execution is the remainder of the exercise.
Next
Part 2 extends the worked example to a second fuzzing engine, measures source coverage, discusses targets without source code, and applies the same defect to five memory-safe languages. Part 2: native code and managed languages.
References
- B. P. Miller, L. Fredriksen and B. So, An empirical study of the reliability of UNIX utilities, Communications of the ACM 33(12), 1990.
- P. Godefroid, Fuzzing: hack, art, and science, Communications of the ACM 63(2), 2020.
- D. Wagner, Fuzzing intro, lecture notes, CS261, UC Berkeley, January 2026.
- M. Zalewski, Pulling JPEGs out of thin air, November 2014.
- Google, OSS-Fuzz README, totals as of May 2025.
- Google Security Blog, Leveling up fuzzing: finding more vulnerabilities with AI, November 2024.
- eWEEK, Heartbleed SSL flaw angst aggravated by broken disclosure process, April 2014; Synopsys, Diary of Heartbleed.
- LLVM Project, libFuzzer: a library for coverage-guided fuzz testing.
- K. Claessen and J. Hughes, QuickCheck: a lightweight tool for random testing of Haskell programs, Proc. ICFP, 2000.
- D. R. MacIver et al., Hypothesis documentation.
- P. Godefroid, M. Y. Levin and D. Molnar, Automated whitebox fuzz testing, Proc. NDSS, 2008.
- C. Cadar, D. Dunbar and D. Engler, KLEE: unassisted and automatic generation of high-coverage tests for complex systems programs, Proc. OSDI, 2008.
- G. Klees, A. Ruef, B. Cooper, S. Wei and M. Hicks, Evaluating fuzz testing, Proc. ACM CCS, 2018.
- K. Serebryany, D. Bruening, A. Potapenko and D. Vyukov, AddressSanitizer: a fast address sanity checker, Proc. USENIX ATC, 2012.
All experiments in this article were run on 28 November 2026 in debian:bookworm-slim with Clang 14.0.6, Hypothesis 6.170.23 and pytest 9.2.0.