image-rs / jpeg-decoder

JPEG decoder written in Rust
Apache License 2.0
148 stars 87 forks source link

Add afl fuzz target #131

Closed dbrgn closed 4 years ago

dbrgn commented 4 years ago

Add a decoder fuzz target using afl.rs.

The fuzzer already found panics within seconds of running it :slightly_smiling_face: I'll open separate issues for those.

Shnatsel commented 4 years ago

Awesome! You should try using the sets of images generated by AFL on other libraries as input to speed things up: http://lcamtuf.coredump.cx/afl/demo/

Also, you might want to add the bugs you've found to https://github.com/rust-fuzz/trophy-case. This not only gets you perpetual glory, but also enables interesting quantitative analysis like this one.

dbrgn commented 4 years ago

@Shnatsel thanks, I wasn't aware of those input corpora! Will update the PR.

Also, you might want to add the bugs you've found to https://github.com/rust-fuzz/trophy-case

Yep, I will submit all confirmed bugs.

dbrgn commented 4 years ago

Added 98 new inputs from http://lcamtuf.coredump.cx/afl/demo/, as well as a second fuzz target that parses the header only (read_info). Decoding will parse the header as well, but it might still be interesting to fuzz the header parsing separately.

dbrgn commented 4 years ago

@HeroicKatora oh, sorry for forgetting about this PR. thanks for the update!

HeroicKatora commented 4 years ago

Sorry for forgetting about this PR. thanks for the update!

It's my responsibility to do reminders once in a while. Consider yourself reminded :wink:

Thank you!