New issue
Advanced search Search tips

Issue 698526 link

Starred by 2 users

Issue metadata

Status: Verified
Merged: issue 694042
Owner:
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Undefined-shift in opj_t1_dec_clnpass

Project Member Reported by ClusterFuzz, Mar 4 2017

Issue description

Mergedinto: 694042
Status: Duplicate (was: Untriaged)

Comment 2 by npm@chromium.org, Mar 7 2017

Cc: nyerramilli@chromium.org weili@chromium.org npm@chromium.org dsinclair@chromium.org
 Issue 694042  has been merged into this issue.

Comment 3 by npm@chromium.org, Mar 7 2017

Cc: -npm@chromium.org
Owner: npm@chromium.org
Status: Assigned (was: Duplicate)

Comment 4 by npm@chromium.org, Mar 7 2017

Filed upstream bug: https://github.com/uclouvain/openjpeg/issues/903
Project Member

Comment 5 by bugdroid1@chromium.org, May 11 2017

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

commit 2a2ee0f1ca747929acaf1b4f2eadbf7c8e8025e6
Author: Nicolas Pena <npm@chromium.org>
Date: Thu May 11 16:09:22 2017

LibOpenJPEG: undefined shift in opj_t1_dec_clnpass

bpno_plus_one is used as a parameter bpno for a bunch of methods that calculate
1 << bpno. Thus, use a reduced value when it's large enough to cause undefined
shift. bpno_plus_one itself remains unchanged so that the number of calls
remains the same

Bug:  chromium:698526 
Change-Id: I40431d41a04f3e2315bd3c80114cd0fcbd2815b4
Reviewed-on: https://pdfium-review.googlesource.com/5310
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>

[add] https://crrev.com/2a2ee0f1ca747929acaf1b4f2eadbf7c8e8025e6/third_party/libopenjpeg20/0033-undefined-shift-opj_t1_dec_clnpass.patch
[modify] https://crrev.com/2a2ee0f1ca747929acaf1b4f2eadbf7c8e8025e6/third_party/libopenjpeg20/README.pdfium
[modify] https://crrev.com/2a2ee0f1ca747929acaf1b4f2eadbf7c8e8025e6/third_party/libopenjpeg20/t1.c

Project Member

Comment 6 by ClusterFuzz, May 12 2017

ClusterFuzz has detected this issue as fixed in range 470999:471049.

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

Fuzzer: libfuzzer_pdf_jpx_fuzzer
Job Type: libfuzzer_chrome_ubsan
Platform Id: linux

Crash Type: Undefined-shift
Crash Address: 
Crash State:
  opj_t1_dec_clnpass
  opj_t1_decode_cblk
  opj_t1_decode_cblks
  
Sanitizer: undefined (UBSAN)

Regressed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_ubsan&range=395640:395746
Fixed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_ubsan&range=470999:471049

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


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.
Components: Internals>Plugins>PDF

Comment 8 by npm@chromium.org, May 18 2017

Status: Verified (was: Assigned)

Sign in to add a comment