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

Issue 759222 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

cross-site 'report-uri' might be incompatible with site isolation

Project Member Reported by lukasza@chromium.org, Aug 25 2017

Issue description

Site Isolation wants to restrict / lock-down which origins a particular renderer can talk to.  This goal seems incompatible with the ability to send CSP violation reports to any cross-origin.

This problem is somewhat similar the problem of allowing any cross-origin fetches from Content Scripts - see  issue 726951 .


There are 2 CSP directives that might result in an HTTP POST with report violation data: 'report-uri' and 'report-to'.

'report-uri' is being deprecated and replaced with 'report-to' (which builds on top of the new reporting API spec/feature - http://wicg.github.io/reporting/).

Both 'report-uri' and the Reporting API seem to allow reporting to a cross-origin destination.  In particular, there are tests for 'report-uri' that (AFAICT) validate that a cross-site report was successful: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies.php

AFAIK, both 'report-uri' and 'report-to' can be declared inside a <meta> element (and so both are parsed inside a renderer and can be lied about by a compromised renderer).


I think that the test above specifically verifies that the CSP violation report is sent *without* cookies (I am guessing that this corresponds to WebURLRequest::kFetchCredentialsModeSameOrigin).  So maybe there is no problem.  OTOH, the Reporting API spec says in http://wicg.github.io/reporting/#send-reports to include credentials.


Reporting of CSP violations currently goes through PingLoader::SendViolationReport.  This class is responsible for other HTML requests, including processing of "ping" attribute of anchor (<a>) elements - interestingly the other kind of pings is restricted to same origin (i.e. I see a check for frame->GetDocument()->GetSecurityOrigin()->CanAccess(ping_origin.Get())).
 
I am not sure if there is a problem here, but I thought that rather than guessing I'll go ahead and file a bug and then ask folks from the CC to 1) double-check what I wrote above and then 2) make conclusions wrt Site Isolation compatibility.  Can you PTAL?

Comment 2 by creis@chromium.org, Aug 25 2017

Cc: creis@chromium.org
Status: WontFix (was: Untriaged)
lukasza@ and I chatted and we think there's no probably no issue here.

Site Isolation wants to prevent documents from a cross-site victim's server from being given to an attacker's compromised process, but it doesn't make any attempt to prevent (credentialed or non-credentialed) requests from going to the victim's server.

In that sense, the report-uri feature shouldn't pose more risk than a typical CSRF attack (e.g., the attacker has an image tag that points to the victim's server with a state-changing URL).  Such attacks are the server's responsibility to defend against, such as with CSRF tokens that validate the request.

Sign in to add a comment