Re: [TLS] Treatment of (legacy_record_)version field [was Re: (strict) decoding of legacy_record_version?]

Eric Rescorla <> Wed, 23 November 2016 13:18 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 4C9E3129DB3 for <>; Wed, 23 Nov 2016 05:18:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id EZXgzcaXvYr5 for <>; Wed, 23 Nov 2016 05:18:34 -0800 (PST)
Received: from ( [IPv6:2607:f8b0:4002:c05::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id ADE3D129BD8 for <>; Wed, 23 Nov 2016 05:18:34 -0800 (PST)
Received: by with SMTP id a10so10798660ywa.3 for <>; Wed, 23 Nov 2016 05:18:34 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=5+FigfvlwK9jPzvJddRIYJwBU2I2lJX+YdJso1e/raw=; b=gWwyTyQVNjjL/3nCGpztawI01Vl1lAgrijNc2h3WXDMupqRl5ro/RLNuMV+KrzhH1A W0EIqqk8pP0a7ORB5deJ4TtNFyopmYsfc98GxFwvzFIyOZ1KhXMzXXKkL2+2prAAZOR8 Y/E/VblLpHEVZwRx7Coq7YGqRYrKCh+1KdAyzmIz2syaTZJltXWiA8Sg3ycS/EOaVtXc QF/pP+9entdBavzbot8lc82t3BTq2HdnjkNk7x7EMVBLA+p3owIPkO8L0PueEtH+CqeH zSWnrMkKBeZMeuHpBk57eX3So3iNxE5TPC9FjvASniZgbIiU32uZRRa2GqXnybgpFGuT argw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=5+FigfvlwK9jPzvJddRIYJwBU2I2lJX+YdJso1e/raw=; b=PV3IyTvSj12i+C77pncVO5dKK+wI5k059jrOGocqRWb1zodK0Yemd2LKcbEyW+tqjK SLcEj6WxCQfucABqruyOXVV/Uelilu3UdjGAkYd1WyVKc+Ygkh19MblGOvgazCp9TTx1 xJfNWcZAbA9fuVQ0z1fF02RUgZigiJanOyhF+m0/hhCMaCV1d3n41o6zM2wHolTrL57E 3UonLXf+ZVjhAu2eIUqDW5dz3qYIDJ44lZJDxmAp1eD7jyEr+vUGp2by8YEHyINWmO96 QLdO6qwj8CZlCKopUqGmIbmV6LB2cNwCE9j6is4jVjzoMiiy4Yjy2ewma3ICJcSGYAmd YmSg==
X-Gm-Message-State: AKaTC00rUlo3R5aQbw7r4KrLySBZArZCZsbiCBbTolEdr7w5sQ5weQc39WyYPEe6LfYd6CZkpRP/NwEfn+cAXQ==
X-Received: by with SMTP id f5mr3655665ywd.354.1479907113922; Wed, 23 Nov 2016 05:18:33 -0800 (PST)
MIME-Version: 1.0
Received: by with HTTP; Wed, 23 Nov 2016 05:17:52 -0800 (PST)
In-Reply-To: <>
References: <> <> <> <> <> <> <> <> <> <> <> <> <>
From: Eric Rescorla <>
Date: Wed, 23 Nov 2016 05:17:52 -0800
Message-ID: <>
To: Andreas Walz <>
Content-Type: multipart/alternative; boundary="001a114d5fd6d3b5d60541f7b9a0"
Archived-At: <>
Cc: "" <>
Subject: Re: [TLS] Treatment of (legacy_record_)version field [was Re: (strict) decoding of legacy_record_version?]
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." <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Wed, 23 Nov 2016 13:18:46 -0000

On Wed, Nov 23, 2016 at 3:39 AM, Andreas Walz <>

> Dear all,
> bringing up this thread again ....
> In the course of studying the way TLS implementations treat the "version"
> (or "legacy_record_version") field in the record header, we were wondering
> (please excuse if we missed some arguments here from past discussions):
> (1) What is an implementation (in particular when receiving the first
> bytes over a new connection) supposed to do if the record's version field
> signals a protocol version the implementation does not support? I
> understand that, at this stage, enforcing a specific value (e.g. 0x0301
> according to the TLSv1.3 draft) is detrimental to interoperability.
> However, if that field bears any meaning (in either TLSv1.3 or previous
> versions), what is it? I would expect this field is supposed to allow
> signaling a potentially non-backward compatible record format
> (inauspiciously interfering with a receiver disregarding the record
> version). Provided this field isn't treated as an enum, what about
> checking/enforcing at least the major version as BoringSSL does (as far as
> I know)? In any case, I would propose to be very clear about this in the
> text (my sense was that there is some work in progress, but I couldn't find
> anything). In implementations (<TLSv1.3), we found all kinds of
> interpretations.

In general, it should ignore it. It's going to become increasingly common
to have this be a version you don't support given the recommendation to use
0301 and the ongoing deprecation of TLS 1.0. I think it would be fine to
sanity check the major version, but I'm not sure what would be gained by
requiring this.

> (2) What is an implementation (up to TLSv1.2, as the TLSv1.3 spec is
> rather clear about that) supposed to use for the record's protocol version
> field before a version has been agreed upon (e.g. when sending an alert
> after receiving an unparsable ClientHello)? My best guess would be to set
> it to the lowest (TLS) protocol version that uses the same record format
> (probably 0x0301). However, we observe several servers which, in such
> cases, answer with an alert with weird record protocol version values, e.g.
> 0x0000.]

Yes, this seems like a reasonable procedure. Not sure how to tell TLS 1.2
impls what to do at this point, though.


> Thanks and Cheers,
> Andi
> ___________________________________
> Andreas Walz
> Research Engineer
> Institute of reliable Embedded Systems and Communication Electronics
> (ivESK)
> Offenburg University of Applied Sciences, 77652 Offenburg, Germany
> >>> Benjamin Kaduk <> 11/10/16 5:22 PM >>>
> On 11/08/2016 06:25 PM, Martin Thomson wrote:
> On 9 November 2016 at 05:59, Brian Smith <> <> wrote:
> This isn't a pervasively shared goal, though. It's good to let the browsers
> police things if they want, but I think a lot of implementations would
> prefer to avoid doing work that isn't necessary for interop or security.
> If you permit someone to enforce it, then that is sufficient.  I don't
> think that we should ever force someone to enforce these sorts of
> things (as you say, sometimes strict enforcement isn't cheap or even
> desirable).
> Agreed.  We should probably change the text a bit, though, as right now
> readers can get two different readings depending on whether they go for a
> strict decode_error (or illegal_parameter?) since the struct doesn't match
> the definition, or follow the "MUST be ignored for all purposes".
> -Ben
> _______________________________________________
> TLS mailing list