New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 728321 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Integer-overflow in sycc444_to_rgb

Project Member Reported by ClusterFuzz, May 31 2017

Issue description

Detailed report: https://clusterfuzz.com/testcase?key=6689671496335360

Fuzzer: libfuzzer_pdf_jpx_fuzzer
Job Type: libfuzzer_chrome_ubsan
Platform Id: linux

Crash Type: Integer-overflow
Crash Address: 
Crash State:
  sycc444_to_rgb
  color_sycc_to_rgb
  CJPX_Decoder::Init
  
Sanitizer: undefined (UBSAN)

Regressed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_ubsan&range=445846:445971

Reproducer Testcase: https://clusterfuzz.com/download?testcase_id=6689671496335360


Issue filed automatically.

See https://chromium.googlesource.com/chromium/src/+/master/testing/libfuzzer/reproducing.md for more information.
 
Cc: ranjitkan@chromium.org
Labels: M-61 Test-Predator-Correct-CLs
Owner: dsinclair@chromium.org
Status: Assigned (was: Untriaged)
Assigning to the concern owner from Predator results --
The result is a list of CLs that change the crashed files.

Author: Dan Sinclair
Project: chromium-pdfium
Changelist: https://pdfium.googlesource.com/pdfium.git/+/0bb1333a9eff1190ddd68f34c71d6a779c69dfef
Time: Thu Mar 30 16:12:02 2017 -0400
The CL last changed line 873 of file fx_codec_jpx_opj.cpp, which is stack frame 3. 

@dsinclair: Assigning to you, kindly take a look into it. Please help us to find an owner if not with respect to your change.

Thanks.
Components: Internals>Plugins>PDF
Status: Started (was: Assigned)
Project Member

Comment 4 by bugdroid1@chromium.org, Jun 8 2017

The following revision refers to this bug:
  https://pdfium.googlesource.com/pdfium/+/2ddf1ccbf8c0596c0ba994114420a50fca2240f3

commit 2ddf1ccbf8c0596c0ba994114420a50fca2240f3
Author: Dan Sinclair <dsinclair@chromium.org>
Date: Thu Jun 08 19:41:04 2017

Guard against undefined shifting in JPX decoder

If the prec value in syncc444_to_rgb is more then 30 then when we shift
left we'll go negative. The subsequent -1 will cause an overflow. This
CL early returns if the prec value is > 30.

Bug:  chromium:728321 
Change-Id: I4d25e9bab840bc6d46f8db3490c9484392cd7a32
Reviewed-on: https://pdfium-review.googlesource.com/6414
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>

[modify] https://crrev.com/2ddf1ccbf8c0596c0ba994114420a50fca2240f3/core/fxcodec/codec/fx_codec_jpx_opj.cpp

Status: Fixed (was: Started)
Project Member

Comment 6 by ClusterFuzz, Jun 10 2017

ClusterFuzz has detected this issue as fixed in range 478270:478281.

Detailed report: https://clusterfuzz.com/testcase?key=6689671496335360

Fuzzer: libFuzzer_pdf_jpx_fuzzer
Job Type: libfuzzer_chrome_ubsan
Platform Id: linux

Crash Type: Integer-overflow
Crash Address: 
Crash State:
  sycc444_to_rgb
  color_sycc_to_rgb
  CJPX_Decoder::Init
  
Sanitizer: undefined (UBSAN)

Regressed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_ubsan&range=445846:445971
Fixed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_ubsan&range=478270:478281

Reproducer Testcase: https://clusterfuzz.com/download?testcase_id=6689671496335360


See https://chromium.googlesource.com/chromium/src/+/master/testing/libfuzzer/reproducing.md for more information.

If you suspect that the result above is incorrect, try re-doing that job on the test case report page.

Sign in to add a comment