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

Issue 675123 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 676400
Owner:
Closed: Dec 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Float-cast-overflow in blink::BaseRenderingContext2D::drawImage

Project Member Reported by ClusterFuzz, Dec 16 2016

Issue description

Detailed report: https://cluster-fuzz.appspot.com/testcase?key=5186061518241792

Fuzzer: inferno_twister
Job Type: linux_ubsan_chrome
Platform Id: linux

Crash Type: Float-cast-overflow
Crash Address: 
Crash State:
  blink::BaseRenderingContext2D::drawImage
  drawImage3Method
  drawImageMethod
  
Regressed: https://cluster-fuzz.appspot.com/revisions?job=linux_ubsan_chrome&range=435261:438085

Minimized Testcase (0.72 Kb): https://cluster-fuzz.appspot.com/download/AMIfv96STcemol2-hCjgvhL2_oYsWiZ0seHz6o2NwZTzu2DYVDp7nBp6QR-wSDPgsEGgJGV_6PUFFuxWESA1uUDmCPSJgUAzkeqKvV8JKBPKtTRir-ZtLpRsPjMoeE-X9VGc6G2EkJTCa_D1UvCRKousvCUgibr2hQ?testcase_id=5186061518241792

Issue filed automatically.

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

Author: ccameron
Project: chromium
Changelist: https://chromium.googlesource.com/chromium/src/+/7d997bde5eb18172951ccc321744929aea560d36
Time: Fri Dec 09 22:06:00 2016
File BaseRenderingContext2D.cpp is changed in this cl (and is part of stack frame #0, "blink::BaseRenderingContext2D::drawImage")
Minimum distance from crash line to modified line: 73. (file: BaseRenderingContext2D.cpp, crashed on: 1158, modified: 1085).

@ccameron -- Could you please look into the issue, kindly re-assign if this is not related to your changes.
Thank You.

Comment 2 Deleted

This is a 2 week bisect range, which is not a useful range -- no human who values their time will go through 3 thousand patches to find a culprit.

That patch modified a different function in the same file, and is certainly not the cause of the problem.

So, the attribution is wrong. But, I've already sunk a while into reproducing this, so I might as well fix it.

The code that is failing is:

  if (!std::isfinite(dx) || !std::isfinite(dy) || !std::isfinite(dw) ||
      !std::isfinite(dh) || !std::isfinite(sx) || !std::isfinite(sy) ||
      !std::isfinite(sw) || !std::isfinite(sh) || !dw || !dh || !sw || !sh)
    return;

  FloatRect srcRect = normalizeRect(FloatRect(sx, sy, sw, sh));

Umm, shouldn't we be checking that the cast to float would be safe?
Mergedinto: 676400
Status: Duplicate (was: Assigned)
Project Member

Comment 5 by ClusterFuzz, Dec 22 2016

ClusterFuzz has detected this issue as fixed in range 440242:440280.

Detailed report: https://cluster-fuzz.appspot.com/testcase?key=5186061518241792

Fuzzer: inferno_twister
Job Type: linux_ubsan_chrome
Platform Id: linux

Crash Type: Float-cast-overflow
Crash Address: 
Crash State:
  blink::BaseRenderingContext2D::drawImage
  drawImage3Method
  drawImageMethod
  
Regressed: https://cluster-fuzz.appspot.com/revisions?job=linux_ubsan_chrome&range=435261:438085
Fixed: https://cluster-fuzz.appspot.com/revisions?job=linux_ubsan_chrome&range=440242:440280

Minimized Testcase (0.72 Kb): https://cluster-fuzz.appspot.com/download/AMIfv96STcemol2-hCjgvhL2_oYsWiZ0seHz6o2NwZTzu2DYVDp7nBp6QR-wSDPgsEGgJGV_6PUFFuxWESA1uUDmCPSJgUAzkeqKvV8JKBPKtTRir-ZtLpRsPjMoeE-X9VGc6G2EkJTCa_D1UvCRKousvCUgibr2hQ?testcase_id=5186061518241792

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.

Sign in to add a comment