Fuzz Testing
Subject: Computer and Technology noun /ˈfʌz ˌtɛs.tɪŋ/ 1 definition
- software-engineering
- automated-testing
- application-security
- software-vulnerabilities
-
Definition (noun)
Entry #335 · UpdatedFuzz Testing, commonly known as fuzzing, is an automated dynamic testing technique that continuously feeds malformed, unexpected, or randomized inputs to a target program while monitoring its execution for failures. A fuzzer pairs an input generator or mutator with a test harness and runtime monitors—often combining memory sanitizers with code-coverage instrumentation—to detect crashes, memory corruption, assertion failures, unhandled exceptions, and resource exhaustion. By exercising edge cases and unanticipated input sequences at machine speed, fuzz testing uncovers subtle parser flaws, buffer overflows, and state-machine defects that manually authored unit tests routinely miss. Unlike static analysis or formal verification, fuzzing evaluates real compiled or interpreted execution paths empirically, so it produces concrete, reproducible bug reports while remaining unable to prove the absence of defects in unreached code.
Common Types
Coverage-Guided (Grey-Box) Fuzzing: Instruments the target program at compile time or runtime to track executed code edges, retaining and mutating seed inputs that reach new paths to systematically maximize code coverage.
Black-Box Fuzzing: Generates or mutates inputs without inspecting internal source code or execution coverage, relying solely on external signals such as process crashes, exit codes, timeouts, or malformed network responses.
White-Box Fuzzing: Combines dynamic execution with program analysis techniques like taint tracking and symbolic execution, using constraint solvers to compute inputs that satisfy complex conditional branches.
Structure-Aware (Grammar-Based) Fuzzing: Constructs or mutates test cases according to explicit schemas, protocol specifications, or formal grammars so inputs pass early syntax validation and exercise deep application logic.
Example
A systems engineer compiles a C++ TLS message parser with Clang using
-fsanitize=fuzzer,addressand a harness implementingLLVMFuzzerTestOneInput(const uint8_t *data, size_t size)seeded with valid ClientHello frames. After mutating corpus payloads across thousands of executions,libFuzzersets a two-byte extension length field to0xffff, triggering an AddressSanitizerheap-buffer-overflowerror and writing the reproducingcrash-<sha1>input file to disk for deterministic debugging.