New issue
Advanced search Search tips

Issue 675158 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Float-cast-overflow in parseAlphaValue<unsigned

Project Member Reported by ClusterFuzz, Dec 16 2016

Issue description

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

Fuzzer: inferno_twister
Job Type: linux_ubsan_chrome
Platform Id: linux

Crash Type: Float-cast-overflow
Crash Address: 
Crash State:
  parseAlphaValue<unsigned
  fastParseColorInternal<unsigned
  blink::CSSParserFastPaths::parseColor
  
Regressed: https://cluster-fuzz.appspot.com/revisions?job=linux_ubsan_chrome&range=435261:438085

Minimized Testcase (1.61 Kb): https://cluster-fuzz.appspot.com/download/AMIfv96v1xu-YtjAyzCO6id8GOptYk7VwkwqB8k6tPUZUQaP2SGi_QuTTYley-h272pMcWlsV_RY_DDXI2Dbwy1_A8BnK3pHoWzO-Btf3yIAm9smAeoGhQbveNHHPgI1RSDg53bj6Yx9IsBl4Yx_-KfFx1vi-pDSHQ?testcase_id=5866699514707968

Issue filed automatically.

See https://dev.chromium.org/Home/chromium-security/bugs/reproducing-clusterfuzz-bugs for more information.
 

Comment 1 by f...@opera.com, Dec 20 2016

Owner: f...@opera.com
Status: Assigned (was: Untriaged)

Comment 2 by f...@opera.com, Dec 20 2016

Components: Blink>CSS
Project Member

Comment 3 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=5866699514707968

Fuzzer: inferno_twister
Job Type: linux_ubsan_chrome
Platform Id: linux

Crash Type: Float-cast-overflow
Crash Address: 
Crash State:
  parseAlphaValue<unsigned
  fastParseColorInternal<unsigned
  blink::CSSParserFastPaths::parseColor
  
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 (1.61 Kb): https://cluster-fuzz.appspot.com/download/AMIfv96v1xu-YtjAyzCO6id8GOptYk7VwkwqB8k6tPUZUQaP2SGi_QuTTYley-h272pMcWlsV_RY_DDXI2Dbwy1_A8BnK3pHoWzO-Btf3yIAm9smAeoGhQbveNHHPgI1RSDg53bj6Yx9IsBl4Yx_-KfFx1vi-pDSHQ?testcase_id=5866699514707968

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 4 by ClusterFuzz, Dec 22 2016

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

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

Comment 5 by bugdroid1@chromium.org, Dec 22 2016

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

commit 6c6634508a1438f66057dc414af8171be9602e7c
Author: fs <fs@opera.com>
Date: Thu Dec 22 10:10:50 2016

Clamp rgba(...) alpha value in the CSS fast-path parser

The general CSS parser will clamp the alpha value to the [0, 1] range,
while the fast-path parser does not. This means that large alpha values
will result in overflow in the cast to int, yielding the wrong color
value.
Add a clamp to the [0, 1] range before converting to the [0, 256) range
and converting to int. Because negative values are handled separately,
we only need to apply the clamp for the range above zero.

BUG= 675158 

Review-Url: https://codereview.chromium.org/2588293004
Cr-Commit-Position: refs/heads/master@{#440374}

[modify] https://crrev.com/6c6634508a1438f66057dc414af8171be9602e7c/third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp
[modify] https://crrev.com/6c6634508a1438f66057dc414af8171be9602e7c/third_party/WebKit/Source/core/css/parser/CSSParserFastPathsTest.cpp

Sign in to add a comment