Fuzzer Blind Spots (Meet Jepsen!)
Jepsen found a missing-results bug in TigerBeetle's query engine despite four fuzzers covering it, because the VOPR and LSM query fuzzer pre-registered disjoint queries whose matching objects were always consecutive in every secondary index, so zig-zag merge join probing was never exercised. The bug was in ScanTreeLevel: after a probe shrank the scan's key range, the key_exclusive_next check could misfire from the wrong end and mark the level finished, returning truncated results. Rewriting the fuzzer to generate random objects and random queries against a full model reproduced the bug trivially, and the fix splits the termination condition. The broader lesson is that biased fuzzer workloads can silently project away reachable states, so targeted fuzzers should be complemented with broader, less-structured sampling and precise output checking.
Related posts
- Fuzzing collaboration with WINGFUZZ - Part 1
ClickHouse easyNovice
WINGFUZZ, a DBMS fuzzing engine, found eight new bugs in ClickHouse, some introduced only four months earlier, using two techniques. Grammar-free mutation builds a metadata graph from built-in SQL tests, reshuffles statements, and fixes semantic errors by metadata-guided substitution (Griffin). Type-affinity sequence generation uses coverage feedback to learn which SQL statement-type pairs matter and builds new sequences around them. ClickHouse is now integrating WINGFUZZ into its daily testing.
- BuzzHouse: Bridging the database fuzzing gap for testing ClickHouse
ClickHouse mediumAdept
BuzzHouse is a new ClickHouse fuzzer that generates complex but mostly semantically valid SQL backed by a tracked catalog of tables, filling a gap left by SQLsmith, SQLancer, the AST fuzzer and WINGFUZZ. It has found about 100 new issues. Correctness is checked by dumping and re-reading tables, comparing equivalent queries via SQLancer-style oracles, re-running queries under different settings, and comparing results against another relational database. The design tradeoffs covered include valid versus random identifiers, why coverage-guided fuzzing was skipped, and how statement probabilities (e.g. DROP frequency) shape what the fuzzer can reach.
- Fuzzing ClickHouse
ClickHouse mediumAdept
ClickHouse's AST-based query fuzzer takes SQL queries from the regression test suite, parses them, and randomly mutates the AST. It swaps in bad numeric values such as NaN and integer limits, perturbs strings and arrays, and splices function arguments, expressions and tables from other test queries. The core is about 700 lines of C++ and has found more than 200 bugs, including segfaults and logic errors. Much of that comes from pairing it with assertions, a distinct LOGICAL_ERROR exception for internal bugs, and clang sanitizers. In CI it weights permutations toward new tests in pull requests and needs settings constraints, since it once disabled its own execution-time limit.
- Random Fuzzy Thoughts
TigerBeetle mediumAdeptTreating a fuzzer's byte slice as a finite PRNG unifies coverage-guided fuzzing with structured property-based testing: the entropy length measures input complexity, gives test-case minimization almost for free, and tells interactive simulations when to stop injecting faults. A seed reproduces a failure only at a specific commit, so robust regression tests should persist the generated structured data (e.g. a .wasm module) rather than the seed, using a separate generate/build/process pipeline that also supports hand-written inputs. For interactive distributed-system tests, a livelock in TigerBeetle was reproduced by running the VOPR simulator with a perfect network and steering it with predicates over system state, suggesting regression suites made of predicate 'key frames' that random traces must hit.
- On the Effectiveness of Mutational Grammar Fuzzing
Google Project Zero hardMaster
Coverage-guided mutational grammar fuzzing has two weaknesses. Coverage does not capture dataflow between calls, so a sample that chains document() into generate-id() to hit a libxslt bug looks no more interesting than two unrelated samples. Greedy corpus saving also yields many near-identical samples. A simple fix in Jackalope restarts a worker with an empty corpus every 2T seconds, letting it build an independent corpus for T seconds before syncing with a persistent server and fuzzing the combined corpus. In week-long libxslt experiments, T=3600 found more unique crashes, and found them faster, than uninterrupted default sessions, which varied between 2 and 5 crashes depending on starting conditions. The best T is likely target-dependent.