Re: [TLS] Version (in)tolerance

Marsh Ray <marsh@extendedsubset.com> Thu, 17 June 2010 15:26 UTC

Return-Path: <marsh@extendedsubset.com>
X-Original-To: tls@core3.amsl.com
Delivered-To: tls@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id BC9B43A68EE for <tls@core3.amsl.com>; Thu, 17 Jun 2010 08:26:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.322
X-Spam-Level:
X-Spam-Status: No, score=-1.322 tagged_above=-999 required=5 tests=[AWL=1.277, BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jBA5MjF9qvoS for <tls@core3.amsl.com>; Thu, 17 Jun 2010 08:26:48 -0700 (PDT)
Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) by core3.amsl.com (Postfix) with ESMTP id A274D3A68D5 for <tls@ietf.org>; Thu, 17 Jun 2010 08:26:48 -0700 (PDT)
Received: from xs01.extendedsubset.com ([69.164.193.58]) by mho-02-ewr.mailhop.org with esmtpa (Exim 4.68) (envelope-from <marsh@extendedsubset.com>) id 1OPGzS-000Es8-AD; Thu, 17 Jun 2010 15:26:51 +0000
Received: from [127.0.0.1] (localhost [127.0.0.1]) by xs01.extendedsubset.com (Postfix) with ESMTP id 10FAA64D8; Thu, 17 Jun 2010 15:26:48 +0000 (UTC)
X-Mail-Handler: MailHop Outbound by DynDNS
X-Originating-IP: 69.164.193.58
X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/mailhop/outbound_abuse.html for abuse reporting information)
X-MHO-User: U2FsdGVkX18jsqIo9BUKD3nZ6OwItrzlQQAg9zzu63A=
Message-ID: <4C1A3EBA.7070204@extendedsubset.com>
Date: Thu, 17 Jun 2010 10:26:50 -0500
From: Marsh Ray <marsh@extendedsubset.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.8) Gecko/20100216 Thunderbird/3.0.2
MIME-Version: 1.0
To: mrex@sap.com
References: <201006171420.o5HEKxq9002213@fs4113.wdf.sap.corp>
In-Reply-To: <201006171420.o5HEKxq9002213@fs4113.wdf.sap.corp>
X-Enigmail-Version: 1.0.1
OpenPGP: id=1E36DBF2
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Cc: tls@ietf.org
Subject: Re: [TLS] Version (in)tolerance
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.9
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/listinfo/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/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, 17 Jun 2010 15:26:49 -0000

On 6/17/2010 9:20 AM, Martin Rex wrote:
> Marsh Ray wrote:
>>
>> For testing purposes, a client which specified a client_version of
>> 0xFFFF should be able to successfully handshake using the highest
>> version the server supports. This works with some implementations today.
> 
> Maybe you want to turn your attention to the DTLS spec
> and reconsider your recommendation:
> 
> http://tools.ietf.org/html/rfc-4347#section-4
>       version
>        The version of the protocol being employed.  This document
>        describes DTLS Version 1.0, which uses the version { 254, 255
>        }.  The version value of 254.255 is the 1's complement of DTLS
>        Version 1.0. This maximal spacing between TLS and DTLS version
>        numbers ensures that records from the two protocols can be
>        easily distinguished.  It should be noted that future on-the-wire
>        version numbers of DTLS are decreasing in value (while the true
>        version number is increasing in value.)

I'm happy to be proven wrong (if get educated in the bargain :-), but I
don't think that's quite it. That section is talking about the record
layer version field, I was talking about the version negotiation in the
Hello messages.

The DTLS ClientHello message appears to be incompatible with a TLS
ClientHello, a new field was added right in the middle. So that record
layer number would be needed to interpret them (assuming it would ever
make sense for them to be in a context together where they could be
confused).

If this record layer version field is, in practice, being overloaded to
work as some sort of protocol identifier it should probably be managed
properly by the IANA. OTOH, maybe this is just a hint for Wireshark.

The TLS RFCs do not cite the DTLS RFC, therefore DTLS is basically
considered different protocol, right? According to the TLS RFCs and
normative references I read, a TLS server MUST have the behavior I
described. That's based on my dim understanding, but surely others know
how to interpret these things better.

>> If, after all,
>> TLS version 1.2 is 0x0303 then who can say what 0x0404 will mean?
> 
> TLS protocol_version numbers work differently.  The version negotiation
> is not capable of dealing with "holes".  So the next version of TLS
> should be using the protocol_version of { 0x03, 0x04 }, no matter how
> much it differs from TLSv1.2 (protocol_version { 0x03, 0x03 }) and
> even if we give it the "marketing name" TLSv2.0, it should use the
> protocol_version { 0x03, 0x04 } on the wire.

So what what we _can_ say about {0x04, 0x04} then is that it is the
257th version after TLSv1.2.

This might support my argument that we shouldn't think of them as
{major, minor} numbers at all, but as a simple unint16. Leave the "x.y"
version numbers to Marketing, unless there's some reason to define the
semantics that way.

> But there is really a design problem in the "common version" negotiation
> of TLS because of the implication that the client supports lower
> protocol version than the one it proposes.

If the server selects his highest version, and that turns out to be
lower than the client's lowest supported version, then they don't have
any version in common and wouldn't be able to successfully handshake anyway.

> If we were to define a substantially different TLSv2.0, and a problem
> would be found that needed fixing, the current versioning precludes
> that a TLSv1.3 is defined _after_ a TLSv2.0.  -- which is why I
> strongly prefer fancy new features to be added through TLS extensions
> rather than a bump of the protocol version -- because it can be
> more easily adopted by implementations and the installed base.

I guess, in theory, the client and/or server could support noncontiguous
ranges of versions (there are three or four of them now after all). If
that ever turns out to be needed, it seems like it could be supported in
a straightforward way with a Hello extension.

- Marsh