Tips for more effective fuzz testing with AFL++

luu 155 points 29 comments October 28, 2026
nullprogram.com · View on Hacker News

Discussion Highlights (6 comments)

monster_truck

These are good tips, thank you

jonhohle

I used to think writing safe code in C/C++ was a matter of skill. However, after finding more than a few issues with AFL at a FAANG in code written by engineers with the highest engineering title, I changed my mind. Incredible tool.

r0ze-at-hn

This is a great list. I had been playing with and building fuzzers long before AFL, but its release and its ability to explore the code space in a smart way fundamentally changed the game. Never once have I improved a codebase so it could be fuzzed and didn't get a payoff of it finding bugs. And the field is relatively young. Like the other year built a fuzzer with a transformer model as the internal learning engine and other cool stuff like https://antithesis.com I know fuzzing has been around forever, but it is still surprising how many engineers I encounter who have never used one. I hate fixing bugs and love tools that just find bugs and gave me exact reproducible cases. It was nice to see GoLang get a built in fuzzer to try to help it become more mainstream. And these days with AI where you need ways it both can't gamify (a unit test that simply returns 'pass') as well as automatic ways to eval generate code fuzzing is a great fit. And not to mention that it is cheaper to fuzz all night than continuously burn tokens looking for ways to crash the code.

Selliks

Hello, I was wondering—how do you know that a crash you've found is real and not just a fluke?

rwmj

This is quite timely. I just radically increased fuzzing of hivex (a Windows Registry parser) by switching to persistent mode. Execs/sec went from around 440 to 70,000, although the test cases aren't quite comparable. Documentation for persistent mode is quite terrible though. https://github.com/libguestfs/hivex/commit/2254c62832c568804...

zackmorris

Upvoted for including .c files. It always amazes me how people go to the ends of the earth to avoid #include and macros in C/C++ code, when those are some of the most powerful tools in the language. I got some of my best work done in C++ this way, long before I knew about "real" programming (functional programming) and abstraction. If someone wants safety, stick to C# or some other Java variant.

Semantic search powered by Rivestack pgvector
3,874 stories · 35,194 chunks indexed