SGTM. That exploit scenario is definitely interesting, though; can we
make sure it gets documented somewhere (if it hasn't already been)?
Hi,
Glad to see that you are planning to handle this scenario.
We have the following scenario:
User loads resource, is presented with certificate A.
User later gets a 304 from the server, is presented with certificate B.
Assume that either certificate A or B is bad, but not both. The overall
security of the resource shown to the user is no higher than the weakest
of the two certificates. In this case, presenting the user with just one
certificate cannot catch all cases. If presenting certificata A, while
certificate B is bad, the user might be tricked, and vice versa.
Another potential fix is to apply cache separation between secure and
insecure contexts. If only one of A and B is bad, then they will enter
separate caches (just like http and https do today), and not interfere,
and there would either be only good certificates or bad certificates for
the resource. Cache separation has a number of other benefits too, but
is unfortunately somewhat of an effort to undertake.
On Jun 19, 2015 5:12 AM, "Sigbjørn Vik" <sigb...@opera.com> wrote:
>
> Then there must be a bug somewhere. When testing, I can easily show that
> resources with bad certificates are cached.
>
> Observe that in step 4, Fiddler will list one of the responses as 304.
> Yet the browser shows the picture, hence it must be cached.
As Adam said, this is almost certainly the Blink in-memory cache rather than anything broken. We allow the in-memory cache of the renderer.
> If that works, that is a great first step towards a proper separation
> between contexts. A proper separation would also keep track of all other
> offline storage, cookies as well as other types. Not supporting cookies
> for insecure https would cause breakage, so they would have to be cached
> somewhere, i.e. an insecure cache context.
There is no plan at all to make these sorts of things hard security boundaries. Not fragmenting the cache/storage layers based onnl things like good/bad, DV vs OV vs EV, CA 1 vs CA 2, etc. Heck, the split between first party and third party, which is barely even a boundary, already causes real performance issues.