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

Issue 628865 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Not working on Chrome any more
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Integer-overflow in blink::CSSSelectorParser::consumeANPlusB

Project Member Reported by ClusterFuzz, Jul 16 2016

Issue description

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

Fuzzer: inferno_twister
Job Type: linux_ubsan_chrome
Platform Id: linux

Crash Type: Integer-overflow
Crash Address: 
Crash State:
  blink::CSSSelectorParser::consumeANPlusB
  blink::CSSSelectorParser::consumePseudo
  blink::CSSSelectorParser::consumeSimpleSelector
  
Regressed: https://cluster-fuzz.appspot.com/revisions?job=linux_ubsan_chrome&range=370022:370027

Minimized Testcase (0.06 Kb):
Download: https://cluster-fuzz.appspot.com/download/AMIfv97o7zEOcQ6x50zmj2vS_-lW1kG8xTXlJ2oeZeLqHNwYuXnjSWqMFYGn7lCJpdTAYju3zbjkcm0NeCxBYMQDycfgOrL16cyhqaglVv98-Q1_DJA0huHv86DKXPORYTWF-CB5Qd3Fi-5zKqF_PtYVIzRC4V5ZfQ?testcase_id=5687064784011264
<style>
.c17:nth-child( N- 3091970736) { border-top-width: 3;


Filer: thestig

See https://dev.chromium.org/Home/chromium-security/bugs/reproducing-clusterfuzz-bugs for more information.
 
Cc: timloh@chromium.org esprehn@chromium.org alancutter@chromium.org
Components: Blink>CSS
Cc: -timloh@chromium.org
Labels: findit-for-crash M-52
Owner: timloh@chromium.org
Status: Assigned (was: Available)
Suspected CLs	No CL in the regression range changes the crashed files. The result is the blame information.

Author: timloh@chromium.org
Project: chromium
Changelist: https://chromium.googlesource.com/chromium/src//+/028e8f6c204380d650c96cb4780847c9bcd41d77
Time: Tue Jan 13 04:39:53 2015
The CL last changed line 715 of file CSSSelectorParser.cpp, which is stack frame 0.

Author: esprehn@chromium.org
Project: chromium
Changelist: https://chromium.googlesource.com/chromium/src//+/e356f4be77e9854a5f03a538c552df76d2e75234
Time: Sat May 23 03:14:54 2015
The CL last changed line 557 of file CSSSelectorParser.cpp, which is stack frame 1.

Author: timloh@chromium.org
Project: chromium
Changelist: https://chromium.googlesource.com/chromium/src//+/c0cb3af24f1ab1e2fae241959d78bcd89a240182
Time: Mon Jan 12 23:19:45 2015
The CL last changed line 350 of file CSSSelectorParser.cpp, which is stack frame 2.

Author: Yuta Kitamura
Project: chromium
Changelist: https://chromium.googlesource.com/chromium/src//+/540e575dc43e718821bc4ac682735a9631e33c1f
Time: Mon Jun 20 11:01:49 2016
The CL last changed line 308 of file CSSSelectorParser.cpp, which is stack frame 3.

Author: Yuta Kitamura
Project: chromium
Changelist: https://chromium.googlesource.com/chromium/src//+/540e575dc43e718821bc4ac682735a9631e33c1f
Time: Mon Jun 20 11:01:49 2016
The CL last changed line 178 of file CSSSelectorParser.cpp, which is stack frame 4.

Author: Yuta Kitamura
Project: chromium
Changelist: https://chromium.googlesource.com/chromium/src//+/540e575dc43e718821bc4ac682735a9631e33c1f
Time: Mon Jun 20 11:01:49 2016
The CL last changed line 110 of file CSSSelectorParser.cpp, which is stack frame 5.

Author: kouhei
Project: chromium
Changelist: https://chromium.googlesource.com/chromium/src//+/489a856dea190679b1f72e9640f048732651338b
Time: Thu Dec 17 07:52:48 2015
The CL last changed line 93 of file CSSSelectorParser.cpp, which is stack frame 6.

Suspected Project: chromium
Suspected Component: Blink>CSS

Possible suspect : https://chromium.googlesource.com/chromium/src//+/028e8f6c204380d650c96cb4780847c9bcd41d77

Please reassign if this is not related to your change.
Cc: meade@chromium.org timloh@chromium.org
Owner: ----
Status: Available (was: Assigned)
Someone from the style team should triage this. It's not clear to me if fixing crazy big integers in CSS selectors is worth the performance cost.

Comment 4 by meade@chromium.org, Jul 20 2016

Not sure when we'd have cycles to do this, but added to our backlog.

Comment 5 by shans@chromium.org, Jul 20 2016

Owner: dstockwell@chromium.org

Comment 6 by shans@chromium.org, Jul 20 2016

Status: Assigned (was: Available)
Owner: timloh@chromium.org

Comment 8 by timloh@chromium.org, Jul 20 2016

Cc: infe...@chromium.org
Labels: -Stability-Crash
This behaviour should be safe (excl the usual c++ caveats about UB), so I don't think it's worth fixing. I wouldn't be surprised if there were plenty of other places where negate ints from user input. inferno@, is there any good reason to fix this?

Comment 9 by timloh@chromium.org, Jul 21 2016

Cc: mummare...@chromium.org
 Issue 629944  has been merged into this issue.
Labels: -ClusterFuzz -findit-for-crash Clusterfuzz Findit-for-crash
Owner: meade@chromium.org
Status: Started (was: Assigned)
Labels: Pri-2
Project Member

Comment 12 by sheriffbot@chromium.org, Nov 22 2016

Labels: -Restrict-View-EditIssue
Removing EditIssue view restrictions from ClusterFuzz filed bugs. If you believe that this issue should still be restricted, please reapply the label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 13 by meade@chromium.org, Dec 20 2016

 Issue 675065  has been merged into this issue.
Project Member

Comment 14 by ClusterFuzz, Dec 22 2016

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

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

Comment 15 by ClusterFuzz, May 12 2017

ClusterFuzz has detected this issue as fixed in range 470772:470990.

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

Fuzzer: inferno_twister
Job Type: linux_ubsan_chrome
Platform Id: linux

Crash Type: Integer-overflow
Crash Address: 
Crash State:
  blink::CSSSelectorParser::consumeANPlusB
  blink::CSSSelectorParser::consumePseudo
  blink::CSSSelectorParser::consumeSimpleSelector
  
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=470772:470990

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


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