New issue
Advanced search Search tips

Issue 882959 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Integer-overflow in FX_RECT::Width

Project Member Reported by ClusterFuzz, Sep 11

Issue description

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

Fuzzer: attekett_surku_fuzzer
Job Type: linux_ubsan_chrome
Platform Id: linux

Crash Type: Integer-overflow
Crash Address: 
Crash State:
  FX_RECT::Width
  CFX_ImageTransformer::CFX_ImageTransformer
  CFX_DIBBase::TransformTo
  
Sanitizer: undefined (UBSAN)

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

Issue filed automatically.

See https://github.com/google/clusterfuzz-tools for more information.
 
Cc: kkaluri@chromium.org
Components: Internals>Plugins>PDF
Labels: M-69 Test-Predator-Wrong
Owner: tsepez@chromium.org
Status: Assigned (was: Untriaged)
Predator and CL could not provide any possible suspects.

Using Code Search for the file, "cfx_dibbase.cpp" suspecting the below Cl might have caused this issue

Suspect CL: https://pdfium.googlesource.com/pdfium.git/+/e6ff2ebfaa19421c8d932f4d275548156ae2e13c

tsepez@ -- Could you please check whether this is caused with respect to your change, if not please help us in assigning it to the right owner.

Thanks!
This is likely been around for a while.  The issue occurs when the Rectangle has a left of |-2147483648| and a |right| of 0, so that width is |0 - -2147483648| or
+2147483648 which doesn't fit in an int.

These values are produced by overflows in MatchFloatRange() which blindly casts to int regardless of range.  
Project Member

Comment 4 by bugdroid1@chromium.org, Sep 14

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/52b73886b84ae9df13629bebc991575c3fdcb500

commit 52b73886b84ae9df13629bebc991575c3fdcb500
Author: chromium-autoroll <chromium-autoroll@skia-public.iam.gserviceaccount.com>
Date: Fri Sep 14 01:06:58 2018

Roll src/third_party/pdfium 61f1d62daa12..7a956edb6b53 (1 commits)

https://pdfium.googlesource.com/pdfium.git/+log/61f1d62daa12..7a956edb6b53


git log 61f1d62daa12..7a956edb6b53 --date=short --no-merges --format='%ad %ae %s'
2018-09-13 tsepez@chromium.org Use safe math in MatchFloatRange().


Created with:
  gclient setdep -r src/third_party/pdfium@7a956edb6b53

The AutoRoll server is located here: https://autoroll.skia.org/r/pdfium-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.



BUG= chromium:882959 
TBR=dsinclair@chromium.org

Change-Id: I79adba3fb60760ee7c716b5566d2ac12ba1e0989
Reviewed-on: https://chromium-review.googlesource.com/1226372
Reviewed-by: chromium-autoroll <chromium-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: chromium-autoroll <chromium-autoroll@skia-public.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#591246}
[modify] https://crrev.com/52b73886b84ae9df13629bebc991575c3fdcb500/DEPS

Project Member

Comment 5 by ClusterFuzz, Sep 14

ClusterFuzz has detected this issue as fixed in range 591081:591083.

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

Fuzzer: attekett_surku_fuzzer
Job Type: linux_ubsan_chrome
Platform Id: linux

Crash Type: Integer-overflow
Crash Address: 
Crash State:
  FX_RECT::Width
  CFX_ImageTransformer::CFX_ImageTransformer
  CFX_DIBBase::TransformTo
  
Sanitizer: undefined (UBSAN)

Fixed: https://clusterfuzz.com/revisions?job=linux_ubsan_chrome&range=591081:591083

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

See https://github.com/google/clusterfuzz-tools 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 6 by ClusterFuzz, Sep 14

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

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

Sign in to add a comment