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

Issue 708504 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Undefined-shift in CJBig2_TRDProc::decode_Huffman

Project Member Reported by ClusterFuzz, Apr 5 2017

Issue description

Cc: msrchandra@chromium.org weili@chromium.org
Labels: Test-Predator-Wrong-CLs M-59
Owner: dsinclair@chromium.org
Status: Assigned (was: Untriaged)
Predator and CL did not find any possible suspects.
Using Code Search for the file, "JBig2_TrdProc.cpp" assigning to the concern owner.
Suspecting Commit#
https://pdfium.googlesource.com/pdfium.git/+/0bb1333a9eff1190ddd68f34c71d6a779c69dfef

@dsinclair -- Could you please take a look into the issue, kindly re-assign if this is not related to your changes.
Also adding related Dev in Cc
Thank You.
Status: Started (was: Assigned)
https://pdfium-review.googlesource.com/c/4010/
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 10 2017

The following revision refers to this bug:
  https://pdfium.googlesource.com/pdfium/+/96e65ae3a3a328022f025805e9db02cbed1b5607

commit 96e65ae3a3a328022f025805e9db02cbed1b5607
Author: Dan Sinclair <dsinclair@chromium.org>
Date: Mon Apr 10 22:10:26 2017

Guard against negative shift in nVal calculation

It's possible for the nVal to become negative as it is shifted. This Cl
changes nVal to be a checked_numeric and bails out if the shift is invalid.

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

[modify] https://crrev.com/96e65ae3a3a328022f025805e9db02cbed1b5607/core/fxcodec/jbig2/JBig2_TrdProc.cpp

Project Member

Comment 4 by ClusterFuzz, Apr 12 2017

ClusterFuzz has detected this issue as fixed in range 463671:463725.

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

Fuzzer: libfuzzer_pdf_codec_jbig2_fuzzer
Job Type: libfuzzer_chrome_ubsan
Platform Id: linux

Crash Type: Undefined-shift
Crash Address: 
Crash State:
  CJBig2_TRDProc::decode_Huffman
  CJBig2_SDDProc::decode_Huffman
  CJBig2_Context::parseSymbolDict
  
Sanitizer: undefined (UBSAN)

Regressed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_ubsan&range=421422:421461
Fixed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_ubsan&range=463671:463725

Reproducer Testcase: https://clusterfuzz.com/download/AMIfv97EJRuLHeulnoxgFopKhrA972twMVkGXS29eAI2e6YbvRGMdu-5ytTQroYJw-rHRdWt3Y1i2vsL2DVkYDofQj56_x7yiugE5S89SJL5pHUr3_Mggfaf-uET17nDdjn-v3FABnBLMmpyRHvjadMhaGuXkBMFTCnGzJGOVQIAJEB_DIgANLSjwQpyOb9duRxA4Ua8rzex5HKTdS1POPgmROpJ3OEu9Xn-DW4Mf5W0y2yZ-g9_p_6j15MH4ip5ADBBXf2iK6htTbTY-V1cc6xkBSG0I7Zy-wLjHZAkUL638AEA0mxKi5flxiADnDnxBnpakocQoEZKNPognsgm2JOaeRfL-hdJ-DrAg7BXF_StIUtl-RkXxIhSfZS1-Ke1shbKp6eC1IeZOuVIWGfkwM4qPqkp0NFHLQ?testcase_id=5417031425064960


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.
Project Member

Comment 5 by ClusterFuzz, Apr 12 2017

Labels: ClusterFuzz-Verified
Status: Verified (was: Started)
ClusterFuzz testcase 5417031425064960 is verified as fixed, so closing issue.

If this is incorrect, please add ClusterFuzz-Wrong label and re-open the issue.
Components: Internals>Plugins>PDF

Sign in to add a comment