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++.

🔒 PROBy ·Lesson·10 min read·Advanced → Staff
fuzzinglibFuzzerAFL++AddressSanitizerOSS-FuzzRust migration

01How coverage-guided fuzzing works

✓What you will learn
  • 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.

ToolStyleNotes
libFuzzerIn-process, coverage-guidedShips with Clang; one harness function per target; very fast
AFL++Fork-server or persistent mode, coverage-guidedThe maintained successor to AFL; strong mutators, good for whole programs
honggfuzzCoverage-guided, hardware feedback optionsUsed in OSS-Fuzz alongside the others
Go go test -fuzzNative, coverage-guidedBuilt into the Go toolchain since 1.18
cargo-fuzzlibFuzzer for RustFinds panics, logic bugs and bugs in unsafe code
Structure-aware (libprotobuf-mutator)Mutates a typed description, then serialisesFor 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.