New issue
Advanced search Search tips

Issue 905850 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Null-dereference READ in blink::LayoutImage::PaintReplaced

Project Member Reported by ClusterFuzz, Nov 15

Issue description

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

Fuzzer: miaubiz_svg_fuzzer
Job Type: linux_asan_chrome_mp
Platform Id: linux

Crash Type: Null-dereference READ
Crash Address: 0x000000000068
Crash State:
  blink::LayoutImage::PaintReplaced
  blink::ReplacedPainter::Paint
  blink::LayoutReplaced::Paint
  
Sanitizer: address (ASAN)

Regressed: https://clusterfuzz.com/revisions?job=linux_asan_chrome_mp&range=593937:593942

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

Issue filed automatically.

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

Comment 1 by ClusterFuzz, Nov 15

Components: Blink>Layout Blink>Paint
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, Nov 15

Labels: Test-Predator-Auto-Owner
Owner: f...@opera.com
Status: Assigned (was: Untriaged)
Automatically assigning owner based on suspected regression changelist https://chromium.googlesource.com/chromium/src/+/eb0658d9cf1cc9d387ebd1e9c965c7557e26e62d (Remove visual rect check from SVGMaskPainter::PrepareEffect).

If this is incorrect, please let us know why and apply the Test-Predator-Wrong-CLs label. If you aren't the correct owner for this issue, please unassign yourself as soon as possible so it can be re-triaged.
Components: -Blink>Layout
Owner: npm@chromium.org
I think my CL merely exposed this (by allowing empty visual rects). Here's an example where the crash still happens but with a non-empty visual rect:

<!DOCTYPE html>
<svg mask="url(#mask)">
  <mask id="mask">
    <foreignObject width="100" height="100">
      <input type="image"></input>
    </foreignObject>
  </mask>
  <rect width="100" height="100" fill="green"/>
</svg>

It looks like the dereference was added by 150777e35b60955ba32a7848f97934efc71dbef2.
Project Member

Comment 4 by bugdroid1@chromium.org, Jan 16

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

commit bb60dd623d7152c93dd355de8ba969540d203528
Author: Nicolas Pena <npm@chromium.org>
Date: Wed Jan 16 02:49:01 2019

[ElementTiming] Pass the paint container in SVGObjectPainter

This CL adds additional information in the PaintInfo object in
SVGObjectPainter::PaintResourceSubtree. In the testcase of the bug, we
have svg->mask->foreignObject->image which causes the ImagePainter
method to be called without a paint container.

Bug:  905850 
Change-Id: Id6acad9ea24c4af2f9baf78b3591a878e523035f
Reviewed-on: https://chromium-review.googlesource.com/c/1410176
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623066}
[modify] https://crrev.com/bb60dd623d7152c93dd355de8ba969540d203528/third_party/blink/renderer/core/BUILD.gn
[modify] https://crrev.com/bb60dd623d7152c93dd355de8ba969540d203528/third_party/blink/renderer/core/paint/image_element_timing.h
[add] https://crrev.com/bb60dd623d7152c93dd355de8ba969540d203528/third_party/blink/renderer/core/paint/image_element_timing_test.cc
[modify] https://crrev.com/bb60dd623d7152c93dd355de8ba969540d203528/third_party/blink/renderer/core/paint/svg_object_painter.cc

Project Member

Comment 5 by ClusterFuzz, Jan 16 (6 days ago)

ClusterFuzz has detected this issue as fixed in range 623065:623067.

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

Fuzzer: miaubiz_svg_fuzzer
Job Type: linux_asan_chrome_mp
Platform Id: linux

Crash Type: Null-dereference READ
Crash Address: 0x000000000068
Crash State:
  blink::LayoutImage::PaintReplaced
  blink::ReplacedPainter::Paint
  blink::LayoutReplaced::Paint
  
Sanitizer: address (ASAN)

Regressed: https://clusterfuzz.com/revisions?job=linux_asan_chrome_mp&range=593937:593942
Fixed: https://clusterfuzz.com/revisions?job=linux_asan_chrome_mp&range=623065:623067

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

See https://github.com/google/clusterfuzz-tools for instructions to reproduce this bug locally.

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, Jan 16 (6 days ago)

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