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

Issue 749475 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 1
Type: Bug



Sign in to add a comment

CHECK failure: IsJavascriptAllowed(). Cannot CallJavascriptFunction before explicitly allowing

Project Member Reported by ClusterFuzz, Jul 27 2017

Issue description

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

Fuzzer: ipc_fuzzer_gen
Job Type: windows_asan_chrome_ipc
Platform Id: windows

Crash Type: CHECK failure
Crash Address: 
Crash State:
  IsJavascriptAllowed(). Cannot CallJavascriptFunction before explicitly allowing 
  content::WebUIMessageHandler::CallJavascriptFunction<base::Value,base::Value,bas
  content::WebUIMessageHandler::FireWebUIListener<base::Value,base::Value,base::Va
  
Sanitizer: address (ASAN)

Regressed: https://clusterfuzz.com/revisions?job=windows_asan_chrome_ipc&range=488146:488166

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


Issue filed automatically.

See https://github.com/google/clusterfuzz-tools for more information.
 
Cc: msrchandra@chromium.org
Labels: M-62 Test-Predator-Wrong
Owner: tommycli@chromium.org
Status: Assigned (was: Untriaged)
Predator and CL did not provide any possible suspects.
Using Code Search for the file, "web_ui_message_handler.h" assigning to the concern owner.

Suspecting Commit#
https://chromium.googlesource.com/chromium/src/+/b0e0efcaf8951d0186ea75c1258c89d9bcb86822

@tommycli -- Could you please look into the issue, kindly re-assign if this is not related to your changes.
Thank You.
Owner: rbpotter@chromium.org
Test case is in print preview handler. Maybe rbpotter knows something about this.
Components: Internals>Printing UI>Browser>PrintPreview
This is due to some changes I made which changed PrintPreviewHandler to use FireWebUIListener/ResolveJavascriptCallback instead of CallJavascriptFunctionUnsafe. Just looked at a similar case in  https://crbug.com/747061  (the CHECK that broke there was preventing the IsJavascriptAllowed() CHECK from being reached). Apparently need to expand on the fix for that to kill the renderer any time we receive a message we are not expecting in Print Preview Handler.
Project Member

Comment 4 by bugdroid1@chromium.org, Aug 11 2017

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

commit eb46aa931c70f5e0062149375b0f6cbb71fcffa3
Author: rbpotter <rbpotter@chromium.org>
Date: Fri Aug 11 22:32:54 2017

Print Preview: Check for bad conditions before firing WebUI event

Many print preview WebUI events and Javascript callback resolutions/
rejections are triggered by IPC messages from the renderer. In these
cases, add checks that javascript is allowed and that the preview is
in the expected state prior to calling Javascript. Kill the renderer
if the check fails.

Bug:  749475 
Change-Id: I963c1f08d0cc8f8efd6a12edcea1e46815679bc9
Reviewed-on: https://chromium-review.googlesource.com/606891
Reviewed-by: Demetrios Papadopoulos (OOO till Sept 11th) <dpapad@chromium.org>
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#493870}
[modify] https://crrev.com/eb46aa931c70f5e0062149375b0f6cbb71fcffa3/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
[modify] https://crrev.com/eb46aa931c70f5e0062149375b0f6cbb71fcffa3/chrome/browser/ui/webui/print_preview/print_preview_handler.h

Project Member

Comment 5 by ClusterFuzz, Aug 12 2017

ClusterFuzz has detected this issue as fixed in range 493864:493893.

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

Fuzzer: ipc_fuzzer_gen
Job Type: windows_asan_chrome_ipc
Platform Id: windows

Crash Type: CHECK failure
Crash Address: 
Crash State:
  IsJavascriptAllowed(). Cannot CallJavascriptFunction before explicitly allowing 
  content::WebUIMessageHandler::CallJavascriptFunction<base::Value,base::Value,bas
  content::WebUIMessageHandler::FireWebUIListener<base::Value,base::Value,base::Va
  
Sanitizer: address (ASAN)

Regressed: https://clusterfuzz.com/revisions?job=windows_asan_chrome_ipc&range=488146:488166
Fixed: https://clusterfuzz.com/revisions?job=windows_asan_chrome_ipc&range=493864:493893

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

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 6 by ClusterFuzz, Aug 12 2017

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