Re: [TLS] Empty extensions don't go last

Andrei Popov <Andrei.Popov@microsoft.com> Thu, 24 March 2016 17:33 UTC

Return-Path: <Andrei.Popov@microsoft.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 2B31D12D6C1 for <tls@ietfa.amsl.com>; Thu, 24 Mar 2016 10:33:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.003
X-Spam-Level:
X-Spam-Status: No, score=-2.003 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=microsoft.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 KNkG1zk_6AfB for <tls@ietfa.amsl.com>; Thu, 24 Mar 2016 10:33:30 -0700 (PDT)
Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0121.outbound.protection.outlook.com [207.46.100.121]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 673B112D69A for <tls@ietf.org>; Thu, 24 Mar 2016 10:33:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=/bEgYSgY56suuhyMszVr+R/SRF+HyrlqGQyP5EbRuVQ=; b=ngaiW6AqBaWhN7NuUkwgKl7wqO79m1sbxIENh54f7VLYl5ASbLMVmy+xTfCKIz4bDXlMugQLA0GGjEpfkNrX376iCfITraMqIf/lLBc0Mu46JBaNc3Oer20Ju2/It95+MM+ayCJkNwMLLe89XXhUeb0dmXLs0X6Mjw3OW6xC5CE=
Received: from BLUPR03MB1396.namprd03.prod.outlook.com (10.163.81.142) by BLUPR03MB1395.namprd03.prod.outlook.com (10.163.81.141) with Microsoft SMTP Server (TLS) id 15.1.434.16; Thu, 24 Mar 2016 17:33:29 +0000
Received: from BLUPR03MB1396.namprd03.prod.outlook.com ([10.163.81.142]) by BLUPR03MB1396.namprd03.prod.outlook.com ([10.163.81.142]) with mapi id 15.01.0434.023; Thu, 24 Mar 2016 17:33:29 +0000
From: Andrei Popov <Andrei.Popov@microsoft.com>
To: Wan-Teh Chang <wtc@google.com>, Martin Thomson <martin.thomson@gmail.com>
Thread-Topic: [TLS] Empty extensions don't go last
Thread-Index: AQHRhY5NbiqsMo+6OUmS/1R85gL06Z9oK64AgACuj0A=
Date: Thu, 24 Mar 2016 17:33:28 +0000
Message-ID: <BLUPR03MB1396988A797C810181D4CF348C820@BLUPR03MB1396.namprd03.prod.outlook.com>
References: <CABkgnnW46PCE1xSk3oSs_Q1TDhv-dy20ya+Fn19EGeA+wvU7dA@mail.gmail.com> <CALTJjxEMQPQgMsyxMVKQjBywb4LNnCMnCFhp7nDEUZzUA19JmA@mail.gmail.com>
In-Reply-To: <CALTJjxEMQPQgMsyxMVKQjBywb4LNnCMnCFhp7nDEUZzUA19JmA@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: google.com; dkim=none (message not signed) header.d=none;google.com; dmarc=none action=none header.from=microsoft.com;
x-originating-ip: [2001:4898:80e8:d::1d2]
x-ms-office365-filtering-correlation-id: 8c8ba735-18e7-49fd-6fb6-08d3540a69d6
x-microsoft-exchange-diagnostics: 1; BLUPR03MB1395; 5:MwTQwxRx2geNiM6j/kUTOEQdCChnTn0NjV/J9hMKczMmYP0hDY/dlo0dLUK8mhg3Lh3JiLq/xW/OW4PgTizDze+M7Fq+dHl7err62AYVFp4kS9FmfMTv3iMbKc3k1spKwOGnjwwhnDMZDWslUgmPzg==; 24:H4hUHSoYEZ84mHXrr1vFDLm5YJc227lacmQwWb2NKbaK/A1nF2IHEX7oZvD3s6sKdxaHgMsW9dXq66miEFgAewV51em12lN57kBigsVpB58=
x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB1395;
x-microsoft-antispam-prvs: <BLUPR03MB13955E986B92B8B11DDE64CA8C820@BLUPR03MB1395.namprd03.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:;
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(61425038)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(61426038)(61427038); SRVR:BLUPR03MB1395; BCL:0; PCL:0; RULEID:; SRVR:BLUPR03MB1395;
x-forefront-prvs: 0891BC3F3D
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(13464003)(377454003)(24454002)(5002640100001)(19580405001)(92566002)(122556002)(10090500001)(5004730100002)(5001770100001)(189998001)(10400500002)(11100500001)(10290500002)(586003)(575784001)(19580395003)(86362001)(5005710100001)(33656002)(50986999)(54356999)(76176999)(106116001)(5003600100002)(99286002)(74316001)(2950100001)(2900100001)(1096002)(6116002)(2906002)(87936001)(102836003)(77096005)(4326007)(76576001)(15975445007)(3660700001)(5008740100001)(3280700002)(1220700001)(3826002); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR03MB1395; H:BLUPR03MB1396.namprd03.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en;
spamdiagnosticoutput: 1:23
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Mar 2016 17:33:28.9251 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB1395
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/ie14s8v3_nR0WDDO98dtGsgxSO8>
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] Empty extensions don't go last
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: Thu, 24 Mar 2016 17:33:33 -0000

Yes, we found this a while ago as well, and had to move extensions around.

Cheers,

Andrei

-----Original Message-----
From: TLS [mailto:tls-bounces@ietf.org] On Behalf Of Wan-Teh Chang
Sent: Thursday, March 24, 2016 12:04 AM
To: Martin Thomson <martin.thomson@gmail.com>;
Cc: tls@ietf.org
Subject: Re: [TLS] Empty extensions don't go last

On Wed, Mar 23, 2016 at 10:30 PM, Martin Thomson <martin.thomson@gmail.com>; wrote:
> (This is probably already known to a bunch of people, but it's 
> probably a good idea to put out there.)
>
> When deploying EMS, we recently discovered, with the help of our 
> friends at Google (who discovered this long before that) a quirk in 
> some implementations.
>
> Short story:  Don't place an empty extension at the end of your 
> ClientHello.  You will find that a small number of servers choke.

This interop problem surfaces when we added to Chrome the signed_certificate_timestamp extension for Certificate Transparency (RFC 6962):

https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fbugs.chromium.org%2fp%2fchromium%2fissues%2fdetail%3fid%3d353009%23c4&data=01%7c01%7cAndrei.Popov%40microsoft.com%7c916a8a6aa2eb4b8fd3e908d353b28e2d%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=YUuVpA6X5QhQZGOS%2bHbs30ooKE%2bW9U0W4cr6tG%2bbKEo%3d
https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fbugs.chromium.org%2fp%2fchromium%2fissues%2fdetail%3fid%3d363583%23c13&data=01%7c01%7cAndrei.Popov%40microsoft.com%7c916a8a6aa2eb4b8fd3e908d353b28e2d%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=ddplXkVwDs4SMUaRpcdc0TY%2fipYDB8rYwWeTAsvc0Kc%3d
https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fcodereview.chromium.org%2f240633006&data=01%7c01%7cAndrei.Popov%40microsoft.com%7c916a8a6aa2eb4b8fd3e908d353b28e2d%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=5bQKBz4Y8R%2fmVKHLzpbnVBOj428W0T3regpgaBkl0MY%3d

The change that David Benjamin made to
ssl3_CalculatePaddingExtensionLength() in his patch probably should also be considered if the padding extension (RFC 7685) is placed at the end:

https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fcodereview.chromium.org%2f240633006%2fdiff%2f110001%2fnet%2fthird_party%2fnss%2fssl%2fssl3ext.c&data=01%7c01%7cAndrei.Popov%40microsoft.com%7c916a8a6aa2eb4b8fd3e908d353b28e2d%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=jH5GKij0h%2boPSy4BaRvePsiN7zx2gycuSYraYDiTS4E%3d

Wan-Teh Chang

_______________________________________________
TLS mailing list
TLS@ietf.org
https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fwww.ietf.org%2fmailman%2flistinfo%2ftls&data=01%7c01%7cAndrei.Popov%40microsoft.com%7c916a8a6aa2eb4b8fd3e908d353b28e2d%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=gdOOA8X6H1QMVzL3JLh%2b%2f0YHesyIQKZjjhimdP3%2fYn0%3d