- Introduced by
- Barton Miller
- Year
- 1990
- Type
- random input-based testing technique
- Family
- Vulnerability detection and testing
What does it do?
Fuzzing is a software testing technique that feeds a program large numbers of random or semi-random inputs to find crashes, memory errors, and other failures, some of which may be security vulnerabilities.
Barton Miller introduced the approach in 1990. Modern fuzzers such as libFuzzer and AFL combine input mutation with instrumentation that reports which code paths each input exercises.
The intuition behind the method
Fuzzing works by bombarding a program with automatically generated or mutated inputs, watching for crashes, memory corruption, or other failure modes. Unlike traditional testing where test cases are manually written based on expected behavior, fuzzing is agnostic to intended functionality—it simply looks for any way the program can fail. Coverage-guided fuzzing improves efficiency by mutating test cases that exercise new code paths, focusing effort on unexplored parts of the program.
History
Barton Miller introduced fuzzing in 1990. In a study with Lars Fredriksen and Bryan So, he tested the reliability of UNIX utilities by feeding them random characters from a generator called fuzz, together with a tool for interactive programs called ptyjig. Later fuzzers added coverage feedback, which guides mutation toward inputs that reach new code.
When to use it
Choose fuzzing when a component accepts untrusted or complex input and the relevant edge cases are hard to anticipate, such as parsers, decoders, and protocol handlers. It is well suited to memory-unsafe code such as C and C++, where instrumentation can detect corrupted memory at run time. It is also useful as an ongoing regression check during development. Do not rely on fuzzing to verify intended logic or authentication behaviour, because it reports failures rather than correctness; it complements specification-based tests. Fuzzing also requires a harness that can drive the target with generated inputs, so it is less direct for components that cannot be isolated.
Limitations and considerations
- Ineffective for finding vulnerabilities in logic or algorithms that do not cause crashes
- Struggles with complex input formats or programs requiring specific environmental setup
- May require custom harnesses or instrumentation for non-trivial programs
- False negatives: absence of crashes does not guarantee absence of vulnerabilities
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Automatically discovers vulnerabilities without requiring knowledge of the program's intended behavior
- Extremely effective at finding memory corruption bugs and crash-causing inputs
- Can run continuously for days or weeks, accumulating coverage and finding rare edge case bugs
- Coverage-guided fuzzers intelligently explore program paths, focusing effort on promising areas
Applications
- Web browser and rendering engine testing, where fuzzing targets input-handling code.
- Compiler testing, including differential fuzzing that compares the outputs of different implementations.
- Cryptographic and TLS library testing, for parsing and implementation defects.
- Operating system kernel testing, for example fuzzing of system call interfaces with syzkaller on Linux.
- Network protocol parsers, such as HTTP and DNS handling.
How it works
How it works
Start with seed inputs, which may be valid samples of the expected input format or minimal data such as an empty input.
Generate new inputs by modifying seeds, for example by flipping bits, deleting bytes, or splicing inputs together. Some fuzzers also apply grammar-aware transformations for structured formats.
Run the target program on each mutated input while watching for crashes, memory errors, timeouts, or assertion failures.
Use coverage feedback to record which inputs reached new code paths. Inputs that do so are kept as seeds for further mutation, so later inputs are derived from those that made progress.
Common pitfalls
- Not instrumenting the target or not setting up crash monitoring, so failures pass silently. Sanitizers such as AddressSanitizer make many memory errors visible at the point they occur.
- Choosing poor seed inputs. Seeds that never reach the parts of a parser under test leave those paths unexplored, however long the fuzzer runs.
- Fuzzing builds that differ from the shipped configuration. Optimised builds without sanitizers can let some memory errors pass without a visible crash, so results from such builds may understate the defects present.
- Treating every crash as a security issue, or stopping at the first crash without triage. Many crashes are real bugs with no exploitable impact, and triage is needed to rank them.
Frequently asked questions
What is coverage-guided fuzzing?
Coverage-guided fuzzing uses information about which code paths are exercised to guide mutation. Inputs that reach new code paths are retained as seeds, focusing the fuzzer on exploring uncovered areas. This greatly improves efficiency over random fuzzing.
How long should I run a fuzzer?
Continuously where practical. Coverage usually grows quickly at first and then levels off, so later runs find fewer new paths, but they can still find new bugs.
Can fuzzing find all vulnerabilities?
No. Fuzzing is effective at finding crashes and memory corruption but may miss logic flaws, authentication bypass, and vulnerabilities requiring specific input sequences that random mutation is unlikely to produce.
How do I set up fuzzing for my program?
Write a fuzz target that accepts mutated input and exercises the program. Link it with a fuzzing engine such as libFuzzer or AFL++, and provide seed inputs. Compile with sanitizers (AddressSanitizer, UndefinedBehaviorSanitizer) to detect memory errors.
What is differential fuzzing?
Differential fuzzing compares the outputs of multiple implementations (for example, different compiler versions) to find bugs. Discrepancies often indicate correctness issues or security vulnerabilities.
How should I interpret fuzzing results?
Group crashes by their underlying cause, since one defect often produces many inputs. Reproduce each crash and minimise the input to the smallest case that still fails, so the bug can be understood and fixed. Treat coverage growth as a measure of progress through the code, not of correctness. A run that finds no crashes does not show that the code is free of bugs. Check sanitizer reports to confirm that each finding is a real defect before ranking it by security impact.
Related methods
Sources
Miller, B. P., Fredriksen, L., & So, B. (1990). An empirical study of the reliability of UNIX utilities. Communications of the ACM, 33(12), 32-44.
Open DOI referenceBöhme, M., Pham, V. T., Sharma, A., & Cichon, M. (2020). Fuzzing: Challenges and reflections. IEEE Security & Privacy, 19(2), 56-62.
Open publication reference