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

Issue 877498 link

Starred by 3 users

Issue metadata

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



Sign in to add a comment

Bad-cast to blink::InlineTextBox from blink::InlineBox in blink::ToInlineTextBox

Project Member Reported by ClusterFuzz, Aug 24

Issue description

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

Fuzzer: inferno_twister
Job Type: linux_cfi_chrome
Platform Id: linux

Crash Type: Bad-cast
Crash Address: 0x55e48519b240
Crash State:
  Bad-cast to blink::InlineTextBox from blink::InlineBox
  blink::ToInlineTextBox
  blink::ElementInnerTextCollector::IsAfterWhiteSpace
  
Sanitizer: cfi (CFI)

Recommended Security Severity: High

Regressed: https://clusterfuzz.com/revisions?job=linux_cfi_chrome&range=585744:585770

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

Issue filed automatically.

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

Comment 1 by ClusterFuzz, Aug 24

Components: Blink>Editing Blink>Layout
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.
Labels: M-70
Components: -Blink>Layout -Blink>Editing Blink>Editing>Selection
Status: Started (was: Assigned)
We should use InlineBox::IsInlineTextBox() instead of InlineBox::IsText() before type casting.
In review: http://crrev.com/c/1189242
Project Member

Comment 6 by sheriffbot@chromium.org, Aug 25

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 7 by sheriffbot@chromium.org, Aug 25

Labels: Pri-1
Project Member

Comment 8 by ClusterFuzz, Aug 27

Labels: OS-Android
Project Member

Comment 9 by bugdroid1@chromium.org, Aug 27

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

commit c02e02c4352b0328dc2590afc0d9afa05cbe5012
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Mon Aug 27 09:51:56 2018

Make ElementInnerTextCollector::IsAfterWhiteSpace() to use IsInlineTextBox()

This patch changes  |ElementInnerTextCollector::IsAfterWhiteSpace()| to use
|IsInlineTextBox()| instead of |InlineBox::IsText()| to detect |InlineTextBox|
type properly.

Note: |InlineBox::IsText()| is used for handling <br> in quirk mode, and list
marker.

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:  877498 
Change-Id: I484a93afba351b74a8b3cae0c6736e3ccdfde45d
Reviewed-on: https://chromium-review.googlesource.com/1189242
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Yoichi Osato <yoichio@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586222}
[modify] https://crrev.com/c02e02c4352b0328dc2590afc0d9afa05cbe5012/third_party/blink/renderer/core/editing/BUILD.gn
[modify] https://crrev.com/c02e02c4352b0328dc2590afc0d9afa05cbe5012/third_party/blink/renderer/core/editing/element_inner_text.cc
[add] https://crrev.com/c02e02c4352b0328dc2590afc0d9afa05cbe5012/third_party/blink/renderer/core/editing/element_inner_text_test.cc

Status: Fixed (was: Started)
Project Member

Comment 11 by sheriffbot@chromium.org, Aug 27

Labels: -Restrict-View-SecurityTeam Restrict-View-SecurityNotify
Issue 877944 has been merged into this issue.
Cc: ligim...@chromium.org
Cc: abdulsyed@chromium.org
Labels: -ReleaseBlock-Stable ReleaseBlock-Dev Stability-Sheriff-Desktop OS-Mac OS-Windows
This is the #1 renderer crash in Windows and Mac, we need the fix to be merged to  3534 branch. Planning to have the dev RC from this branch.

+Sheriff, for merge since committer and reviewers are not in PST time zone.
Project Member

Comment 15 by bugdroid1@chromium.org, Aug 27

Labels: merge-merged-3534
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b45f0ee4c1a5aad340133a553220f66668460e9a

commit b45f0ee4c1a5aad340133a553220f66668460e9a
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Mon Aug 27 19:24:17 2018

Make ElementInnerTextCollector::IsAfterWhiteSpace() to use IsInlineTextBox()

This patch changes  |ElementInnerTextCollector::IsAfterWhiteSpace()| to use
|IsInlineTextBox()| instead of |InlineBox::IsText()| to detect |InlineTextBox|
type properly.

Note: |InlineBox::IsText()| is used for handling <br> in quirk mode, and list
marker.

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:  877498 
Change-Id: I484a93afba351b74a8b3cae0c6736e3ccdfde45d
Reviewed-on: https://chromium-review.googlesource.com/1189242
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Yoichi Osato <yoichio@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#586222}(cherry picked from commit c02e02c4352b0328dc2590afc0d9afa05cbe5012)
Reviewed-on: https://chromium-review.googlesource.com/1191406
Reviewed-by: Alex Mineer <amineer@chromium.org>
Cr-Commit-Position: refs/branch-heads/3534@{#3}
Cr-Branched-From: 5c1309f3276665c501e62f79a3bfb9244b3dca26-refs/heads/master@{#586175}
[modify] https://crrev.com/b45f0ee4c1a5aad340133a553220f66668460e9a/third_party/blink/renderer/core/editing/BUILD.gn
[modify] https://crrev.com/b45f0ee4c1a5aad340133a553220f66668460e9a/third_party/blink/renderer/core/editing/element_inner_text.cc
[add] https://crrev.com/b45f0ee4c1a5aad340133a553220f66668460e9a/third_party/blink/renderer/core/editing/element_inner_text_test.cc

I've merge the change in #9 to today's canary. Yosin@ can you confirm if this is the only fix thats needed?
>#c16, yes, it is the only patch to need to fix this bad-cast.
Issue 878197 has been merged into this issue.
Project Member

Comment 19 by ClusterFuzz, Aug 28

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

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

Comment 20 by ClusterFuzz, Aug 28

ClusterFuzz has detected this issue as fixed in range 586217:586222.

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

Fuzzer: inferno_twister
Job Type: linux_cfi_chrome
Platform Id: linux

Crash Type: Bad-cast
Crash Address: 0x55e48519b240
Crash State:
  Bad-cast to blink::InlineTextBox from blink::InlineBox
  blink::ToInlineTextBox
  blink::ElementInnerTextCollector::IsAfterWhiteSpace
  
Sanitizer: cfi (CFI)

Recommended Security Severity: High

Regressed: https://clusterfuzz.com/revisions?job=linux_cfi_chrome&range=585744:585770
Fixed: https://clusterfuzz.com/revisions?job=linux_cfi_chrome&range=586217:586222

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

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 21 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