Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(792)

Issue 1808123004: [libfuzzer] Add a sanity check for too big images in libpng_read_fuzzer. (Closed)

Created:
4 years, 9 months ago by mmoroz
Modified:
4 years, 9 months ago
Reviewers:
krasin1, kcc2, aizatsky, inferno
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[libfuzzer] Add a sanity check for too big images in libpng_read_fuzzer. This change has been mirrored from google3 png fuzzer. Should prevent some timeouts. R=aizatsky@chromium.org, inferno@chromium.org, kcc@chromium.org, krasin@chromium.org BUG=584819 TBR=aizatsky@chromium.org Committed: https://crrev.com/47be097348e455997215e3504358dcf114b32d64 Cr-Commit-Position: refs/heads/master@{#381749}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Replace multiply with division to avoid overflow. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -1 line) Patch
M testing/libfuzzer/fuzzers/libpng_read_fuzzer.cc View 1 2 chunks +5 lines, -1 line 1 comment Download

Messages

Total messages: 24 (11 generated)
mmoroz
4 years, 9 months ago (2016-03-17 16:59:32 UTC) #1
krasin
https://codereview.chromium.org/1808123004/diff/1/testing/libfuzzer/fuzzers/libpng_read_fuzzer.cc File testing/libfuzzer/fuzzers/libpng_read_fuzzer.cc (right): https://codereview.chromium.org/1808123004/diff/1/testing/libfuzzer/fuzzers/libpng_read_fuzzer.cc#newcode95 testing/libfuzzer/fuzzers/libpng_read_fuzzer.cc:95: if (height * width > 100000000) what if height ...
4 years, 9 months ago (2016-03-17 17:02:48 UTC) #5
inferno
lgtm
4 years, 9 months ago (2016-03-17 17:02:49 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1808123004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1808123004/1
4 years, 9 months ago (2016-03-17 17:02:58 UTC) #9
aarya
On 2016/03/17 17:02:58, commit-bot: I haz the power wrote: > CQ is trying da patch. ...
4 years, 9 months ago (2016-03-17 17:04:20 UTC) #12
kcc2
On 2016/03/17 17:04:20, aarya wrote: > On 2016/03/17 17:02:58, commit-bot: I haz the power wrote: ...
4 years, 9 months ago (2016-03-17 17:10:39 UTC) #13
mmoroz
On 2016/03/17 17:02:48, krasin wrote: > https://codereview.chromium.org/1808123004/diff/1/testing/libfuzzer/fuzzers/libpng_read_fuzzer.cc > File testing/libfuzzer/fuzzers/libpng_read_fuzzer.cc (right): > > https://codereview.chromium.org/1808123004/diff/1/testing/libfuzzer/fuzzers/libpng_read_fuzzer.cc#newcode95 > ...
4 years, 9 months ago (2016-03-17 17:26:05 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1808123004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1808123004/20001
4 years, 9 months ago (2016-03-17 17:41:28 UTC) #17
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 9 months ago (2016-03-17 18:21:30 UTC) #19
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/47be097348e455997215e3504358dcf114b32d64 Cr-Commit-Position: refs/heads/master@{#381749}
4 years, 9 months ago (2016-03-17 18:22:48 UTC) #21
krasin1
https://codereview.chromium.org/1808123004/diff/20001/testing/libfuzzer/fuzzers/libpng_read_fuzzer.cc File testing/libfuzzer/fuzzers/libpng_read_fuzzer.cc (right): https://codereview.chromium.org/1808123004/diff/20001/testing/libfuzzer/fuzzers/libpng_read_fuzzer.cc#newcode95 testing/libfuzzer/fuzzers/libpng_read_fuzzer.cc:95: if (height > 100000000 / width) Sorry for not ...
4 years, 9 months ago (2016-03-17 18:25:02 UTC) #22
mmoroz
On 2016/03/17 18:25:02, krasin1 wrote: > https://codereview.chromium.org/1808123004/diff/20001/testing/libfuzzer/fuzzers/libpng_read_fuzzer.cc > File testing/libfuzzer/fuzzers/libpng_read_fuzzer.cc (right): > > https://codereview.chromium.org/1808123004/diff/20001/testing/libfuzzer/fuzzers/libpng_read_fuzzer.cc#newcode95 > ...
4 years, 9 months ago (2016-03-18 08:22:44 UTC) #23
mmoroz
4 years, 9 months ago (2016-03-18 09:35:17 UTC) #24
Message was sent while issue was closed.
On 2016/03/18 08:22:44, mmoroz wrote:
> On 2016/03/17 18:25:02, krasin1 wrote:
> >
>
https://codereview.chromium.org/1808123004/diff/20001/testing/libfuzzer/fuzze...
> > File testing/libfuzzer/fuzzers/libpng_read_fuzzer.cc (right):
> > 
> >
>
https://codereview.chromium.org/1808123004/diff/20001/testing/libfuzzer/fuzze...
> > testing/libfuzzer/fuzzers/libpng_read_fuzzer.cc:95: if (height > 100000000 /
> > width)
> > Sorry for not catching up in time, but what if width == 0?
> 
> Oh, my bad, I shouldn't hurry up with that. Thanks!

Fortunately, png_check_IHDR() doesn't accept width or height of 0, but I've
uploaded additional condition: https://codereview.chromium.org/1809383002.

Powered by Google App Engine
This is Rietveld 408576698