Trying to fuzz xpdf I'm running into issues I cannot comprehend. It's running very slow and there's not a lot I can think of to fix this, so it must be something I simply don't know yet ;-)
Started fuzzing 'pdfinfo' but reading a twitter message from Ben Nagy claiming 'pdftoppm' would be a better target (parses the pdf deeper), I had to agree and switched. That's when trouble started: pdftoppm fuzzing is very slow (15 - 50 runs per core per second with the same intial templates).
- I have patched out the 'write output file' part of pdftoppm. Did not really change a lot, as in, still very slow.
- Templates: 90 pdf files, mostly <1 kb, about 10 are ~10kb, a couple are up to 100kb. I tried deleting all initial templates and stick with afl's "small.pdf" file. This helps a lot, but, if everyone fuzzes with the same fuzzer and same input template, we'll all find the same bugs. (Also: it's still slow: 125/sec). Besides: small.pdf makes pdftoppm exit early
(broken 'xref' header), so it's probably never going to parse deep enough. Right?
- RAM vs SSD: mount -t ramfs -o size=2g ramfs fuzz -> putting everything in there does not increase the speed at all, it's as if the SSD is exactly as fast as running everything from RAM. Also: Ben Nagy gave advice to run everything -except crashes- from RAM. But playing around running afl, breaking, symlinking crashes to a real on disk dir and resuming afl, does not work (afl moves the symlink away and creates a new crashes dir). This is a separate issue, but, what would be the best practice? Every 30 minutes rsync the ramdisk to persistent storage?
- afl-clang-fast vs afl-gcc really helped a lot. It started with 400/sec instead of 125/sec. After a while it's down to 70/sec though (it's up and down all the time).
Last advice I got was to try AFL_PERSISTENT mode, but is that even a thing when working with a cli exec like pdftoppm?
Would love to learn from this community on how to improve. Probably missing some best practices and many "gotcha's". Can't imagine fuzzing something like xpdf should be this hard and turn out this slow.
Thanks in advance ;-)!
Cheers,
kciredor
--
You received this message because you are subscribed to the Google Groups "afl-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to afl-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.