Crash in content::RenderFrameImpl::SendDidCommitProvisionalLoad |
||||
Issue descriptionDetailed report: https://clusterfuzz.com/testcase?key=5038230029467648 Fuzzer: inferno_layout_test_fuzzer Job Type: windows_asan_content_shell Platform Id: windows Crash Type: UNKNOWN READ Crash Address: 0x2d3fd080 Crash State: content::RenderFrameImpl::SendDidCommitProvisionalLoad content::RenderFrameImpl::DidCommitProvisionalLoad content::RenderFrameImpl::DidNavigateWithinPage Sanitizer: address (ASAN) Recommended Security Severity: Medium Reproducer Testcase: https://clusterfuzz.com/download?testcase_id=5038230029467648 Issue filed automatically. See https://dev.chromium.org/Home/chromium-security/bugs/reproducing-clusterfuzz-bugs for more information.
,
Aug 9 2017
This might also be occurring in WebView in an internally reported bug: b/34220171
,
Aug 26 2017
Nasko, this is crashing on your URL vs Origin CHECK: [1736:2308:0615/170940.119:4949937:FATAL:render_frame_impl.cc(4999)] Check failed: params.origin.IsSamePhysicalOriginWith(url::Origin(params.url)). url:http://127.0.0.1:8000/resources/redirect.php?url=http://localhost:8000/history/resources/back.html origin:file:// Here's the source link: https://chromium.googlesource.com/chromium/src/+/b555b8a9c2e7b5fb5615fc422c905d35e602b258/content/renderer/render_frame_impl.cc#4999 The test seems to be opening a file URL in a layout test context, which gives it allow_universal_access_from_files (and thus the ability to do a pushState from a file:// origin to a web origin). However, the test has these lines: testRunner.setAllowUniversalAccessFromFileURLs(false); history.pushState({}, "", "http://127.0.0.1:8000/resources/redirect.php?url=http://localhost:8000/history/resources/back.html"); That call to setAllowUniversalAccessFromFileURLs(false) seems to be the problem. Apparently it's not kicking in immediately. Maybe it's asynchronous and involves a trip to the browser process? Nasko's check assume it will take effect immediately, though, so it kills the renderer process. Maybe there's a way to make the two cases agree (e.g., make it take effect sooner, or make the check see the old value until the change takes effect)? Comment 2: Yes, that bug is crashing in the same place. I bet it's a loadDataWithBaseURL issue in Android Webview, with a slightly different cause than this layout test framework issue.
,
Aug 28 2017
One of the first things done by the Blink implementation of history.pushState is to check the URL via History::CanChangeToUrl which (among other things) consults document_origin->IsGrantedUniversalAccess() - this flag is stored inside blink::SecurityOrigin::universal_access_ boolean field.
It turns out that calling testRunner.setAllowUniversalAccessFromFileURLs(false) affects blink::SecurityOrigin::universal_access_ of *future* origins, but doesn't retroactively reset this flag in *already existing* origins. Granting of universal access to origins associated with a *new* document happens in Document::InitSecurityContext (below), but AFAICT there is no code that revokes universal access to already existing documents/origins.
void Document::InitSecurityContext(...) {
...
if (!settings->GetWebSecurityEnabled()) {
// Web security is turned off. We should let this document access every
// other document. This is used primary by testing harnesses for web
// sites.
GetSecurityOrigin()->GrantUniversalAccess();
} else if (GetSecurityOrigin()->IsLocal()) {
if (settings->GetAllowUniversalAccessFromFileURLs()) {
// Some clients want local URLs to have universal access, but that
// setting is dangerous for other clients.
GetSecurityOrigin()->GrantUniversalAccess();
} else if (!settings->GetAllowFileAccessFromFileURLs()) {
// Some clients do not want local URLs to have access to other local
// URLs.
GetSecurityOrigin()->BlockLocalAccessFromLocalOrigin();
}
}
So, given above, I think the observed behavior is expected - the fuzzer created a testcase that misuses test-only APIs (i.e. calling testRunner.setAllowUniversalAccessFromFileURLs without later loading a new document) and created a situation where 2 pieces of code (already-existing origin, global settings) disagree, leading to a security-related CHECK.
,
Aug 28 2017
Thanks, that helps clarify what I was observing! If this flag were used a lot in practice, it might be worth revoking the privilege from existing origins, but it doesn't seem worth the effort or complexity for just for test code (or other places where the mode is unlikely to change at runtime). I do wonder if this will be unexpected for test authors. Maybe it's worth documenting in test_runner.h that it only affects origins created after the call? Apart from that, I'd be ok with WontFixing this, since it doesn't seem like it would affect actual Chrome.
,
Dec 19 2017
ClusterFuzz testcase 5038230029467648 is flaky and no longer crashes, so closing issue. If this is incorrect, please add ClusterFuzz-Wrong label and re-open the issue. |
||||
►
Sign in to add a comment |
||||
Comment 1 by msrchandra@chromium.org
, Jun 20 2017Components: Internals>Core
Labels: M-61 Test-Predator-Correct-CLs
Owner: brettw@chromium.org
Status: Assigned (was: Untriaged)