Test-case Reducers Are Underappreciated Debugging Tools

87 points by ltratt


lcamtuf

There's some skepticism here, but yes, from the interactions I had when reporting security bugs, I think that there are diagnostic tools like that many developers and security people (!) are blissfully unaware of. I think the main problem is that these features are just not "cool", so we don't talk about this stuff enough. Test case minimizers, in particular, are "write-only": they get reinvented quite often and almost never gain much traction.

When I shipped afl-fuzz, I included a couple of features along these lines. For example, the package contained a completely standalone, fast, execution-path-aware, zero-configuration test case minimizer (afl-tmin) that worked well without needing to be "taught" the syntax of your input data... but I'm pretty sure has gotten very little use - again, because even if it worked for you, it's not something you're gonna blog about?

In the same vein, I shipped a "crash exploration mode" designed for security folks: you give the tool a crashing test case and it catalogs all the execution paths it can get to while still keeping the program in a crashing state, which answers a key question in vuln research and exploit development. In my mind, this was at least as cool as the fuzzer itself, but I think maybe 10 people even knew about it.

Another hugely time-saving feature that took a loooong time to catch on and still isn't used enough: ASAN / MSAN and all the related sanitizers.

olliej

I'm legitimately curious - does anyone not appreciate the value of automatic test case reduction? "under appreciated" seems to imply there are people who don't always want a test case reduction? even if you can immediately identify the bug, you need a reduction for your regression tests?