Subject: [websec] [HSTS] Contradiction between sections 8.1 and 11.3 of RFC 6797?

From: Stephane Bortzmeyer <[email-masked]>
Date: Wed, 17 Dec 2014 14:56:59 +0100

[I'm not subscribed to the websec working group so please copy me when
replying.]

I don't know how to read section 11.3 of RFC 6797. It says "If all
four of the following conditions are true... [self-signed
certificates...]  ...then secure connections to that site will fail,
per the HSTS design." It seems to imply that adding a
Strict-Transport-Security: header to a site which has a self-signed
certificate is an error.

But section 8.1 says that the Strict-Transport-Security: will be
ignored if the HTTPS session is not secured (for instance because the
client uses a self-signed cert, section 8.1 says the header will be
accepted only "if there are no underlying secure transport errors or
warnings"). So, it seems that adding Strict-Transport-Security: is
useless (they will be ignored, per section 8.1) but not an error.

I checked with the Chromium browser "Version 20.0.1132.47 Ubuntu 12.04
(144678)" and a HTTPS site signed by CAcert.org (unknown CA for most
browsers) and, indeed, Chromium ignores the HSTS header and accepts to
use HTTP. Once CAcert.org cert is added, Chromium accepts the HSTS
header and uses only HTTPS. So, it seems the Chromium programmers
decided to ignore section 11.3?

---

From: David Keeler <[email-masked]>
Date: Wed, 17 Dec 2014 11:51:08 -0800

Hi Stephane,

Here's how I look at it:

Section 8.1 is about a user agent noting a new HSTS host. If the
connection had an underlying error (e.g. self-signed cert), the user
agent will not note that host as using HSTS.

Section 11.3 is about when the user agent connects to a host that it
previously noted as using HSTS. If there are underlying transport
errors, the user agent will not allow the connection to continue under
any circumstances (e.g. certificate exception overrides are disabled).

Hope this helps,
David

On 12/17/2014 05:56 AM, Stephane Bortzmeyer wrote:
> _______________________________________________
> websec mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/websec
>

---

From: Stephane Bortzmeyer <[email-masked]>
Date: Wed, 17 Dec 2014 21:38:37 +0100

On Wed, Dec 17, 2014 at 11:51:08AM -0800,
 David Keeler <[email-masked]> wrote 
 a message of 47 lines which said:

> previously noted as using HSTS.

OK, so a example case with section 11.3 could be a server publishing a
HSTS header while it has a recognized certificate and then later
switching to a self-signed certificate. In that case, access would be
denied. Am I correct?

---

From: Daniel Kahn Gillmor <[email-masked]>
Date: Tue, 30 Dec 2014 16:24:00 -0500

> switching to a self-signed certificate. In that case, access would be

Yes, this is a known consequence of using HSTS.

	--dkg