New issue
Advanced search Search tips

Issue 877470 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Aug 27
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug-Security



Sign in to add a comment

SVG element can cause bad-cast to LayoutTableCell

Project Member Reported by ClusterFuzz, Aug 24

Issue description

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

Fuzzer: inferno_twister_c
Job Type: linux_ubsan_vptr_content_shell_drt
Platform Id: linux

Crash Type: Bad-cast
Crash Address: 0x3fbf79430000
Crash State:
  Bad-cast to const blink::LayoutTableCell from blink::LayoutSVGRect
  blink::ElementInnerTextCollector::ProcessNode
  blink::ElementInnerTextCollector::ProcessNode
  
Sanitizer: undefined (UBSAN)

Recommended Security Severity: High

Regressed: https://clusterfuzz.com/revisions?job=linux_ubsan_vptr_content_shell_drt&range=585755:585756

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

Issue filed automatically.

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

Comment 1 by ClusterFuzz, Aug 24

Components: Blink>Editing
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, Aug 24

Labels: Test-Predator-Auto-Owner
Owner: yosin@chromium.org
Status: Assigned (was: Untriaged)
Automatically assigning owner based on suspected regression changelist https://chromium.googlesource.com/chromium/src/+/72d438ee5563db3087ea1f6630834343bdb8fb65 (Implement Element#innerText to conform the spec).

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.
Project Member

Comment 3 by sheriffbot@chromium.org, Aug 24

Labels: Target-70 M-70
Project Member

Comment 4 by sheriffbot@chromium.org, Aug 24

Labels: ReleaseBlock-Stable
This is a serious security regression. If you are not able to fix this quickly, please revert the change that introduced it.

If this doesn't affect a release branch, or has not been properly classified for severity, please update the Security_Impact or Security_Severity labels, and remove the ReleaseBlock label. To disable this altogether, apply ReleaseBlock-NA.

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

Comment 5 by sheriffbot@chromium.org, Aug 24

Labels: Pri-1
Components: -Blink>Editing Blink>Editing>Selection
Status: Started (was: Assigned)
Summary: SVG element can cause bad-cast to LayoutTableCell (was: Bad-cast to const blink::LayoutTableCell from blink::LayoutSVGRect in blink::ElementInnerTextCollector::ProcessNode)
In review: http://crrev.com/c/1189262

e.g.
<svg><rect style="display:table-cell"></rect></svg>
Project Member

Comment 7 by bugdroid1@chromium.org, Aug 27

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

commit 65f45f33e67c11337337bb511e62a939ac8f2b7e
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Mon Aug 27 11:00:16 2018

Make ElementInnerTextCollector::ProcessNode() to check LayoutTabelCell

This patch changes  |ElementInnerTextCollector::ProcessNode()| to check object
type before casting to |LayoutTableCell|.

The issue is caused by |LayoutSVGRect|'s computed style of "display" property
is "table-cell".

This patch is follow-up of the patch[1] to fix the bug found by Cluster Fuzz.

[1] http://crrev.com/c/1114673 Implement Element#innerText to conform the spec

Bug:  877470 
Change-Id: I8bf833c66770f1f0dbace7c45bc22f6a5c0cfa26
Reviewed-on: https://chromium-review.googlesource.com/1189262
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Yoichi Osato <yoichio@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586229}
[modify] https://crrev.com/65f45f33e67c11337337bb511e62a939ac8f2b7e/third_party/blink/renderer/core/editing/element_inner_text.cc
[modify] https://crrev.com/65f45f33e67c11337337bb511e62a939ac8f2b7e/third_party/blink/renderer/core/editing/element_inner_text_test.cc

Status: Fixed (was: Started)
Project Member

Comment 9 by sheriffbot@chromium.org, Aug 27

Labels: -Restrict-View-SecurityTeam Restrict-View-SecurityNotify
Project Member

Comment 10 by ClusterFuzz, Aug 28

ClusterFuzz has detected this issue as fixed in range 586228:586229.

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

Fuzzer: inferno_twister_c
Job Type: linux_ubsan_vptr_content_shell_drt
Platform Id: linux

Crash Type: Bad-cast
Crash Address: 0x3fbf79430000
Crash State:
  Bad-cast to const blink::LayoutTableCell from blink::LayoutSVGRect
  blink::ElementInnerTextCollector::ProcessNode
  blink::ElementInnerTextCollector::ProcessNode
  
Sanitizer: undefined (UBSAN)

Recommended Security Severity: High

Regressed: https://clusterfuzz.com/revisions?job=linux_ubsan_vptr_content_shell_drt&range=585755:585756
Fixed: https://clusterfuzz.com/revisions?job=linux_ubsan_vptr_content_shell_drt&range=586228:586229

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

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 11 by ClusterFuzz, Aug 28

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

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

Comment 13 by sheriffbot@chromium.org, Dec 3

Labels: -Restrict-View-SecurityNotify allpublic
This bug has been closed for more than 14 weeks. Removing security view restrictions.

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

Sign in to add a comment