Question
What does no failure after many fuzz executions establish?
Short answer
No failure after many fuzz executions establishes only that the inputs actually run, in the harness and build actually tested, produced no failure that the test oracle §10.5 could detect. It does not establish safety for every input: the fuzzer may never generate the failing input, the oracle may miss a failure that did occur, and the tested setup may differ from the deployed one. Even a statistical bound on the failure rate needs independent random inputs from one fixed distribution, which a coverage-guided fuzzer does not supply.
Terms in the question
Fuzz execution: one run of the program under test on one input produced by a fuzzer. A fuzzer is a tool that generates or modifies inputs automatically, runs the program on each one and records failures; the method is called fuzzing §10.9.
Failure: a run that the test oracle judges wrong. The test oracle is the rule that decides whether a run failed. Typical oracles detect a crash; a hang, meaning a run that exceeds a time limit; a memory error reported by a sanitizer §10.21, a compiler option §12.3 that adds run-time checks such as a check on every memory access; or a failed assertion, a condition that the programmer wrote into the code and that must hold.
Harness: the fuzz harness §10.13, the small program that receives the fuzzer’s bytes, turns them into a call of the code under test, and resets any state between runs.
Establish: show with certainty, as opposed to make likely.
Full answer
Step 1: the claim that a program is safe is universal. Let be the input domain, the set of all inputs the program can receive. “The program is safe” means: for every input in , the run on is correct. One failing run refutes the claim. Passing runs confirm it only for the inputs they used. Testing can establish the claim only by running every input in , which is exhaustive enumeration §10.33, and that is possible only for small domains: a function of one 16-bit argument has inputs. A 64-byte input already has , about , possible values. At runs per second, running them all would take about seconds.
Step 2: what is established. Let be the set of inputs the fuzzer actually ran. Zero failures establish one fact: for every input in , in the tested build and environment, the oracle flagged nothing. Three gaps separate this fact from safety, described in Steps 3 to 5.
Step 3: the fuzzer may never reach the failing input. A fuzzer produces inputs from a model: a grammar, a set of example inputs (the seed corpus §10.14) and the changes it applies to them, or a hand-written generator. An input that this model cannot produce is never tried, however long the fuzzer runs. Other inputs are possible but improbable. A test of a 4-byte field against one fixed value passes for 1 of values, so a 4-byte value chosen uniformly at random passes the test with probability . In runs, the expected number of inputs that pass the test is . Coverage-guided fuzzing §10.12, which keeps the inputs that reach new code, and input dictionaries §10.16, lists of values worth inserting into inputs, exist to shrink this gap; they do not close it.
Step 4: the oracle may miss a failure. A failure counts only if the oracle notices it. Without a sanitizer, a write one byte past the end of an array §14.5 often changes a neighboring variable and crashes nothing. A wrong result, such as a parser that accepts a malformed message or a function that returns the wrong decision, is not a crash at all. An oracle that detects only crashes sees only the failures that crash. Sanitizers and assertions widen the oracle. Differential testing §10.6, which compares the outputs of two implementations, and property checks, which test a stated relation between input and output, catch wrong results.
Step 5: the tested setup may differ from the deployed one. The harness may enter the code through a different function than the deployed system does, replace hardware with stand-ins, run one thread where the device runs several, or reset state that the device keeps from one message to the next. The build may differ as well: sanitizers, optimization level, compiler, or a 64-bit desktop processor in place of a 32-bit microcontroller §6.1. A failure that depends on any of these differences lies outside the claim.
Step 6: coverage does not close the gaps. A coverage metric §10.18 records which code ran, not with which values. A copy loop runs the same branches for a length of 16 and a length of 17, and only one of the two lengths overflows a 16-byte buffer. Full branch coverage §10.20 with zero failures still leaves every bug that depends on a value rather than on a branch.
Step 7: a statistical bound needs its own assumptions. Suppose the inputs were drawn from one fixed probability distribution over , each draw independent of the others, so that they are independent and identically distributed samples §11.5, and all runs passed. Let be the probability that one input drawn from fails. The probability of passes in a row is , which is small when is large. The values of for which that probability is at least 0.05 are those with ; this is the 95% upper confidence bound on . Because , where is the natural logarithm, the bound is close to for large , an approximation called the rule of three §18.5.8. The bound rests on three assumptions.
Independence: each input is chosen without regard to the results of earlier runs.
One distribution: every input comes from the same .
The right distribution: is the distribution that the claim is about.
A coverage-guided fuzzer breaks the first two on purpose: it keeps the inputs that reached new code and changes them further, so each input depends on earlier results and the distribution shifts during the run. The third fails for security claims, because an attacker does not draw inputs from ; the attacker sends the failing input. Even when all three assumptions hold, the bound limits how often failures occur under . It says nothing about whether a failing input exists.
Step 8: what the result is good for, and how to report it. Zero failures over many runs is evidence that failures reachable by this fuzzer, and visible to this oracle, are absent or rare, and the saved inputs make a useful regression test §10.4, a test rerun after every change to catch a bug that comes back. A report should state the fuzzer and its version, the harness, the build options, the seed corpus, the oracle including the sanitizers that were enabled, the number of executions, the duration, the coverage reached and when coverage stopped growing, and every input that crashed or timed out. A claim about all inputs needs a method that reasons about all inputs, such as the program checker of the extended Berkeley Packet Filter §2.1 (eBPF), called the eBPF verifier §3.3, which examines every path of a program before the program runs, or model checking §3.30. Each such method is correct only for its own model of the program and its environment.
Worked example
A parser copies a message’s payload into a 16-byte buffer. The first byte of the message, , gives the payload length, and the parser copies bytes without checking that . Every value of from 17 to 255 writes past the end of the buffer.
The generator. The tester wrote the input generator from the format documentation, which says that payloads hold at most 16 bytes. The generator draws uniformly from 0 to 16 and appends random bytes.
The campaign. The fuzzer runs inputs, and none fails.
Reach. The probability that the generator produces is 0, so every one of the inputs lies in the safe part of the domain.
The bound. These runs do satisfy the first two assumptions of Step 7, with the generator’s distribution. The bound gives , close to . The bound is true: the actual failure probability under this generator is 0. Yet an attacker who sends makes the parser write byte past the buffer.
A wider generator, a blind oracle. Replace the generator with a mutation-based fuzzer that sets a randomly chosen byte to a random value. When it changes the first byte, with probability , so overflowing inputs now appear quickly. If the parser was built without a sanitizer, a 1-byte overflow may overwrite only unused padding next to the buffer; nothing crashes, and an oracle that detects only crashes still reports no failure. Built with AddressSanitizer §10.22, a sanitizer that marks the bytes around each buffer as forbidden, the first overflowing input is reported.
The program had the same bug in every campaign. Whether zero failures were reported depended only on the generator’s domain and on what the oracle could detect, and those two are what a zero-failure claim must state.
Follow-up questions and limits
How many executions are enough? No number of executions turns into a claim about all inputs. A practical stopping point is that coverage has stopped growing for a long time with the oracle the claim needs. That shows that the fuzzer’s exploration has saturated, not that the program is correct.
Do timeouts §9.34 and rejected inputs count as passes? No. A run that the harness stopped at a time limit is a hang, a possible failure. An input that the harness rejected before calling the code, or a run that never started, tested nothing. Count each kind separately from the runs that completed and passed.
How does a proof differ? A verifier or a model checker establishes a property for every input of a model of the program, relative to the assumptions of that model, such as the meaning of each instruction and the behavior of the environment. Boundary-value testing §10.31 runs the inputs at the edges of each range, here and , chosen by reading the specification, and would have found this bug in two runs. The methods give different evidence and are used together.
Can fuzzing ever establish a universal claim? Only by running every input of a finite domain, at which point it has become exhaustive enumeration rather than fuzzing. For a domain of inputs at runs per second, this takes seconds.
This answer does not cover how to design a harness or how to choose a seed corpus.
Fullest treatment: Fuzzing (§10.9).
Related entries: Test oracle (§10.5), Exhaustive enumeration (§10.33), Coverage versus correctness (§10.40), eBPF verifier (§3.3).