[TLS] (strict) decoding of legacy_record_version?

Benjamin Kaduk <bkaduk@akamai.com> Mon, 07 November 2016 23:50 UTC

Return-Path: <bkaduk@akamai.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 8F7121296FF for <tls@ietfa.amsl.com>; Mon, 7 Nov 2016 15:50:50 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.197
X-Spam-Level:
X-Spam-Status: No, score=-4.197 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RP_MATCHES_RCVD=-1.497, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=akamai.com
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 Q1fU_6tP-8q8 for <tls@ietfa.amsl.com>; Mon, 7 Nov 2016 15:50:48 -0800 (PST)
Received: from prod-mail-xrelay07.akamai.com (prod-mail-xrelay07.akamai.com [23.79.238.175]) by ietfa.amsl.com (Postfix) with ESMTP id 2D7421296A6 for <tls@ietf.org>; Mon, 7 Nov 2016 15:50:48 -0800 (PST)
Received: from prod-mail-xrelay07.akamai.com (localhost.localdomain [127.0.0.1]) by postfix.imss70 (Postfix) with ESMTP id 3843C43346F; Mon, 7 Nov 2016 23:50:47 +0000 (GMT)
Received: from prod-mail-relay11.akamai.com (prod-mail-relay11.akamai.com [172.27.118.250]) by prod-mail-xrelay07.akamai.com (Postfix) with ESMTP id 18074433467; Mon, 7 Nov 2016 23:50:47 +0000 (GMT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akamai.com; s=a1; t=1478562647; bh=MzXJxfQEy3xI5eiT8EKywUoI0yq8/8kccRGxXa7+phs=; l=3608; h=To:References:Cc:From:Date:In-Reply-To:From; b=ESnF07b+4PZ7cueENDLLXJ4F55TenZkJlxKx9nRU8x4PlTDRIXxwfb8WvXC+o83js dwDy0/q6Ywf5TGsjDFfCkVBb1W/7c790PN7agIOdJymudomq3BLDn8SDHSEbs2iw2/ HUx/s4U2eVYHk9y0M8gtSmFBtsvYSWVobsBoUGtg=
Received: from [172.19.0.25] (bos-lpczi.kendall.corp.akamai.com [172.19.0.25]) by prod-mail-relay11.akamai.com (Postfix) with ESMTP id BB94E1FC90; Mon, 7 Nov 2016 23:50:46 +0000 (GMT)
To: Eric Rescorla <ekr@rtfm.com>
References: <CABcZeBMeLgqjvr2cjWL=AHTQJbS9siNBB6U2=0654yigbBGkYA@mail.gmail.com> <47532130.8rB6yCJVvA@pintsize.usersys.redhat.com> <CABcZeBOsN+_gUUb=HoUsoPOTBgANedT5Y5O+pAGXn0qTYjq1jg@mail.gmail.com> <4268201.z3YH5P6ntS@pintsize.usersys.redhat.com> <CABcZeBMg_QjHQf3b1mJcuDtCH1o2Gpv=YDdDPkAu5GwEhVaCfg@mail.gmail.com>
From: Benjamin Kaduk <bkaduk@akamai.com>
Message-ID: <c83f4ada-f3e7-12f5-aedd-f41ff5e80665@akamai.com>
Date: Mon, 7 Nov 2016 17:50:46 -0600
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0
MIME-Version: 1.0
In-Reply-To: <CABcZeBMg_QjHQf3b1mJcuDtCH1o2Gpv=YDdDPkAu5GwEhVaCfg@mail.gmail.com>
Content-Type: multipart/alternative; boundary="------------4754098A842AE1458708CF1B"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/8LgYNPHuJPAooVEssJeqfqig1SQ>
Cc: Matt Caswell <matt@openssl.org>, "tls@ietf.org" <tls@ietf.org>
Subject: [TLS] (strict) decoding of legacy_record_version?
X-BeenThere: tls@ietf.org
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." <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: Mon, 07 Nov 2016 23:50:50 -0000

(was Re: [TLS] PR#625: Change alert requirements)

Digging up an old sub-thread...

On 09/20/2016 08:03 AM, Eric Rescorla wrote:
>
>     in Record Layer there's the following text:
>
>         legacy_record_version : This value MUST be set to { 3, 1 } for all
>         records. This field is deprecated and MUST be ignored for all
>     purposes.
>
>     in Record Layer Protection there's the following text:
>
>         legacy_record_version : The legacy_record_version field is
>     identical to
>         TLSPlaintext.legacy_record_version and is always { 3, 1 }.
>     Note that the
>         handshake protocol including the ClientHello and ServerHello
>     messages
>         authenticates the protocol version, so this value is redundant.
>
>     which doesn't say if the version can be ignored completely
>     (skipped while
>     parsing) or if it should be verified.
>
>
> These are different fields.
>

There's still the question of whether the receiver should enforce 0x0301
in either/both cases.
OpenSSL is implementing and seems to be reading the spec that it MUST be
ignored (even though I guess strictly speaking that MUST only applies
before record protection is engaged); if I'm doing my code survey
correctly, Mint and NSS always enforce, and Boring only checks the first
octet.

Is there a reason to not do strict enforcement?

-Ben