New issue
Advanced search Search tips

Issue 798947 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug



Sign in to add a comment

Null-dereference READ in blink::StyleRule::Properties

Project Member Reported by ClusterFuzz, Jan 4 2018

Issue description

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

Fuzzer: inferno_twister
Job Type: linux_ubsan_vptr_content_shell_drt
Platform Id: linux

Crash Type: Null-dereference READ
Crash Address: 0x000000000010
Crash State:
  blink::StyleRule::Properties
  blink::DeclaredStylePropertyMap::ForEachProperty
  blink::StylePropertyMapReadOnly::getProperties
  
Sanitizer: undefined (UBSAN)

Regressed: https://clusterfuzz.com/revisions?job=linux_ubsan_vptr_content_shell_drt&range=526884:526887

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

Additional requirements: Requires HTTP

Issue filed automatically.

See https://github.com/google/clusterfuzz-tools for more information.
 
Project Member

Comment 1 by ClusterFuzz, Jan 4 2018

Components: Blink>CSS
Labels: Test-Predator-Auto-Components
Automatically applying components based on crash stacktrace and information from OWNERS files.

If this is incorrect, please apply the Test-Predator-Wrong-Components label.
Project Member

Comment 2 by ClusterFuzz, Jan 4 2018

Labels: Test-Predator-Auto-Owner
Owner: shend@chromium.org
Status: Assigned (was: Untriaged)
Automatically assigning owner based on suspected regression changelist https://chromium.googlesource.com/chromium/src/+/efd690f517a0758bd37bb701c3ab84656922fd39 ([css-typed-om] Implement declared style property map.).

If this is incorrect, please remove the owner and apply the Test-Predator-Wrong-CLs label.
Project Member

Comment 3 by bugdroid1@chromium.org, Jan 5 2018

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

commit 157467e9d61575ae6c98d1685835e02a888b3265
Author: Darren Shen <shend@chromium.org>
Date: Fri Jan 05 00:35:06 2018

[css-typed-om] Fix null dereference in StylePropertyMap.getProperties()

We can get a declared style property map from a css rule. When the rule
is deleted, the style property map will have a null rule (since it's
stored as a WeakMember not a Member). Hence, we have to check if the
rule is not null every time we call a method on the style map.

We forgot to check in getProperties() which caused a crash.

Bug:  798947 
Change-Id: I1526241d0c291612aa466c21972cd6efd1da0a32
Reviewed-on: https://chromium-review.googlesource.com/851292
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: nainar <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527164}
[add] https://crrev.com/157467e9d61575ae6c98d1685835e02a888b3265/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/declared/delete-rule-crash.html
[modify] https://crrev.com/157467e9d61575ae6c98d1685835e02a888b3265/third_party/WebKit/Source/core/css/cssom/DeclaredStylePropertyMap.cpp

Project Member

Comment 4 by ClusterFuzz, Jan 5 2018

ClusterFuzz has detected this issue as fixed in range 527163:527170.

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

Fuzzer: inferno_twister
Job Type: linux_ubsan_vptr_content_shell_drt
Platform Id: linux

Crash Type: Null-dereference READ
Crash Address: 0x000000000010
Crash State:
  blink::StyleRule::Properties
  blink::DeclaredStylePropertyMap::ForEachProperty
  blink::StylePropertyMapReadOnly::getProperties
  
Sanitizer: undefined (UBSAN)

Regressed: https://clusterfuzz.com/revisions?job=linux_ubsan_vptr_content_shell_drt&range=526884:526887
Fixed: https://clusterfuzz.com/revisions?job=linux_ubsan_vptr_content_shell_drt&range=527163:527170

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

Additional requirements: Requires HTTP

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 5 by ClusterFuzz, Jan 5 2018

Labels: ClusterFuzz-Verified
Status: Verified (was: Assigned)
ClusterFuzz testcase 4967999374360576 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