AI-written fuzz targets for under-tested code
A model writes fuzzing harnesses for functions that have none, keeps ones that build and add coverage, and reports crashes for triage.
The use case
Fuzzing finds memory bugs well, but each function needs a harness written by someone who understands it. Google's OSS-Fuzz team added LLM-written fuzz targets: the model drafts a harness, the system compiles it, fixes build errors, runs it, and keeps it if coverage improves. Google reported new vulnerabilities found this way in widely used open-source projects. Teams with C or C++ code can use the open-source tooling. Security engineers still triage every crash, check that crashes are not caused by the harness misusing the API, and report real bugs responsibly.
Example workflow
- List functions with no fuzz coverage
- Generate a harness for each and compile it
- Fix build errors and run the fuzzer
- Keep harnesses that raise coverage
- Triage crashes and file confirmed bugs
Tools
- OSS-Fuzz
- libFuzzer
- LLM API
Risks and guardrails
- Harnesses that misuse APIs create false crashes
- Fuzzing is compute heavy; set budgets
- Follow disclosure practices for third-party bugs
Sources
Written by Agents Lookup. Credits and official pages for the tools this use case names:
- Google Online Security Blog: leveling up fuzzing with AI: security.googleblog.com/2024/11/leveling-up-fuzzing-finding-more.html