Site Isolation: Prevent Cache manipulation via Cache API
Reported by
s.h.h.n....@gmail.com,
Dec 5 2017
|
|||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36 Steps to reproduce the problem: 1. Download Chromium 61 (https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Mac/488533/) 2. Start with flag --site-per-process 3. Go to https://test.shhnjk.com/simple_service.html (Legit SW registration) 4. Go to https://shhnjk.azurewebsites.net/PoC2.php 5. Go to https://test.shhnjk.com/poison.html What is the expected behavior? Cache added by UXSS should be ignored (or disabled). What went wrong? Attacker with ability of UXSS can use Cache API even after Site Isolation is enabled. If victim site has service worker which intercepts the request and checks for existing cache, attacker can abuse this to inject arbitrary response with script which also has access to document.cookie. Did this work before? N/A Chrome version: 61.0.3163.0 Channel: n/a OS Version: OS X 10.13.1 Flash Version:
,
Dec 5 2017
creis: Same question here - this seems potentially like a new security feature rather than bug? Should we change the Type to remove it from the sheriff queue?
,
Dec 5 2017
Security feature.
,
Jan 11 2018
If this is feature request rather than a bug, why are we hiding it? Can we open this up to public?
,
Mar 21 2018
Mac triage: assigning to creis@ for further triage.
,
Mar 21 2018
Ah, sorry, missed comment 4 amid all the activity in January. Agreed this can be opened up, since Site Isolation isn't currently enforcing restrictions on fully compromised renderers yet. falken@, any chance you know who works on the Cache API and may be able to help us find places to enforce this outside the renderer? Also adding jam@, since I wonder if this is affected by the network service.
,
Mar 21 2018
+jsbell, +cmumford for cache storage API
,
Mar 21 2018
,
Mar 21 2018
Since Cache Storage hasn't been mojoified yet, appropriate checks on the browser side of classic IPC would be in: https://cs.chromium.org/chromium/src/content/browser/cache_storage/cache_storage_dispatcher_host.cc ... but the mojoification is in flight: https://chromium-review.googlesource.com/c/chromium/src/+/875510 ... so probably best to wait until that lands (should be real soon!) and add it there.
,
May 29 2018
This should be completely unblocked now... Like (most) other mojo-ified back-ends the browser-side mojo channel / origin association occurs here: https://cs.chromium.org/chromium/src/content/browser/renderer_interface_binders.cc?q=renderer_interface_binders.cc&dr&l=156 Which is used at: https://cs.chromium.org/chromium/src/content/browser/renderer_interface_binders.cc?gsn=parameterized_binder_registry_&l=66 So if the frame->GetLastCommittedOrigin() is trustworthy then we're good. If not, that's a swell place to add enforcement.
,
May 30 2018
For every Mojo method called we use the origin from the initial binding (the one jsbell@ pointed on #10): https://cs.chromium.org/chromium/src/content/browser/cache_storage/cache_storage_dispatcher_host.cc?l=244 This use of origin from binding-time is what guarantees the segregation of each origin's cache.
,
Jul 24
Please add reward-topanel after this has been marked as fixed, so the VRP panel can take a look at it.
,
Jul 30
,
Jul 30
Inspecting the code again, so far as I can tell this work was complete w/ lucmult@'s changes. We no longer rely on the renderer to inform what origin it is representing. Passing back to creis@ to verify in case I missed something. Details in #10 - like most mojoified services, in RendererInterfaceBinders::BindInterface we rely on frame->GetLastCommittedOrigin() (for frames at least, for workers it's passed in) rather than anything passed by the renderer.
,
Jul 31
I tried verifying with the #0 steps, but unfortunately those resources don't seem to all be there any more. The poison.html 404s.
,
Jul 31
Poison.html is a cache file created with UXSS. If you don’t have UXSS in hand, it will always return 404.
,
Aug 9
Could anyone add reward-topanel per Comment 12?
,
Aug 9
,
Sep 11
Hi s.h.h.n.j.k@ - we had a discussion with the Site Isolation team about this bug, and we concluded that we would have fixed this even without the report, so we're not going to reward for it, I'm afraid.
,
Sep 11
All right! Thanks for the consideration! |
|||||||||||
►
Sign in to add a comment |
|||||||||||
Comment 1 by creis@chromium.org
, Dec 5 2017Cc: creis@chromium.org nasko@chromium.org
Components: Internals>Sandbox>SiteIsolation