[TLS] TLS 1.3 supported versions and downgrade protection

Daniel Van Geest <Daniel.VanGeest@isara.com> Thu, 05 December 2019 17:29 UTC

Return-Path: <Daniel.VanGeest@isara.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 C8FB7120130 for <tls@ietfa.amsl.com>; Thu, 5 Dec 2019 09:29:27 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.398
X-Spam-Level:
X-Spam-Status: No, score=-1.398 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, PDS_BTC_ID=0.499, SPF_HELO_NONE=0.001, SPF_NONE=0.001] autolearn=no 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 UNfObRQoYYrm for <tls@ietfa.amsl.com>; Thu, 5 Dec 2019 09:29:26 -0800 (PST)
Received: from esa1.isaracorp.com (esa1.isaracorp.com [207.107.152.166]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C94AF120073 for <tls@ietf.org>; Thu, 5 Dec 2019 09:29:25 -0800 (PST)
IronPort-SDR: /5AChqlJtJksfoQYtI2AFX00HIVtwP7M+Zoyl/oCCmWpTS7kAcpV2kCV6qlqpdfX148L9Y0v47 OExGDoBBkC6DxQHIvp0neAi9o6AxNAGbsaXLciMurwkkUBEGS0cM6/JZZwKau6D+hTK2BGcBnE sGJwAQ21pmitLHWimtk+vrwpqiFWxHiMJeymPaOUG2jRkOE/pLupk/4THbMpw1p0YJGbHWXlI4 ZfPEzINXuIYcelwn6b2Fx9ePHqPbIkSoBpKNf8YR2Jtvt+BNWlHLoNPc6I8b+zVuGvXp1rRCEH fM4=
Received: from unknown (HELO V0501WEXGPR01.isaracorp.com) ([10.5.8.20]) by ip1.isaracorp.com with ESMTP; 05 Dec 2019 17:29:25 +0000
Received: from V0501WEXGPR01.isaracorp.com (10.5.8.20) by V0501WEXGPR01.isaracorp.com (10.5.8.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1847.3; Thu, 5 Dec 2019 12:30:10 -0500
Received: from V0501WEXGPR01.isaracorp.com ([fe80::d802:5aec:db34:beba]) by V0501WEXGPR01.isaracorp.com ([fe80::d802:5aec:db34:beba%7]) with mapi id 15.01.1847.005; Thu, 5 Dec 2019 12:30:10 -0500
From: Daniel Van Geest <Daniel.VanGeest@isara.com>
To: "tls@ietf.org" <tls@ietf.org>
Thread-Topic: TLS 1.3 supported versions and downgrade protection
Thread-Index: AQHVq5GkH/CAXcP3Nk2Xq8wyW2l/YA==
Date: Thu, 05 Dec 2019 17:30:10 +0000
Message-ID: <D4904384-8893-410A-A516-06B0226FFA4E@isara.com>
Accept-Language: en-CA, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [172.31.5.52]
Content-Type: multipart/alternative; boundary="_000_D49043848893410AA51606B0226FFA4Eisaracom_"
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/n6X07J0851PgQXOCRcAk79_W7TY>
Subject: [TLS] TLS 1.3 supported versions and downgrade protection
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.29
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, 05 Dec 2019 17:29:28 -0000

Hi all,

I think there might be ambiguity or an interoperability issue with the TLS 1.3 ServerHello Random value downgrade protection and some (possibly?) legitimate negotiation of TLS 1.2 using the supported_versions extension.  Looking through RFC 8446 and the mail archives I don’t see anything that addresses this, maybe I’ve missed something?

RFC 8446 Section 4.1.3:

   TLS 1.3 has a downgrade protection mechanism embedded in the server's
   random value.  TLS 1.3 servers which negotiate TLS 1.2 or below in
   response to a ClientHello MUST set the last 8 bytes of their Random
   value specially in their ServerHello.

   If negotiating TLS 1.2, TLS 1.3 servers MUST set the last 8 bytes of
   their Random value to the bytes:

     44 4F 57 4E 47 52 44 01

   If negotiating TLS 1.1 or below, TLS 1.3 servers MUST, and TLS 1.2
   servers SHOULD, set the last 8 bytes of their ServerHello.Random
   value to the bytes:

     44 4F 57 4E 47 52 44 00

   TLS 1.3 clients receiving a ServerHello indicating TLS 1.2 or below
   MUST check that the last 8 bytes are not equal to either of these
   values.  TLS 1.2 clients SHOULD also check that the last 8 bytes are
   not equal to the second value if the ServerHello indicates TLS 1.1 or
   below.  If a match is found, the client MUST abort the handshake with
   an "illegal_parameter" alert.

So whenever a TLS 1.3-capable server negotiates a TLS 1.2 or lower session it MUST set the appropriate Random values.

And a TLS 1.3 client MUST check for these values and abort if found. Future TLS versions aren’t mentioned so perhaps one of the use cases I’ll mention below is not a concern until the next version is defined and the behavior can be adjusted then.

Consider the potential cases for the ClientHello supported_versions values:


  1.  supported_versions = { 0x0305 (TLS 1.4), 0x0303 (TLS 1.2) }
Okay, TLS 1.4 doesn’t exist so maybe this can be addressed in the future.  If the server supports TLS 1.2 and TLS 1.3, it will negotiate TLS 1.2 and add the TLS 1.2 downgrade protection Random value.  The Client will see the TLS 1.2 version, check the downgrade protection and abort the connection.  But this is not a downgrade issue, this is the only mutually acceptable TLS version.

  2.  supported_versions = { 0x0303 (TLS 1.2), 0x0304 (TLS 1.3) }
The supported_versions list is in order of client preference, but it’s not required that the server respect the preference.  I’ve seen implementations which respect the client’s preference and ones which pick the highest mutually acceptable version.  If a server supports TLS 1.2 and TLS 1.3 and respects the client’s preference it will negotiate TLS 1.2 and add the downgrade protection random value.  The client would then abort the connection even though this would seem to be a legitimate non-downgrade situation  Or can we wave our hands at this and say if a client doesn’t prefer TLS 1.3 above TLS 1.2 then it’s not really a true Scotsman TLS 1.3 client and those MUSTs don’t really apply to it?.

And so, are these legitimate cases which should be addressed?

Thanks,
Daniel Van Geest