New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 767539 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 1
Type: Bug-Security
M65

Blocking:
issue 99379



Sign in to add a comment

TabSpecificContentSettings::OnContentSettingChanged is not aware of OOPIFs

Project Member Reported by lukasza@chromium.org, Sep 21 2017

Issue description

TabSpecificContentSettings::OnContentSettingChanged is sending RendererContentSettingRules to the renderer process.  The problem is that the rules are only sent to the main frame's renderer and are not sent to other renderers (i.e. to renderers hosting OOPIFs).
 
Owner: nigeltao@chromium.org
nigeltao@ - can you please help triage (as the call to SetContentSettingRules comes from your r444628).
Status: Assigned (was: Untriaged)
Based on the mailing list discussions, I don't think it is a regression.

I'll assign the bug to me, but I don't work on Mojo per se any more, so I don't expect to work on this Priority-3 bug any time soon. Anyone else (perhaps from site-isolation-dev) is free to take it.

Comment 4 by creis@chromium.org, Nov 18 2017

Blocking: 99379

Comment 5 by nasko@chromium.org, Dec 5 2017

While it is not strictly a regression, it is in the sense that "it never worked before" for OOPIFs. However, we want to ensure all code is OOPIF compatible as we have shipped OOPIFs to users for a while now and are increasing the usage consistently with time. 

I would like to raise the priority on this work if possible, so please let us know what timeframe we can expect this to be completed.

Comment 6 by nasko@chromium.org, Dec 6 2017

Cc: bauerb@chromium.org msramek@chromium.org creis@chromium.org raymes@chromium.org nasko@chromium.org
Labels: -Pri-3 M65 OS-Chrome OS-Linux OS-Mac OS-Windows Pri-1
I spent some time looking at this and it is actually pretty bad. It looks like content settings don't apply to OOPIFs. The repro I got is running Canary with --site-per-process and a few pages from different sites I put together:

Page that includes cross-site frame executing JS: http://tests.netsekure.org/iframes/cross_site_frame_with_js.html
The page being iframed that executes JS: https://web.evilbit.io/javascript.html
Same site page including the JS executing page: https://web.evilbit.io/same_site_frame_js.html
The origin I've disabled JS execution for: https://web.evilbit.io

The result is that if I navigate to https://web.evilbit.io/same_site_frame_js.html, it works as expected - javascript does not execute and the document appears blank. The two iframes are in the same process.

If I navigate to http://tests.netsekure.org/iframes/cross_site_frame_with_js.html, the subframe document has "JS produced output" string, which is the result of JS setting innerText on a div on the page. This means that the content settings disallowing JS execution are not applied.

This needs to be addressed as soon as we can, so raising the priority to P1. I'm not sure who the best person is to handle it, so feel free to reassign.

Comment 7 by nasko@chromium.org, Dec 6 2017

Labels: -Type-Bug Restrict-View-SecurityTeam Type-Bug-Security
Labelling this one as security bug, as it can potentially violate security restrictions put in place through content settings by users and/or extensions.
Components: UI>Browser>SiteSettings Privacy
Labels: Team-Security-UX
Cc: alex...@chromium.org
Nasko, I've tried your repro in http://tests.netsekure.org/iframes/cross_site_frame_with_js.html (with JS execution disabled for https://web.evilbit.io in content settings) and it seems to also work without --site-per-process.  Is this a more general issue with content settings relying on the top frame's origin in this case?
Thanks for checking alexmos@! It could be that I don't understand how content settings are designed to work, but as a user it was somewhat surprising to disable JS for the origin and for it to continue working in a subframe.

I'd leave it to the owners of content settings to chime in about what the expected behavior is.
Cc: jochen@chromium.org
These type of content settings should apply to the entire frame tree. e.g. if I disable JS or plugins for example.com, they should apply to example.com and all iframes it embeds (cross-origin or otherwise), but not apply when example.com is embedded elsewhere. From testing on Canary that seems to be the behavior when --site-per-process is enabled.

Extensions and policy can set "secondary patterns" which allow users to disable embedded scripts for particular origins. I haven't tested if that continues to work, but there's nothing to suggest that it wouldn't. The code that enforces this behavior is in content_settings_observer.cc.

The other thing to note is that TabSpecificContentSettings is mainly about UI and not behavior of content settings.

So I think this is WontFix.
Status: WontFix (was: Assigned)
Project Member

Comment 13 by sheriffbot@chromium.org, Mar 15 2018

Labels: -Restrict-View-SecurityTeam allpublic
This bug has been closed for more than 14 weeks. Removing security view restrictions.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment