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

Issue 12218064: Non-web-accessible extension URLs should not load in non-extension processes (Closed)

Created:
7 years, 10 months ago by nasko
Modified:
7 years, 10 months ago
CC:
chromium-reviews, Aaron Boodman, chromium-apps-reviews_chromium.org, Charlie Reis
Visibility:
Public.

Description

Non-web-accessible extension URLs should not load in non-extension processes Blocking of URL loads in the browser process cannot be as extensive as the one done in the renderer process, as we don't have the frame URL and page URL at resource load time. I've tried to do a similar check with the data available on the browser side. The main part which I'm not entirely happy about is the check for DevTools pages. Currently, if an extension has DevTools page, all of its resources can be loaded by a compromised renderer. I think this can be tightened up with a follow up CL, if we find a good way of distinguishing DevTools processes or permissioning those requests. BUG=173688 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=184245

Patch Set 1 : #

Patch Set 2 : Actual implementation of blocking. #

Total comments: 5

Patch Set 3 : Restoring CORS check. #

Patch Set 4 : Fix? a compile error #

Total comments: 15

Patch Set 5 : Changes based on Charlie's review #

Patch Set 6 : Fix for a failing unit test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+174 lines, -5 lines) Patch
A chrome/browser/chrome_security_exploit_browsertest.cc View 1 2 3 4 1 chunk +73 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_protocols.cc View 1 2 3 4 5 4 chunks +58 lines, -5 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/extensions/extension.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/renderer/extensions/resource_request_policy.cc View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
A chrome/test/data/chrome_extension_resource.html View 1 2 3 4 1 chunk +33 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
nasko
Hey Chris, Can you review this CL for me? It is not ideal, but I ...
7 years, 10 months ago (2013-02-20 19:28:36 UTC) #1
nasko
Hey Matt, Can you review this change? Thanks, Nasko
7 years, 10 months ago (2013-02-21 18:54:12 UTC) #2
Matt Perry
+creis who wrote ResourceRequestPolicy::CanRequestResource. https://codereview.chromium.org/12218064/diff/5001/chrome/browser/extensions/extension_protocols.cc File chrome/browser/extensions/extension_protocols.cc (left): https://codereview.chromium.org/12218064/diff/5001/chrome/browser/extensions/extension_protocols.cc#oldcode358 chrome/browser/extensions/extension_protocols.cc:358: extension)) && I don't understand ...
7 years, 10 months ago (2013-02-21 20:24:43 UTC) #3
nasko
https://codereview.chromium.org/12218064/diff/5001/chrome/browser/extensions/extension_protocols.cc File chrome/browser/extensions/extension_protocols.cc (left): https://codereview.chromium.org/12218064/diff/5001/chrome/browser/extensions/extension_protocols.cc#oldcode358 chrome/browser/extensions/extension_protocols.cc:358: extension)) && On 2013/02/21 20:24:43, Matt Perry wrote: > ...
7 years, 10 months ago (2013-02-21 21:41:06 UTC) #4
Charlie Reis
On 2013/02/21 20:24:43, Matt Perry wrote: > +creis who wrote ResourceRequestPolicy::CanRequestResource. I don't remember writing ...
7 years, 10 months ago (2013-02-21 21:44:25 UTC) #5
Matt Perry
On 2013/02/21 21:44:25, creis wrote: > On 2013/02/21 20:24:43, Matt Perry wrote: > > +creis ...
7 years, 10 months ago (2013-02-21 21:45:21 UTC) #6
Matt Perry
lgtm https://codereview.chromium.org/12218064/diff/5001/chrome/browser/extensions/extension_protocols.cc File chrome/browser/extensions/extension_protocols.cc (right): https://codereview.chromium.org/12218064/diff/5001/chrome/browser/extensions/extension_protocols.cc#newcode287 chrome/browser/extensions/extension_protocols.cc:287: // renderer process, performed by ResourceRequestPolicy::CanRequestResource. On 2013/02/21 ...
7 years, 10 months ago (2013-02-21 21:50:07 UTC) #7
nasko
Adding jochen@ for chrome/ OWNERs review.
7 years, 10 months ago (2013-02-21 22:20:03 UTC) #8
jochen (gone - plz use gerrit)
lgtm
7 years, 10 months ago (2013-02-21 22:26:13 UTC) #9
Charlie Reis
https://codereview.chromium.org/12218064/diff/17001/chrome/browser/chrome_security_exploit_browsertest.cc File chrome/browser/chrome_security_exploit_browsertest.cc (right): https://codereview.chromium.org/12218064/diff/17001/chrome/browser/chrome_security_exploit_browsertest.cc#newcode59 chrome/browser/chrome_security_exploit_browsertest.cc:59: GURL foo("http://foo.com/files/chrome_extension_resource.html"); Please mention that this page tries to ...
7 years, 10 months ago (2013-02-22 02:45:17 UTC) #10
nasko
Fixes for Charlie's comments. https://codereview.chromium.org/12218064/diff/17001/chrome/browser/chrome_security_exploit_browsertest.cc File chrome/browser/chrome_security_exploit_browsertest.cc (right): https://codereview.chromium.org/12218064/diff/17001/chrome/browser/chrome_security_exploit_browsertest.cc#newcode59 chrome/browser/chrome_security_exploit_browsertest.cc:59: GURL foo("http://foo.com/files/chrome_extension_resource.html"); On 2013/02/22 02:45:17, ...
7 years, 10 months ago (2013-02-22 17:14:35 UTC) #11
Charlie Reis
Great. I'll wait for the new patch based what you found in our offline chat ...
7 years, 10 months ago (2013-02-22 17:57:47 UTC) #12
Matt Perry
https://codereview.chromium.org/12218064/diff/17001/chrome/browser/extensions/extension_protocols.cc File chrome/browser/extensions/extension_protocols.cc (right): https://codereview.chromium.org/12218064/diff/17001/chrome/browser/extensions/extension_protocols.cc#newcode304 chrome/browser/extensions/extension_protocols.cc:304: // Should we succeed or fail here? On 2013/02/22 ...
7 years, 10 months ago (2013-02-22 18:56:40 UTC) #13
nasko
On 2013/02/22 18:56:40, Matt Perry wrote: > https://codereview.chromium.org/12218064/diff/17001/chrome/browser/extensions/extension_protocols.cc > File chrome/browser/extensions/extension_protocols.cc (right): > > https://codereview.chromium.org/12218064/diff/17001/chrome/browser/extensions/extension_protocols.cc#newcode304 ...
7 years, 10 months ago (2013-02-22 19:03:14 UTC) #14
Matt Perry
On 2013/02/22 19:03:14, nasko wrote: > On 2013/02/22 18:56:40, Matt Perry wrote: > > > ...
7 years, 10 months ago (2013-02-22 19:21:53 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nasko@chromium.org/12218064/11003
7 years, 10 months ago (2013-02-22 19:30:44 UTC) #16
commit-bot: I haz the power
7 years, 10 months ago (2013-02-23 01:20:26 UTC) #17
Message was sent while issue was closed.
Change committed as 184245

Powered by Google App Engine
This is Rietveld 408576698