Fuzzing pipelines and memory-safe migration
Coverage-guided fuzzing with libFuzzer and AFL++, sanitizers, harness design, continuous fuzzing in CI and OSS-Fuzz, crash triage, and a realistic plan to move to memory-safe languages: new code first, highest-risk parsers next, and hardening what stays in C++.
01How coverage-guided fuzzing works
- Explain coverage-guided fuzzing and write a libFuzzer harness
- Pair fuzzers with the right sanitizers and know what each detects
- Run continuous fuzzing in CI and triage crashes efficiently
- Plan a memory-safe language migration that pays off early
A fuzzer feeds a program large numbers of generated inputs and watches for crashes. Early fuzzers generated random data and found shallow bugs. Coverage-guided fuzzers, popularised by AFL (2013), instrument the target to record which code paths each input exercises. Inputs that reach new coverage are saved to a corpus and mutated further. The fuzzer gradually learns the input format's structure from the inside, without a specification.
| Tool | Style | Notes |
|---|---|---|
| libFuzzer | In-process, coverage-guided | Ships with Clang; one harness function per target; very fast |
| AFL++ | Fork-server or persistent mode, coverage-guided | The maintained successor to AFL; strong mutators, good for whole programs |
| honggfuzz | Coverage-guided, hardware feedback options | Used in OSS-Fuzz alongside the others |
Go go test -fuzz | Native, coverage-guided | Built into the Go toolchain since 1.18 |
| cargo-fuzz | libFuzzer for Rust | Finds panics, logic bugs and bugs in unsafe code |
| Structure-aware (libprotobuf-mutator) | Mutates a typed description, then serialises | For inputs a byte-level mutator rarely gets right, such as SQL or protocol messages |
This is an advanced module
Vulnerability research & exploit mitigations is part of the Pro pass. 4 more sections — the deep dives, the final design, follow-ups and the test — unlock with it.
Already a cyart.io or studio.cyart.io member? Your pass code is in your Studio account.