New issue
Advanced search Search tips

Issue 908253 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Null-dereference READ in blink::FirstLetterPseudoElement::AttachFirstLetterTextLayoutObjects

Project Member Reported by ClusterFuzz, Nov 25

Issue description

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

Fuzzer: bj_broddelwerk
Job Type: linux_cfi_chrome
Platform Id: linux

Crash Type: Null-dereference READ
Crash Address: 0x000000000000
Crash State:
  blink::FirstLetterPseudoElement::AttachFirstLetterTextLayoutObjects
  blink::Element::RebuildLayoutTree
  blink::Element::RebuildFirstLetterLayoutTree
  
Sanitizer: cfi (CFI)

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

Issue filed automatically.

See https://github.com/google/clusterfuzz-tools for more information.
 
Cc: pnangunoori@chromium.org
Labels: M-72 Test-Predator-Wrong
Owner: futhark@chromium.org
Status: Assigned (was: Untriaged)
Predator and CL could not provide any possible suspects.
Using the code search for the file, “first_letter_pseudo_element.cc” assigning to owner concerned from GIT blame.
Suspecting Commit#
https://chromium.googlesource.com/chromium/src/+/62649b86ee5c9165c05e06f121b61eee33c45e16

@futhark -- Could you please look into this issue, kindly reassign if it has nothing to do with your changes.
Thank You.

Components: Blink>CSS
Status: Started (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, Dec 3

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

commit 81f9e4d6fccf5c3dcda499a367cc5894ef386e88
Author: Rune Lillesveen <futhark@chromium.org>
Date: Mon Dec 03 14:09:42 2018

Check that first-letter text is not null before attaching.

Under certain combinations of whitespace-reattachment after removing
nodes, parent element being display:contents triggering anonymous
inline boxes for such parents, and ::first-letter being marked for re-
attachment, we can end up with a calculated first-letter text node
changing from non-null to null between style recalc and layout tree
rebuild. Make sure we check that the first-letter text node is still
non-null early in UpdateFirstLetterPseudoElement during the
kRebuildLayoutTree so that we nuke the first-letter pseudo instead of
re-attaching without first-letter text.

Bug:  908253 
Change-Id: Ifaac75b34edce21467581b5a9e78f5287a842fe5
Reviewed-on: https://chromium-review.googlesource.com/c/1356714
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613076}
[modify] https://crrev.com/81f9e4d6fccf5c3dcda499a367cc5894ef386e88/third_party/blink/renderer/core/dom/element.cc

Status: Fixed (was: Started)
Project Member

Comment 5 by ClusterFuzz, Dec 4

ClusterFuzz has detected this issue as fixed in range 613071:613078.

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

Fuzzer: bj_broddelwerk
Job Type: linux_cfi_chrome
Platform Id: linux

Crash Type: Null-dereference READ
Crash Address: 0x000000000000
Crash State:
  blink::FirstLetterPseudoElement::AttachFirstLetterTextLayoutObjects
  blink::Element::RebuildLayoutTree
  blink::Element::RebuildFirstLetterLayoutTree
  
Sanitizer: cfi (CFI)

Fixed: https://clusterfuzz.com/revisions?job=linux_cfi_chrome&range=613071:613078

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

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, Dec 4

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