Re: [TLS] Version (in)tolerance

Marsh Ray <marsh@extendedsubset.com> Thu, 17 June 2010 11:56 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 50EC23A6A0F for <tls@core3.amsl.com>; Thu, 17 Jun 2010 04:56:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.03
X-Spam-Level:
X-Spam-Status: No, score=-0.03 tagged_above=-999 required=5 tests=[AWL=-0.031, BAYES_50=0.001]
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 tx6YAarwc2SX for <tls@core3.amsl.com>; Thu, 17 Jun 2010 04:56:34 -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 5F74F3A699C for <tls@ietf.org>; Thu, 17 Jun 2010 04:56:34 -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 1OPDi2-0006aS-DZ; Thu, 17 Jun 2010 11:56:38 +0000
Received: from [127.0.0.1] (localhost [127.0.0.1]) by xs01.extendedsubset.com (Postfix) with ESMTP id B14A764D8; Thu, 17 Jun 2010 11:56:35 +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: U2FsdGVkX19SiYhEy4a73aXehWRU1n3iw8AV5p2fPqg=
Message-ID: <4C1A0D75.1050309@extendedsubset.com>
Date: Thu, 17 Jun 2010 06:56:37 -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: Peter Gutmann <pgut001@cs.auckland.ac.nz>
References: <E1OP8tc-0002iZ-3i@wintermute02.cs.auckland.ac.nz>
In-Reply-To: <E1OP8tc-0002iZ-3i@wintermute02.cs.auckland.ac.nz>
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 11:56:35 -0000

On 6/17/2010 1:48 AM, Peter Gutmann wrote:
> "Brian Smith" <brian@briansmith.org> writes:
> 
>> NSS has an explicit check that the first byte of every version 
>> number is 0x03. I imagine other implementations have a similar 
>> check.
> 
> I do that too, and it's quite deliberate, we've been using 3.x for 
> 15-odd years and there's no sign, even with major incompatible 
> protocol revisions, that we're going to 4.x at any point.

But this is the part of the handshake where the protocol version hasn't
actually been agreed on yet. Some future TLS may, in fact, be a big
protocol change but a server is still wrong to refuse to interoperate on
the basis that the client merely proposed a higher protocol version.

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.

> Any change to 4.x is therefore going to either never happen or will 
> be something so major, probably a complete break of the entire 
> protocol, that I want to force users to upgrade to a completely new 
> release.

A. We don't know anything about future protocols yet, other than that
the client hello message will probably try to maintain compatibility
back to 1.0 and IANA-assigned identifiers won't collide. If, after all,
TLS version 1.2 is 0x0303 then who can say what 0x0404 will mean?

B. What if every protocol implementer and application developer acted
this way? What if they applied predictive numerology on reserved values
and decided to break compatibility in order to "force users to upgrade"?
Big vendors can have legal concerns which discourage that sort of thing
but unfortunately it seems common among smaller ones.

If a significant percentage of client-version-intolerant servers are
allowed to pollute the ecosystem, clients implementing some future TLS
(or TLS-compatible) protocol with a version number encoding other than
0x03xx will experience problems. They will be slowed down by failed
handshakes. Application code will be forced to implement complex
fallback reconnection schemes that are subject to downgrade attacks.

The net effect will be to simply slow the adoption of future protocol
versions and make it more difficult to evolve TLS without compatibility
problems. For example, fixing the renegotiation auth gap would have been
easier if actual servers consistently ignored hello extensions that they
didn't care about.

It may end up that it's just impractical for a client to ever advertise
a version number that doesn't look like 0x03xx. If that is the case,
then there's a wasted byte in the protocol header.

Here are my take-aways (from this and some other experiences):

* Protocols are hard, extensible ones moreso. Even for seemingly simple
stuff like version agreement, the default state seems to be
non-interoperability. This makes it interesting.

* Don't encode a version as separate components unless there are useful
distinctions between each component. In the absence of defined semantics
people will interpret their own.

* If an optional protocol feature has no implementations that are
available and widely used for testing, it can be relied on not to work.

- Marsh