5 ms·
This is really neat. But before you integrate it into anything else you build, consider that it appears to be a very old blob of C code. It took afl-fuzz someth
by tptacek 7y ago
This is really neat. But before you integrate it into anything else you build, consider that it appears to be a very old blob of C code. It took afl-fuzz something like 2 minutes to start finding wild free crashes†. This seems like a worthwhile thing to reimplement in a higher-level language.
† I don't know, maybe they've already done this work and ruled out anything bad from the dozens of unique crashes AFL trivially finds? I wouldn't want to pretend that I've done any serious inspection here.
- underdeserver 7y agoFor context, afl can take weeks to find crashes in nontrivial binaries.
- jamestomasino 7y agoThe maintainer it's active still with a bugs mailing list and chat in IRC. Your findings would surely be well received.
- tptacek 7y agoMy "findings" here would just be "take the first recins example from your blog post and feed it to afl-fuzz, then wait 2 minutes".
- EuAndreh 7y agoA good follow-up to this would be to get the afl-fuzz error report and send it to the maintainers. Maybe they're not even aware of those problems.
- x0 7y agoif you can be bothered, rebuild it with debug symbols, run it, dump core and try and find exactly where the bug is. I vaguely remember doing this with wget, there was a way to make it think the terminal's width is (unsigned)-4, then when printing the download status to stdout, it clears a buffer with a memset(ptr, ' ', -4). Of course -4 in this context is a huge number. It overwrote its whole self until segfault. (this issue was fixed, btw) great learning experience, for anyone who knows enough C to understand what they're looking at.
- tptacek 7y agoIf I'd done anything significant, I would, but all I did was confirm the suspicion that this old c-language GNU tool hadn't been exhaustively fuzzed. I'm sure the recutils team can do a perfectly fine job fuzzing it themselves.
- intc 7y agoOr perhaps you could write a blog post on how to use a fuzzer so we can all learn from your findings?
- Qasaur 7y agoI give it a couple of months before it is rewritten in Rust, just like bat and ripgrep.
- sundarurfriend 7y agoFor anyone else reading thread and wondering if someone has reported this issue yet: as of 10:35 UTC 27 Jan, nothing seems to have been posted to the bugs mailing list [1]. I'd encourage anyone who has even minimal knowledge about fuzzing and security and AFL (I don't) to make a post there. Don't let the combination of bystander effect + impostor syndrome stop you from doing it. [1] https://lists.gnu.org/archive/html/bug-recutils/ https://lists.gnu.org/archive/html/bug-recutils/
- gus_massa 7y agoI think that a blog post with the details (exactly what to install, exactly what to run) will get a few upvotes here. (At least, I promise my upvote.) Sometimes the manuals seam clear, but when you actually want to run the program you discover that it needs a library, or that the directories must have some specific names, or ...