Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1109)

Issue 2151323003: Add a check for mismatching URL and origin in the renderer process. (Closed)

Created:
4 years, 5 months ago by nasko
Modified:
4 years, 5 months ago
Reviewers:
Charlie Reis
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, jam, creis+watch_chromium.org, darin-cc_chromium.org, site-isolation-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add a check for mismatching URL and origin in the renderer process. The renderer process kills with reason RFH_INVALID_ORIGIN_ON_COMMIT are checking parameters passed from the renderer process. However, we are lacking a bunch of information since it is in the browser process and it is hard to reason about what the state was in the renderer. We can also try to implement similar checking in the renderer process, so we can catch these mismatches closer to where we have more data. This CL implements some of the checks performed browser side, but it is a set that should catch the majority of the cases we have seen in crash reports. BUG=628677 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/0be4d34d5c65243b03d4fc6469a78b32eb1403c0 Cr-Commit-Position: refs/heads/master@{#406145}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Remove TODO to remove :) #

Patch Set 3 : Add checks for unique origin and --disable-web-security #

Patch Set 4 : Format. #

Total comments: 2

Patch Set 5 : Add allow_universal_access_from_file_urls check. #

Patch Set 6 : Add a test to exercise allow_universal_access_from_file_urls #

Total comments: 2

Patch Set 7 : Add liveness check. #

Patch Set 8 : Disable the test on Mac, until more debugging can be done. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -0 lines) Patch
M content/browser/frame_host/render_frame_host_manager_browsertest.cc View 1 2 3 4 5 6 7 2 chunks +33 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 1 chunk +14 lines, -0 lines 0 comments Download

Messages

Total messages: 37 (23 generated)
Charlie Reis
https://codereview.chromium.org/2151323003/diff/1/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/2151323003/diff/1/content/renderer/render_frame_impl.cc#newcode4777 content/renderer/render_frame_impl.cc:4777: // https://crbug.com/628677 is understood. Why not leave it in? ...
4 years, 5 months ago (2016-07-15 17:49:18 UTC) #2
nasko
https://codereview.chromium.org/2151323003/diff/1/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/2151323003/diff/1/content/renderer/render_frame_impl.cc#newcode4777 content/renderer/render_frame_impl.cc:4777: // https://crbug.com/628677 is understood. On 2016/07/15 17:49:18, Charlie Reis ...
4 years, 5 months ago (2016-07-15 17:51:18 UTC) #3
nasko
Hey Charlie, Can you review the CL at this time? It is properly formatted and ...
4 years, 5 months ago (2016-07-15 20:22:39 UTC) #9
Charlie Reis
https://codereview.chromium.org/2151323003/diff/60001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/2151323003/diff/60001/content/renderer/render_frame_impl.cc#newcode4777 content/renderer/render_frame_impl.cc:4777: render_view_->GetWebkitPreferences().web_security_enabled) { Ah, good point. We'll need to skip ...
4 years, 5 months ago (2016-07-15 20:33:17 UTC) #10
nasko
https://codereview.chromium.org/2151323003/diff/60001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/2151323003/diff/60001/content/renderer/render_frame_impl.cc#newcode4777 content/renderer/render_frame_impl.cc:4777: render_view_->GetWebkitPreferences().web_security_enabled) { On 2016/07/15 20:33:17, Charlie Reis wrote: > ...
4 years, 5 months ago (2016-07-15 20:56:31 UTC) #11
Charlie Reis
LGTM, though I might recommend adding the test for universal file access in this CL. ...
4 years, 5 months ago (2016-07-15 21:01:17 UTC) #14
Charlie Reis
Awesome, thanks for the test! LGTM. https://codereview.chromium.org/2151323003/diff/100001/content/browser/frame_host/render_frame_host_manager_browsertest.cc File content/browser/frame_host/render_frame_host_manager_browsertest.cc (right): https://codereview.chromium.org/2151323003/diff/100001/content/browser/frame_host/render_frame_host_manager_browsertest.cc#newcode2825 content/browser/frame_host/render_frame_host_manager_browsertest.cc:2825: EXPECT_EQ(2, web_contents->GetController().GetEntryCount()); Maybe ...
4 years, 5 months ago (2016-07-15 22:30:40 UTC) #20
nasko
https://codereview.chromium.org/2151323003/diff/100001/content/browser/frame_host/render_frame_host_manager_browsertest.cc File content/browser/frame_host/render_frame_host_manager_browsertest.cc (right): https://codereview.chromium.org/2151323003/diff/100001/content/browser/frame_host/render_frame_host_manager_browsertest.cc#newcode2825 content/browser/frame_host/render_frame_host_manager_browsertest.cc:2825: EXPECT_EQ(2, web_contents->GetController().GetEntryCount()); On 2016/07/15 22:30:40, Charlie Reis wrote: > ...
4 years, 5 months ago (2016-07-15 22:35:54 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2151323003/120001
4 years, 5 months ago (2016-07-15 22:36:02 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/261141)
4 years, 5 months ago (2016-07-15 23:20:00 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2151323003/140001
4 years, 5 months ago (2016-07-18 22:23:07 UTC) #33
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 5 months ago (2016-07-18 23:43:59 UTC) #34
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-18 23:44:02 UTC) #35
commit-bot: I haz the power
4 years, 5 months ago (2016-07-18 23:45:43 UTC) #37
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/0be4d34d5c65243b03d4fc6469a78b32eb1403c0
Cr-Commit-Position: refs/heads/master@{#406145}

Powered by Google App Engine
This is Rietveld 408576698