New issue
Advanced search Search tips

Issue 798598 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 1
Type: Bug



Sign in to add a comment

Null-dereference READ in content::BlinkTestController::OnDumpFrameLayoutResponse

Project Member Reported by ClusterFuzz, Jan 2 2018

Issue description

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

Fuzzer: ochang_domfuzzer
Job Type: windows_asan_content_shell
Platform Id: windows

Crash Type: Null-dereference READ
Crash Address: 0x000000000000
Crash State:
  content::BlinkTestController::OnDumpFrameLayoutResponse
  content::mojom::LayoutTestControl_DumpFrameLayout_ForwardToCallback::Accept
  mojo::InterfaceEndpointClient::HandleValidatedMessage
  
Sanitizer: address (ASAN)

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

Issue filed automatically.

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

Comment 1 by ClusterFuzz, Jan 2 2018

Labels: OS-Mac
Cc: kkaluri@chromium.org
Components: Infra>Client>Mojo
Labels: M-64 Test-Predator-Wrong
Owner: lukasza@chromium.org
Status: Assigned (was: Untriaged)
With reference to the following   Issue 765581  , assigning it to lukasza@

lukasza@ Could you please look into it
Project Member

Comment 3 by ClusterFuzz, Jan 4 2018

Labels: OS-Linux
Project Member

Comment 4 by ClusterFuzz, Jan 19 2018

Components: Internals>Mojo Test
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.
Status: Started (was: Assigned)
I think I understand what is going on.

A layout test like below

    <script>
    testRunner.dumpAsText();
    testRunner.dumpChildFramesAsText();
    window.close();
    </script>

will hit the following callstack:

    #1 content::WebContentsObserver::Observe(nullptr) content/public/browser/web_contents_observer.cc:47:35
    #2 content::BlinkTestController::DiscardMainWindow() content/shell/browser/layout_test/blink_test_controller.cc:705:24
    #3 content::BlinkTestController::WebContentsDestroyed() content/shell/browser/layout_test/blink_test_controller.cc:628:3
    #4 content::WebContentsImpl::~WebContentsImpl() content/browser/web_contents/web_contents_impl.cc:675:14

which means that subsequent calls to WebContentsObserver::web_contents() will return nullptr.  This includes the call found by ClusterFuzz in content::BlinkTestController::OnDumpFrameLayoutResponse.

WIP CL with a fix: https://chromium-review.googlesource.com/c/chromium/src/+/879090
Status: Fixed (was: Started)
Project Member

Comment 8 by ClusterFuzz, Jan 25 2018

ClusterFuzz has detected this issue as fixed in range 531577:531603.

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

Fuzzer: ochang_domfuzzer
Job Type: windows_asan_content_shell
Platform Id: windows

Crash Type: Null-dereference READ
Crash Address: 0x000000000000
Crash State:
  content::BlinkTestController::OnDumpFrameLayoutResponse
  content::mojom::LayoutTestControl_DumpFrameLayout_ForwardToCallback::Accept
  mojo::InterfaceEndpointClient::HandleValidatedMessage
  
Sanitizer: address (ASAN)

Fixed: https://clusterfuzz.com/revisions?job=windows_asan_content_shell&range=531577:531603

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

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, Jan 25 2018

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