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

David Keeler <dkeeler@mozilla.com> Wed, 17 December 2014 19:51 UTC

Return-Path: <dkeeler@mozilla.com>
X-Original-To: websec@ietfa.amsl.com
Delivered-To: websec@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3D56F1A8AF5 for <websec@ietfa.amsl.com>; Wed, 17 Dec 2014 11:51:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.6
X-Spam-Level:
X-Spam-Status: No, score=-2.6 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id szzC88U5f9n7 for <websec@ietfa.amsl.com>; Wed, 17 Dec 2014 11:51:11 -0800 (PST)
Received: from mail-pd0-f170.google.com (mail-pd0-f170.google.com [209.85.192.170]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CE5DC1A8A9A for <websec@ietf.org>; Wed, 17 Dec 2014 11:51:11 -0800 (PST)
Received: by mail-pd0-f170.google.com with SMTP id v10so16863648pde.29 for <websec@ietf.org>; Wed, 17 Dec 2014 11:51:11 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=f4ZxTYmqbDlAg1ElfKQNedMMuZyXflecH1E5VJU3Fd4=; b=hVnApI4QmhO74/4O7q18pWXUlwq+PoUqQdBJ7IKZq4He/m3Q4RR9fSJzSAcXtXh7/R KD9qIvOxxmkB7MsLEFM14i7To5BUYvt1dGprxBwoVYI2HvLW9bqiNnBqTZpZ4MypECc0 dlr4g6pmwIHf25+I3ksT2ID2J+nsrCBeBlHDj76AbT8JtEUBtIf6Skr+CpyPXel0kfd9 Kv/Q3LNb4FYWrB38HaRh/KJMGWq9V84ZdMEMvc1hSvuyiNDdUqh2S/WDll9uypvHjgxb RUaKXWuLOeN4ed/h2/scjQF+8dXDNshFuwRPDfxOrG9vr0sDA1LYi5U2x2zRbJnJEAb4 59fw==
X-Gm-Message-State: ALoCoQmt5pCGkil5aPRzqusKTki4/QqJe0eYtCNzZ0COD8tc8r9j7VsREK6Wlp/4U3+b0yb/lk5u
X-Received: by 10.70.37.35 with SMTP id v3mr72875184pdj.4.1418845871277; Wed, 17 Dec 2014 11:51:11 -0800 (PST)
Received: from [10.248.28.41] ([207.126.102.129]) by mx.google.com with ESMTPSA id ye3sm4597071pbb.93.2014.12.17.11.51.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Dec 2014 11:51:10 -0800 (PST)
Message-ID: <5491DEAC.8040706@mozilla.com>
Date: Wed, 17 Dec 2014 11:51:08 -0800
From: David Keeler <dkeeler@mozilla.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0
MIME-Version: 1.0
To: Stephane Bortzmeyer <bortzmeyer@nic.fr>, websec@ietf.org, Jeff.Hodges@PayPal.com, collin.jackson@sv.cmu.edu, ietf@adambarth.com
References: <20141217135659.GA4781@nic.fr>
In-Reply-To: <20141217135659.GA4781@nic.fr>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Archived-At: http://mailarchive.ietf.org/arch/msg/websec/Bfp5GiBf6esFQ8TxFSM5rkZ6PPo
Subject: Re: [websec] [HSTS] Contradiction between sections 8.1 and 11.3 of RFC 6797?
X-BeenThere: websec@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Web Application Security Minus Authentication and Transport <websec.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/websec>, <mailto:websec-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/websec/>
List-Post: <mailto:websec@ietf.org>
List-Help: <mailto:websec-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/websec>, <mailto:websec-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 17 Dec 2014 19:51:14 -0000

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:
> 
> [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?
> 
> _______________________________________________
> websec mailing list
> websec@ietf.org
> https://www.ietf.org/mailman/listinfo/websec
>