Re: [TLS] draft-ietf-tls-tls13-24 supported_versions complexity

"David A. Cooper" <david.cooper@nist.gov> Thu, 01 March 2018 15:49 UTC

Return-Path: <david.cooper@nist.gov>
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 63CBC12E049 for <tls@ietfa.amsl.com>; Thu, 1 Mar 2018 07:49:23 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.211
X-Spam-Level:
X-Spam-Status: No, score=-4.211 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham autolearn_force=no
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 sggCavL3_oGo for <tls@ietfa.amsl.com>; Thu, 1 Mar 2018 07:49:21 -0800 (PST)
Received: from wsget1.nist.gov (wsget1.nist.gov [IPv6:2610:20:6005:13::150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5DC3612E9A1 for <tls@ietf.org>; Thu, 1 Mar 2018 07:49:21 -0800 (PST)
Received: from WSGHUB1.xchange.nist.gov (129.6.42.34) by wsget1.nist.gov (129.6.13.150) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 1 Mar 2018 10:50:53 -0500
Received: from postmark.nist.gov (129.6.16.94) by mail-g.nist.gov (129.6.42.33) with Microsoft SMTP Server id 14.3.361.1; Thu, 1 Mar 2018 10:49:18 -0500
Received: from [129.6.105.183] (cooper-optiplex-9010.campus.nist.gov [129.6.105.183]) by postmark.nist.gov (8.13.8/8.13.1) with ESMTP id w21Fn84H012008 for <tls@ietf.org>; Thu, 1 Mar 2018 10:49:08 -0500
To: "tls@ietf.org" <tls@ietf.org>
From: "David A. Cooper" <david.cooper@nist.gov>
Message-ID: <9233569e-fc21-e6dd-b84c-6a98e29a4f02@nist.gov>
Date: Thu, 01 Mar 2018 10:49:08 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Content-Language: en-US
X-NIST-MailScanner-Information:
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/ztCMxT1lOX_2AB49LEkUDfIZLpc>
Subject: Re: [TLS] draft-ietf-tls-tls13-24 supported_versions complexity
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.22
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: Thu, 01 Mar 2018 15:49:23 -0000


I believe you are misinterpreting the text, but agree that it could be 
made more clear.

Suppose that the ClientHello includes a supported_versions extensions 
that contains two values, TLS 1.4 and TLS 1.0, and the server supports 
TLS 1.3 and below. My interpretation of the current draft is that the 
server MUST use the supported_versions extension to determine the 
client's preference, but then once deciding to use TLS 1.0 for the 
connection sends a normal TLS 1.0 ServerHello, with version field set to 
0x0300 and no supported_versions extension. Note that Section 4.2.1 says 
that

      A server which negotiates TLS 1.3 MUST respond by sending a
      "supported_versions" extension containing the selected version
      value (0x0304).

It says nothing about a server that negotiates an earlier version.

If my understanding is correct, then I believe the text in Section 4.1.3 
could be made more clear. Draft -21 said that the version field of 
ServerHello "contains the version of TLS negotiated for this 
connection." (this is similar to what RFC 5246 said). The current draft 
says:

       In TLS 1.3, the TLS server indicates its version using the
       "supported_versions" extension (Section 4.2.1), and the
       legacy_version field MUST be set to 0x0303, which is the
       version number for TLS 1.2.

To be consistent with RFC 5246 and earlier, it seems like the text 
should say something like:

       For a TLS 1.3 ServerHello the TLS server indicates its version
       using the "supported_versions" extension (Section 4.2.1), and
       the legacy_version field MUST be set to 0x0303, which is the
       version number for TLS 1.2. For a TLS 1.2 and earlier ServerHello
       the legacy_version field contains the version of TLS negotiated
       for this connection.

On Thu, Mar 1, 2018 at 5:24 AM, Nikos Mavrogiannopoulos 
<nmav@redhat.com> wrote:

> The TLS draft after version -21 requires TLS1.3 servers to negotiate
> pre-TLS1.3 versions with a new, mechanism. The document states:
>
>    "If this extension is present, servers MUST ignore the
>    ClientHello.legacy_version value and MUST use only the
>    "supported_versions" extension to determine client preferences."
>
> ...
>
>    "Note that this mechanism makes it possible to negotiate a
>    version prior to TLS 1.2 if one side supports a sparse range."
>
>
> At this point, a server receiving a supported_versions extension which
> contains the single value 'TLS 1.0' has to follow the draft's
> recommendations and do:
>
>   1. It MUST set the ServerHello.legacy_version field to 0x0303
>      (TLS 1.2).
>   2. On the serverHello extensions include a supported_versions
>      extension and advertise TLS1.0
>
> That modifies the way TLS 1.1  or TLS 1.0 are negotiated, possibly
> introducing new issues with middle-boxes which see TLS1.2 in the
> ServerHello but TLS1.0 anywhere else. That is also a quite impossible
> code path (why would an implementation negotiate TLS1.0 using a TLS1.3
> mechanism?). It is however anticipated to be used for that purpose as
> this draft mentions:
>
>    "Servers should be prepared to receive ClientHellos that include
>     this extension but do not include 0x0304 in the list of versions."
>
> Irrespective to any middle-box issues, I believe impossible code paths
> allowed by the protocol are more likely to cause problems than solve
> any, because they are often not tested, and provide attackers with
> additional tools to manipulate implementations.
>
> My recommendation to address that would to either ignore that extension
> if pre-TLS1.2 is negotiated, or revert to -21 draft behavior for pre-
> TLS1.3 protocol negotiation. That is, the server MUST not send the
> supported_versions extension if a pre-TLS1.3 protocol is to be
> negotiated. The first case ensures that there is a single way to
> negotiate TLS1.x, where x<3, and the second that the clientHello
> extension is only used informatively.
>
> regards,
> Nikos