-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix panics on malformed inputs, support fuzzing #81
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
1a5c786
Fuzzing support: do not check crc32 or adler32 checksums in fuzzing m…
Shnatsel d61929f
Initial support for cargo-fuzz based on rust-fuzz/targets repository
Shnatsel 4e44045
Return Result from `expand_paletted()` instead of calling `unwrap()`.…
Shnatsel a5faaf2
Do not go out of bounds on malformed input in `unfilter()`; fixes a p…
Shnatsel e221ae9
When decoding interlaced files use info from current chunk instead of…
Shnatsel affd27e
Lower memory limit for input files from 50Mb to 5Mb in fuzz target
Shnatsel 4da73cd
Completely rewrite AFL integration using modern AFL.rs; boosts fuzzin…
Shnatsel 5c60ae1
Add Address Sanitizer exceptions to fuzzing targets, see #80 and http…
Shnatsel 724ae3c
Drop workaround for issue #80; it does not let us escape crashes anyway.
Shnatsel 1654228
Drop cargo-fuzz intergration; this crate already has afl in-tree whic…
Shnatsel b6734c7
Commit fuzzing seeds to afl folder. These were aggregated from fuzzin…
Shnatsel 645c5a2
Validate that paletted images have bit depth of 8 or less. Fixes debu…
Shnatsel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,10 @@ | ||
[package] | ||
name = "png-afl" | ||
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>"] | ||
|
||
[dependencies.png] | ||
version = "*" | ||
path = "../" | ||
[dependencies] | ||
afl = "0.4.0" | ||
png = {path = "../"} | ||
|
||
[dependencies.afl-plugin] | ||
git = "https://github.com/kmcallister/afl.rs" | ||
|
||
[dependencies.afl] | ||
git = "https://github.com/kmcallister/afl.rs" |
Binary file added
BIN
+60 Bytes
png-afl/fuzzing_seeds/id:000004,orig:08448590481e56783c09eb8e1ef74079454eb436
Binary file not shown.
Binary file added
BIN
+88 Bytes
png-afl/fuzzing_seeds/id:000005,orig:10e3f54adc22168afa151c8af62d7941025284dc
Binary file not shown.
Binary file added
BIN
+33 Bytes
png-afl/fuzzing_seeds/id:000007,orig:1362583835e3f5e9e77874ad644a1b29b22dc2ad
Binary file not shown.
Binary file added
BIN
+17 Bytes
png-afl/fuzzing_seeds/id:000012,orig:1d3e155e881d9562498ff94f05a3be75546c505f
Binary file not shown.
Binary file added
BIN
+33 Bytes
png-afl/fuzzing_seeds/id:000018,orig:2acb0b23ed76606fb695792131b7d95d898a5e18
Binary file not shown.
Binary file added
BIN
+27 Bytes
png-afl/fuzzing_seeds/id:000019,orig:2c13c7b51cd4a954b66841aa011919091d360178
Binary file not shown.
Binary file added
BIN
+44 Bytes
png-afl/fuzzing_seeds/id:000023,orig:353778e187277b7117906b5148f2c5664f4a09d9
Binary file not shown.
Binary file added
BIN
+129 Bytes
png-afl/fuzzing_seeds/id:000025,orig:36f641a2772720e205f208ee740ee8e7878417c2
Binary file not shown.
Binary file added
BIN
+33 Bytes
png-afl/fuzzing_seeds/id:000026,orig:38b5c767c827da5177cd8f95bc8a05e71084e8fc
Binary file not shown.
Binary file added
BIN
+457 Bytes
png-afl/fuzzing_seeds/id:000027,orig:3963b38d1bc68f1d89f879f8c9ecc0be29661db7
Binary file not shown.
1 change: 1 addition & 0 deletions
1
png-afl/fuzzing_seeds/id:000028,orig:3c7923f135d358fd685065fde8a996d474367da2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
� |
Binary file added
BIN
+36 Bytes
png-afl/fuzzing_seeds/id:000030,orig:42341ff82bbe4e8dc240ef36a83cbb3e38eee229
Binary file not shown.
Binary file added
BIN
+32 Bytes
png-afl/fuzzing_seeds/id:000031,orig:4258e48e5dc5d1ebbd7c7d93cb16abd76311af87
Binary file not shown.
Binary file added
BIN
+87 Bytes
png-afl/fuzzing_seeds/id:000033,orig:434b22009b14d79d292bdba36e1c9d469ffd6621
Binary file not shown.
1 change: 1 addition & 0 deletions
1
png-afl/fuzzing_seeds/id:000038,orig:4dd5a93acf101e99daea42f23555e2fd582fe400
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
��P |
1 change: 1 addition & 0 deletions
1
png-afl/fuzzing_seeds/id:000039,orig:4effda12c2611e2e4feb6f0d342feb685ccd825b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
�PNG |
Binary file added
BIN
+15 Bytes
png-afl/fuzzing_seeds/id:000042,orig:552f1c3c93d2fbd66322ac632d76da658451b8f2
Binary file not shown.
Binary file added
BIN
+32 Bytes
png-afl/fuzzing_seeds/id:000044,orig:5773467dc9fb2cb0d893c9f52ee82304a07c933b
Binary file not shown.
Binary file added
BIN
+1.12 KB
png-afl/fuzzing_seeds/id:000045,orig:58988106d03edadfd0589819cdbeee5ca4840bbc
Binary file not shown.
Binary file added
BIN
+1.05 KB
png-afl/fuzzing_seeds/id:000048,orig:5eed0a9941d51b4b81dd37b0ec47e0212f590d0c
Binary file not shown.
Binary file added
BIN
+88 Bytes
png-afl/fuzzing_seeds/id:000049,orig:643b0a9152e17b59016833e340ba82f9f3e50245
Binary file not shown.
Binary file added
BIN
+80 Bytes
png-afl/fuzzing_seeds/id:000050,orig:65bb64c0cff335e37189bc8fe3f1cb1fda85efdd
Binary file not shown.
Binary file added
BIN
+58 Bytes
png-afl/fuzzing_seeds/id:000051,orig:67a1be97015846c4ff4899530d7e20dc9cc82223
Binary file not shown.
Binary file added
BIN
+291 Bytes
png-afl/fuzzing_seeds/id:000053,orig:6f0adb505881dcbbcc9f9451511367c83a6095ac
Binary file not shown.
Binary file added
BIN
+26 Bytes
png-afl/fuzzing_seeds/id:000054,orig:6f9709674ea608e47e52a803db803cde811c518b
Binary file not shown.
Binary file added
BIN
+352 Bytes
png-afl/fuzzing_seeds/id:000057,orig:730c9b15a39603ec2c470077ec955af0fda43c58
Binary file not shown.
Binary file added
BIN
+28 Bytes
png-afl/fuzzing_seeds/id:000060,orig:7ecfa97b030ba44e424055345da873bbc447b7b5
Binary file not shown.
Binary file added
BIN
+76 Bytes
png-afl/fuzzing_seeds/id:000061,orig:7f631f660ee2501b140164af3fa6b88693bbcd66
Binary file not shown.
Binary file added
BIN
+1.59 KB
png-afl/fuzzing_seeds/id:000062,orig:7faf6fe0bdb2d37f16f0ba3fa8d13c798a07e9d0
Binary file not shown.
Binary file added
BIN
+31 Bytes
png-afl/fuzzing_seeds/id:000063,orig:85ac449629ab2f0c2743e5f1c716e4330f9eb7a1
Binary file not shown.
Binary file added
BIN
+52 Bytes
png-afl/fuzzing_seeds/id:000065,orig:8b0dc5bcc629faac9399690670c674a3b712190b
Binary file not shown.
1 change: 1 addition & 0 deletions
1
png-afl/fuzzing_seeds/id:000066,orig:8d03e18f2c1873830a99c7e79dc1061aebf7c8df
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
�� |
Binary file added
BIN
+11 Bytes
png-afl/fuzzing_seeds/id:000067,orig:8e6f4bd0a0ef7668a986a69fa9b2a5946190e66b
Binary file not shown.
Binary file added
BIN
+36 Bytes
png-afl/fuzzing_seeds/id:000068,orig:90396cfeb60dea4e9e1317320742ec924790ff4c
Binary file not shown.
Binary file added
BIN
+296 Bytes
png-afl/fuzzing_seeds/id:000075,orig:9ceb51e2b4faa94d6686b80e9271a09592d778af
Binary file not shown.
Binary file added
BIN
+124 Bytes
png-afl/fuzzing_seeds/id:000077,orig:9f0c2985bd98c74fe766d18963ee91958ec9b9f2
Binary file not shown.
Binary file added
BIN
+316 Bytes
png-afl/fuzzing_seeds/id:000078,orig:a1c57f1cc3f92cd18c71ce5ad341cd8702faf51a
Binary file not shown.
Binary file added
BIN
+76 Bytes
png-afl/fuzzing_seeds/id:000079,orig:a211375ab0139b11cc475ec4f4a67d32f5f79323
Binary file not shown.
Binary file added
BIN
+75 Bytes
png-afl/fuzzing_seeds/id:000080,orig:a87461573d6dd88155f59195324d2f84c26779c0
Binary file not shown.
Binary file added
BIN
+80 Bytes
png-afl/fuzzing_seeds/id:000081,orig:af2263242a69a92dd26c11b5237412efd3211258
Binary file not shown.
Binary file added
BIN
+36 Bytes
png-afl/fuzzing_seeds/id:000083,orig:b6bbfc493d038b97bba6cca4e6e8dff34e871159
Binary file not shown.
Binary file added
BIN
+79 Bytes
png-afl/fuzzing_seeds/id:000084,orig:bcac6abddfaab667e00dfd35efd54f938442c76a
Binary file not shown.
Binary file added
BIN
+44 Bytes
png-afl/fuzzing_seeds/id:000086,orig:c8e6bfba8dd71b9d84a201883c12500183adf895
Binary file not shown.
Binary file added
BIN
+452 Bytes
png-afl/fuzzing_seeds/id:000090,orig:d7e1291f1f2f25ea8e226b53273aa024dc62fc5a
Binary file not shown.
Binary file added
BIN
+33 Bytes
png-afl/fuzzing_seeds/id:000091,orig:d9b5b22f0332da6efd8ca9b9ee5e6f95d9631ef8
Binary file not shown.
Binary file added
BIN
+72 Bytes
png-afl/fuzzing_seeds/id:000092,orig:dac9e097f69b15e253d3de0b298e46915ab30a73
Binary file not shown.
Binary file added
BIN
+76 Bytes
png-afl/fuzzing_seeds/id:000095,orig:e5f56b6e44a5263f6b772a1ae4611f5d76176775
Binary file not shown.
Binary file added
BIN
+20 Bytes
png-afl/fuzzing_seeds/id:000103,orig:f84fa355bef02ba66da36966451ca92f3a0f054c
Binary file not shown.
Binary file added
BIN
+103 Bytes
png-afl/fuzzing_seeds/id:000104,orig:faec7890fe231665856b35c20be4d87c6e8c32c1
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+112 Bytes
png-afl/fuzzing_seeds/id:000143,src:000001,op:arith8,pos:11,val:-3,+cov
Binary file not shown.
Binary file added
BIN
+112 Bytes
png-afl/fuzzing_seeds/id:000144,src:000001,op:arith8,pos:11,val:-5,+cov
Binary file not shown.
Binary file added
BIN
+115 Bytes
png-afl/fuzzing_seeds/id:000150,src:000001,op:arith8,pos:75,val:-18,+cov
Binary file not shown.
Binary file added
BIN
+115 Bytes
png-afl/fuzzing_seeds/id:000151,src:000001,op:arith8,pos:75,val:-19,+cov
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+115 Bytes
png-afl/fuzzing_seeds/id:000153,src:000001,op:arith8,pos:81,val:+31,+cov
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+104 Bytes
png-afl/fuzzing_seeds/id:000162,src:000001,op:int16,pos:83,val:be:+512,+cov
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+104 Bytes
png-afl/fuzzing_seeds/id:000270,src:000127+000120,op:splice,rep:4,+cov
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+114 Bytes
png-afl/fuzzing_seeds/id:000273,src:000132+000173,op:splice,rep:4,+cov
Binary file not shown.
Binary file added
BIN
+131 Bytes
png-afl/fuzzing_seeds/id:000282,src:000140+000143,op:splice,rep:4,+cov
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+104 Bytes
png-afl/fuzzing_seeds/id:000387,src:000303+000183,op:splice,rep:2,+cov
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+227 Bytes
png-afl/fuzzing_seeds/id:000618,src:000617+000437,op:splice,rep:2,+cov
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think nwin removed as author here by accident.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, it's under the "png-afl" directory, didn't saw that.
@nwin OK with this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I split the panic fixes to a separate PR so they would not be held up by a copyright notice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's OK. @nwin can just add himself back as author if he disagrees.