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

Issue 2399853003: [M54 merge] Lock down creation of blob:chrome-extension URLs from non-extension processes. (Closed)

Created:
4 years, 2 months ago by Charlie Reis
Modified:
4 years, 2 months ago
Reviewers:
ncarter (slow)
CC:
chromium-reviews, extensions-reviews_chromium.org, jam, Randy Smith (Not in Mondays), blink-reviews, darin-cc_chromium.org, mmenke, devtools-reviews_chromium.org, loading-reviews_chromium.org, chromium-apps-reviews_chromium.org, pfeldman
Target Ref:
refs/pending/branch-heads/2840
Project:
chromium
Visibility:
Public.

Description

Merges six security fixes to M54, related to blobs. Merge patch created pair programming style with creis@ and nick@. Several manual fixups were required to get the tests passing on M54. BUG=644966, 646278, 652784 TEST=Manual testing included: - Verifying exploit steps w/ chrome w/ --isolate-extensions - content_browsertests and content_unittests - The following browser_tests subsets, both w/ and w/o --isolate-extensions: *ProcessManager* *Grants* *Exploit* *TouchFocuses* NOPRESUBMIT=true NOTRY=true TBR=nick@chromium.org The following six fixes are included in this diff: 1. https://codereview.chromium.org/2322673005: > Fix process transfers for blob urls of sites requiring dedicated processes > > RenderFrameHostManager::IsRendererTransferNeededForNavigation had a bug > where it passed an effective url, instead of an effective SITE url, to > a function that was expecting the latter. > > Add a test that exercises this case. Add a CHECK to content shell browser > client to verify that we're actually getting site urls all the time. > > Committed: https://crrev.com/db193a1b105de523fd0bb089c9769a71ed287d9e > Cr-Commit-Position: refs/heads/master@{#417752} 2. https://codereview.chromium.org/2331063002: > Fix IsolateIcelandFrameTreeBrowserTest.ProcessSwitchForIsolatedBlob so > that it's not flaky under --site-per-process. > > Committed: https://crrev.com/07fd7e19e0095aeb30bd2c99109d083bb67732cb > Cr-Commit-Position: refs/heads/master@{#417987} 3. https://codereview.chromium.org/2365433002: > (re-land) Disallow navigations to blob URLs with non-canonical origins. > > Re-landing this with a fix for xhr-to-blob-in-isolated-world.html > > Review-Url: https://codereview.chromium.org/2365433002 > Cr-Commit-Position: refs/heads/master@{#420436} 4. https://codereview.chromium.org/2332263002 [partial merge, just for the helper function it added, used by later CLs] > Updated suborigin serialization to latest spec proposal > > This modifiest the serialization format of suborigins so they are now > represented in the form https-so://suboriginname.host.name (or, > alternatively, with the scheme http-so). This change removes collisions > with potentially valid URLs that were being deserialized as suborigins. > > Additionally, this adds suborigins back as an experimental web platform > feature rather than a testing feature. > > Review-Url: https://codereview.chromium.org/2332263002 > Cr-Commit-Position: refs/heads/master@{#420828} > CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation 5. https://codereview.chromium.org/2364633004: > Update ChildProcessSecurityPolicy so that the chrome-extension:// scheme > is considered "web safe" to be requestable from any process, but only > "web safe" to commit in extension processes. > > In ChildProcessSecurityPolicy::CanRequestURL and CanCommitURL, when > seeing blob and filesystem urls, make a security decision based > on the inner origin rather than the scheme. > > When the extensions ProcessManager (via ExtensionWebContentsObserver) > notices a RenderFrame being created in an extension SiteInstance, > grant that process permission to commit chrome-extension:// URLs. > > In BlobDispatcherHost, only allow creation of blob URLs from processes > that would be able to commit them. > > Add a security exploit browsertest that verifies the above mechanisms > working together. > > Committed: https://crrev.com/a411fd062bc68fc2b5fc3aca7e4cbb8e4a3e074e > Committed: https://crrev.com/2a8ba8c4c186e5ea0a2ed938cc5d41441af64228 > Cr-Original-Commit-Position: refs/heads/master@{#421964} > Cr-Commit-Position: refs/heads/master@{#422474} 6. https://codereview.chromium.org/2396533003: > Allow <webview> to access URLs in the origin of the app embedding it. > > With r422474 creation of blob: URLs with origin of a chrome-extension:// > was locked down. However, the case of a <webview> loading an > accessible_resource from its embedder and creating a blob: is disallowed. > This CL adds permission for <webview> to create such URLs in the origin > of its embedder. > > This CL is based on work by nick@chromium.org. > > Committed: https://crrev.com/5edda59b0b1cb8fff058b47567ac32e58be5168a > Cr-Commit-Position: refs/heads/master@{#422976} CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Patch Set 1 #

Patch Set 2 : Additional merges and fixes #

Patch Set 3 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+840 lines, -84 lines) Patch
M chrome/browser/DEPS View 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/browser_process_impl.cc View 2 chunks +17 lines, -4 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chrome_security_exploit_browsertest.cc View 1 4 chunks +60 lines, -10 lines 0 comments Download
M chrome/browser/devtools/devtools_sanity_browsertest.cc View 1 chunk +72 lines, -0 lines 0 comments Download
M chrome/browser/devtools/devtools_ui_bindings.cc View 3 chunks +12 lines, -0 lines 0 comments Download
M chrome/browser/extensions/process_manager_browsertest.cc View 1 2 2 chunks +45 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/platform_apps/web_view/guest_focus_test/guest.js View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/bad_message.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/blob_storage/blob_dispatcher_host.cc View 1 chunk +12 lines, -1 line 0 comments Download
A content/browser/blob_storage/blob_url_browsertest.cc View 1 chunk +188 lines, -0 lines 0 comments Download
M content/browser/child_process_security_policy_impl.h View 4 chunks +13 lines, -13 lines 0 comments Download
M content/browser/child_process_security_policy_impl.cc View 9 chunks +116 lines, -13 lines 0 comments Download
M content/browser/child_process_security_policy_unittest.cc View 13 chunks +122 lines, -1 line 0 comments Download
M content/browser/frame_host/frame_tree_browsertest.cc View 1 5 chunks +76 lines, -9 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager.cc View 1 2 2 chunks +1 line, -3 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/site_instance_impl.h View 1 1 chunk +5 lines, -7 lines 0 comments Download
M content/browser/site_instance_impl.cc View 1 1 chunk +6 lines, -3 lines 0 comments Download
M content/content_tests.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M content/public/browser/child_process_security_policy.h View 2 chunks +37 lines, -2 lines 0 comments Download
M content/public/browser/content_browser_client.h View 1 1 chunk +6 lines, -6 lines 0 comments Download
M content/public/browser/content_browser_client.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/shell/browser/shell_content_browser_client.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/shell/browser/shell_content_browser_client.cc View 1 1 chunk +12 lines, -5 lines 0 comments Download
M extensions/browser/extension_web_contents_observer.cc View 1 chunk +9 lines, -0 lines 0 comments Download
M extensions/browser/guest_view/web_view/web_view_guest.cc View 1 chunk +11 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/xhr-to-blob-in-isolated-world.html View 1 chunk +5 lines, -2 lines 0 comments Download

Messages

Total messages: 15 (10 generated)
ncarter (slow)
merge lgtm (not a rubber stamp, actually reviewed it)
4 years, 2 months ago (2016-10-06 23:05:37 UTC) #5
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/2399853003/20001
4 years, 2 months ago (2016-10-06 23:08:28 UTC) #8
commit-bot: I haz the power
Failed to commit the patch.
4 years, 2 months ago (2016-10-06 23:13:25 UTC) #10
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/2399853003/40001
4 years, 2 months ago (2016-10-06 23:29:59 UTC) #14
commit-bot: I haz the power
4 years, 2 months ago (2016-10-06 23:34:15 UTC) #15
Message was sent while issue was closed.
Committed patchset #3 (id:40001)

Powered by Google App Engine
This is Rietveld 408576698