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

Issue 724885 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Integer-overflow in BiInterpolImpl

Project Member Reported by ClusterFuzz, May 21 2017

Issue description

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

Fuzzer: tokenfuzz_pdf_march16
Job Type: linux_ubsan_chrome
Platform Id: linux

Crash Type: Integer-overflow
Crash Address: 
Crash State:
  BiInterpolImpl
  Coon_Color::BiInterpol
  CPDF_PatchDrawer::Draw
  
Sanitizer: undefined (UBSAN)

Regressed: https://clusterfuzz.com/revisions?job=linux_ubsan_chrome&range=370022:370027

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


Issue filed automatically.

See https://dev.chromium.org/Home/chromium-security/bugs/reproducing-clusterfuzz-bugs for more information.
 
Cc: ranjitkan@chromium.org
Labels: M-60 Test-Predator-Correct-CLs
Owner: npm@chromium.org
Status: Assigned (was: Untriaged)
Assigning to concern owner from Predator results --
The result is a list of CL's that change the crashed files. 

Author: npm
Project: chromium-pdfium
Changelist: https://pdfium.googlesource.com/pdfium.git/+/483f3c485ac727cbf74c89e3912e5a4475d5f8f9
Time: Thu Nov 17 13:50:44 2016 -0800
The CL last changed line 683 of file cpdf_renderstatus.cpp, which is stack frame 0. 

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

Thanks.!

Comment 2 by npm@chromium.org, May 24 2017

Components: Internals>Plugins>PDF
There's many problems with this testcase:
* Undefined shift in AGG
* Integer overflow in CPDF_RenderStatus
* This is a handcrafted example, not created by clusterfuzz. The size is about 2MB and on my machine it takes about 33 seconds on pdfium_test release (triple on debug) to render. It has type 6 shadings (coon patch meshes) that seem to take long.
Project Member

Comment 3 by bugdroid1@chromium.org, May 24 2017

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

commit a38f7989beacdf0a73441e4096d9ce7a196b10d3
Author: Nicolas Pena <npm@chromium.org>
Date: Wed May 24 17:53:20 2017

Use CheckedNumeric in BiInterpolImpl

This CL splits up BiInterpolImpl into the three interpolations its made of. In
the interpolation, safe math is used, and a boolean keeps track of whether an
overflow has occurred. If it does, we consider the patch to be invalid and
immediately terminate the Draw method.

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

[modify] https://crrev.com/a38f7989beacdf0a73441e4096d9ce7a196b10d3/core/fpdfapi/render/cpdf_renderstatus.cpp

Project Member

Comment 4 by ClusterFuzz, May 25 2017

ClusterFuzz has detected this issue as fixed in range 474371:474399.

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

Fuzzer: tokenfuzz_pdf_march16
Job Type: linux_ubsan_chrome
Platform Id: linux

Crash Type: Integer-overflow
Crash Address: 
Crash State:
  BiInterpolImpl
  Coon_Color::BiInterpol
  CPDF_PatchDrawer::Draw
  
Sanitizer: undefined (UBSAN)

Regressed: https://clusterfuzz.com/revisions?job=linux_ubsan_chrome&range=370022:370027
Fixed: https://clusterfuzz.com/revisions?job=linux_ubsan_chrome&range=474371:474399

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


See https://dev.chromium.org/Home/chromium-security/bugs/reproducing-clusterfuzz-bugs 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, May 25 2017

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

If this is incorrect, please add ClusterFuzz-Wrong label and re-open the issue.

Sign in to add a comment