Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upFix panics on malformed inputs, support fuzzing #81
Conversation
Shnatsel
added some commits
Jun 21, 2018
bvssvni
reviewed
Jul 5, 2018
| version = "0.1.0" | ||
| authors = ["nwin <nwin@users.noreply.github.com>"] | ||
| version = "0.2.0" | ||
| authors = ["Sergey Davidoff <shnatsel@gmail.com>", "Paul Grandperrin <paul.grandperrin@gmail.com>"] |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Shnatsel
Jul 6, 2018
Contributor
I have entirely replaced the afl/ subfolder without using anything that's in there previously. Its current incarnation is based only on https://github.com/rust-fuzz/targets, which is why Paul Grandperrin is credited.
I agree nwin should be credited for his contribution in some way, but I have removed him from the copyright notice for the source files the current afl/ folder is not based on his work in any way, and such misattribution is deliberately prohibited under some licenses, e.g. some BSD variants. This crate is dual-licensed under MIT and Apache, which do not have such a clause, so crediting nwin here would not be in conflict with the license.
I will re-add him as an author if you believe that is the best way to go about it.
This comment has been minimized.
This comment has been minimized.
bvssvni
Jul 6, 2018
Member
Ah, it's under the "png-afl" directory, didn't saw that.
@nwin OK with this?
This comment has been minimized.
This comment has been minimized.
Shnatsel
Jul 11, 2018
Contributor
Should I split the panic fixes to a separate PR so they would not be held up by a copyright notice?
This comment has been minimized.
This comment has been minimized.
bvssvni
Jul 12, 2018
Member
I think it's OK. @nwin can just add himself back as author if he disagrees.
This comment has been minimized.
This comment has been minimized.
|
Merging. |
Shnatsel commentedJun 27, 2018
•
edited
Bypass crc32 and adler32 checks when compiled with fuzzing instrumentation. This lets fuzzers reach actually interesting code.
Add a starting corpus for fuzzing, obtained initially by fuzzing other tools, then fed to afl-fuzz on image-png to get more inputs specific to it, and subsequently minified with afl-cmin.
Fix panics on malformed inputs discovered via fuzzing (#79):
expand_paletted(): returnResultinstead of callingunwrap()unfilter(): now checks bounds and returns Resultnext_interlaced_row():infofrom previous row was erroneously used to decode the current row. Fixing this no longer triggers a panic and likely fixes decoding of some real-world PNGs.Not fixed in this PR: