Re: [TLS] handling of duplication of extensions between ServerHello and EncryptedExtensions

Eric Rescorla <ekr@rtfm.com> Fri, 02 September 2016 19:23 UTC

Return-Path: <ekr@rtfm.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 748D212B05E for <tls@ietfa.amsl.com>; Fri, 2 Sep 2016 12:23:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=rtfm-com.20150623.gappssmtp.com
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 C-WKbvUvt2_n for <tls@ietfa.amsl.com>; Fri, 2 Sep 2016 12:23:44 -0700 (PDT)
Received: from mail-yw0-x229.google.com (mail-yw0-x229.google.com [IPv6:2607:f8b0:4002:c05::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 901F412B036 for <tls@ietf.org>; Fri, 2 Sep 2016 12:23:44 -0700 (PDT)
Received: by mail-yw0-x229.google.com with SMTP id j12so75713742ywb.2 for <tls@ietf.org>; Fri, 02 Sep 2016 12:23:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rtfm-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=QgmDmoDCK7GVy33ClV/STZo8w8aEhXfpoQnHCWeUIW8=; b=VnX6kEooL2cGKicoQ2mDsrwsEY72eMVvcG9nOneFXT83eqhByfSvPHHFRlmjvVJhXn IH62ldHb0uV/LpM70NCrO7XsyEJWNK1+7ioWc9HHzdeA8iYuF4DvQufXQVK2NwS4As+D Kfn9QEzH4CUTxCjyuLZBRWPxHb9AnFY+qlYG/LwSZGnlLoU7I+B8xTYOVtQkuHvBDopN b8UwhraLCG3O8QAJEvf5UrFpUHVjaAtmhL14O5DvlnrNoPaL8tzA30aj4wgD+BHsM1Yq LOav42PFcXIV0oGu55epXoNCs3CMOMz0mty8WgBJ6kDpw9v2FtnXHzPcGqRGg8p+OmLy sXuw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=QgmDmoDCK7GVy33ClV/STZo8w8aEhXfpoQnHCWeUIW8=; b=c2tOfg61NFzPOUdkzxvZO5Aa2zgU0xKx0cS7yg0vejyvDf4O1M/RIlSkZuclS7Z/Fc qPEFNqenuLmiiVw/bYpVOg6VBT5EtRJ7Uq83i/hSecxWf5aAr94rDzXAlpGWoSXimqX0 BiOXkvqukcpbkIgvA07XbCVn7SQlklzciTxu4kabCW2wgKdTgaHgC8tK4AZwHdE0Oz+3 50Vw/r+af8yODWEVXE9Q75XnFvtNR8xzvw0J6ot1R/GGHpZyGjM2BL1UJnsDQ5Zi+Uc5 uXYB0qQbIzzTB629SXbn8RLLLxe9RFV8x/NKCW57W3Ix5HBoy3zH2mHWgFHUC7QSmXNG Nv7A==
X-Gm-Message-State: AE9vXwM+LMik8Fp9I5VW/bWHinCUZjLeH1x/eRyCoCJGyC+tE62POl0LcimKUeYRj2qv7a0Viz4bIwmVRPUrDg==
X-Received: by 10.129.161.129 with SMTP id y123mr21596636ywg.214.1472844223931; Fri, 02 Sep 2016 12:23:43 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.129.48.193 with HTTP; Fri, 2 Sep 2016 12:23:03 -0700 (PDT)
In-Reply-To: <CAF8qwaCg6NkDNJ0x5g=67MVwTMj++ku=g-hvgS+R24u5ifqAFA@mail.gmail.com>
References: <2847810.DkTLEJYpS7@pintsize.usersys.redhat.com> <CAF8qwaCg6NkDNJ0x5g=67MVwTMj++ku=g-hvgS+R24u5ifqAFA@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Fri, 02 Sep 2016 12:23:03 -0700
Message-ID: <CABcZeBPm-Cwgh8+Nqeed=Dr=fgC=0VCn72b_8g-6H01u8-Qjqw@mail.gmail.com>
To: David Benjamin <davidben@chromium.org>
Content-Type: multipart/alternative; boundary="001a114f8db2c71c81053b8b44be"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/uq7SF494YtWC57st1pf41V_XJr4>
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] handling of duplication of extensions between ServerHello and EncryptedExtensions
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 02 Sep 2016 19:23:47 -0000

I agree. FWIW, this is how NSS behaves. A clarifying PR would be welcome
here.

On Fri, Sep 2, 2016 at 12:21 PM, David Benjamin <davidben@chromium.org>
wrote:

> Huh. I agree that text is weird. We should probably remove it. I think we
> actually get something akin to what you suggest basically implicitly:
>
> Servers aren't allowed to send unsolicited extensions, so your SH and EE
> parsers should be rejecting any unknown extensions. If you combine that
> with not accepting known extensions in the wrong context (unencrypted ALPN
> or encrypted key_share) since extensions already specify which messages
> they may live in, this all works out.
>
> So even if we explicitly say this rule, I don't think reflecting it in
> code is the cleanest implementation strategy. (It requires one keep a list
> of SH extensions and compare against it.) It might be better to say that
> extensions in unexpected contexts should be rejected like any other
> unexpected extension.
>
> David
>
>
> On Fri, Sep 2, 2016 at 1:31 PM Hubert Kario <hkario@redhat.com> wrote:
>
>> So, the draft has following text:
>>
>>     The same extension types MUST NOT appear in both the ServerHello and
>>     EncryptedExtensions.  If the same extension appears in both locations,
>>     the client MUST rely only on the value in the EncryptedExtensions
>>     block.
>>
>> if the extension "MUST NOT" be in both ServerHello and
>> EncryptedExtensions,
>> why the client should continue with the handshake if a server makes such a
>> major mistake? Why aborting the connection in such situation isn't safer?
>> --
>> Regards,
>> Hubert Kario
>> Senior Quality Engineer, QE BaseOS Security team
>> Web: www.cz.redhat.com
>> Red Hat Czech s.r.o., Purkyňova 99/71, 612 45, Brno, Czech
>> Republic_______________________________________________
>> TLS mailing list
>> TLS@ietf.org
>> https://www.ietf.org/mailman/listinfo/tls
>>
>
> _______________________________________________
> TLS mailing list
> TLS@ietf.org
> https://www.ietf.org/mailman/listinfo/tls
>
>