New issue
Advanced search Search tips

Issue 873088 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

InsertHorizontalRule command crashes with unusual HTML

Project Member Reported by ClusterFuzz, Aug 10

Issue description

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

Fuzzer: bj_broddelwerk
Job Type: linux_asan_content_shell_drt
Platform Id: linux

Crash Type: Null-dereference READ
Crash Address: 0x000000000010
Crash State:
  blink::PositionTemplate<blink::EditingAlgorithm<blink::NodeTraversal> >::LastPos
  blink::PositionTemplate<blink::EditingAlgorithm<blink::NodeTraversal> > blink::L
  blink::LastEditablePositionBeforePositionInRoot
  
Sanitizer: address (ASAN)

Regressed: https://clusterfuzz.com/revisions?job=linux_asan_content_shell_drt&range=575974:575975

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

Issue filed automatically.

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

Comment 1 by ClusterFuzz, Aug 10

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 10

Labels: Test-Predator-Auto-Owner
Owner: ctzsm@chromium.org
Status: Assigned (was: Untriaged)
Automatically assigning owner based on suspected regression changelist https://chromium.googlesource.com/chromium/src/+/7bd29404a6ab8d36bdff4123ae522fcd9068344b ([Blink] Avoid crossing editing boundaries selection.).

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: -Pri-1 Pri-3
Owner: ----
Status: Available (was: Assigned)
Summary: InsertHorizontalRule command crashes with unusual HTML (was: Null-dereference READ in blink::PositionTemplate<blink::EditingAlgorithm<blink::NodeTraversal> >::LastPos)
Lower to Pri-3 since real world usage of InsertHorizontalRule command is low and it is caused by unusual HTML.
The root cause is using IsEditablePosition() uses Position::ParentAnchoredEquivalent() then we get
IsEditablePosition(start) = true
but HighestEditableRoot(start) = null

Where |start| is inside <hr>.


Components: -Blink>Editing Blink>Editing>Command
Owner: yosin@chromium.org
Status: Started (was: Available)
In review: http://crrev.com/c/1172273
Project Member

Comment 6 by bugdroid1@chromium.org, Aug 16

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

commit 53a7d96350fda4ed08c3b675c309bfb67670e2b1
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Thu Aug 16 00:17:13 2018

Make IsEditablePosition() to use Position::ComputeContainerNode()

This patch changes |IsEditablePosition()| to use |Position::
ComputeContainerNode()| instead of |Position::ParentAnchoredEquivalent()| not to
incorporate |EditorIngoreContetns()|, e.g. <hr>, <img>, etc.

For "<hr contenteditable>", |IsEditablePosition(<hr>@0)| returns false before
this patch. After this patch, it returns true.

Bug:  873088 
Change-Id: Id75bd2c857dbd85e59f7795d02f3583802347060
Reviewed-on: https://chromium-review.googlesource.com/1172273
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583457}
[modify] https://crrev.com/53a7d96350fda4ed08c3b675c309bfb67670e2b1/third_party/blink/renderer/core/editing/editing_utilities.cc
[modify] https://crrev.com/53a7d96350fda4ed08c3b675c309bfb67670e2b1/third_party/blink/renderer/core/editing/editing_utilities_test.cc

Status: Fixed (was: Started)
Project Member

Comment 8 by ClusterFuzz, Aug 16

ClusterFuzz has detected this issue as fixed in range 583456:583457.

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

Fuzzer: bj_broddelwerk
Job Type: linux_asan_content_shell_drt
Platform Id: linux

Crash Type: Null-dereference READ
Crash Address: 0x000000000010
Crash State:
  blink::PositionTemplate<blink::EditingAlgorithm<blink::NodeTraversal> >::LastPos
  blink::PositionTemplate<blink::EditingAlgorithm<blink::NodeTraversal> > blink::L
  blink::LastEditablePositionBeforePositionInRoot
  
Sanitizer: address (ASAN)

Regressed: https://clusterfuzz.com/revisions?job=linux_asan_content_shell_drt&range=575974:575975
Fixed: https://clusterfuzz.com/revisions?job=linux_asan_content_shell_drt&range=583456:583457

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

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 9 by ClusterFuzz, Aug 16

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