Re: [TLS] ESNI PRs #124 and #125: Improving ESNI Robustness and GREASE

Roelof DuToit <r@nerd.ninja> Thu, 14 February 2019 20:25 UTC

Return-Path: <r@nerd.ninja>
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 DF7DE13118D for <tls@ietfa.amsl.com>; Thu, 14 Feb 2019 12:25:27 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 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_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nerd.ninja
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 CbhiLE6ww3hc for <tls@ietfa.amsl.com>; Thu, 14 Feb 2019 12:25:24 -0800 (PST)
Received: from sender-of-o52.zoho.com (sender-of-o52.zoho.com [135.84.80.217]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9DCB71311EA for <tls@ietf.org>; Thu, 14 Feb 2019 12:25:24 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1550175914; cv=none; d=zoho.com; s=zohoarc; b=LOXFnxSBGDQKZSEKmbfCYYheBykem+JKKq6EXYuiV78EUOfl1mWVH9pNrULopE7y+28OCwtMpXUVNDLoJG33AR9GDZEAtrIZeEmMGvg0rE/aBzDQ5wC86oP/yxZ9SmUYGeOspxrTjsyxvAJXPI7Br87J7vnzg6WTHrQucNXi8bg=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1550175914; h=Content-Type:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=ypP9VBNSDzuy7NOdIhbiDuiCXV45zR7mj4qCuyvnRho=; b=SQ3x81ES9v2dLoSYoPH41h+bkxXa1GkeLtLohUVtENv6zA2Qk/dxnqCMlLtERiOp6DDPfjUSjMAnngLgMMi/em5vGPnaAAelo3zWpN3cStmWbtXAXwWBemGRUKMX1pEZi5PpMICefkaFHbAMXweysqK9Sl4VXinHyXNYKGPCXAI=
ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=nerd.ninja; spf=pass smtp.mailfrom=r@nerd.ninja; dmarc=pass header.from=<r@nerd.ninja> header.from=<r@nerd.ninja>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1550175914; s=zoho; d=nerd.ninja; i=r@nerd.ninja; h=Date:From:To:Cc:Message-Id:In-Reply-To:References:Subject:MIME-Version:Content-Type; l=15506; bh=ypP9VBNSDzuy7NOdIhbiDuiCXV45zR7mj4qCuyvnRho=; b=pVR6YvLXnPPaZYi1W6198GQESwEwt9KXf7kziTXjTmVNH8zqMmM6fl/vdriFSsfw tvNrbGtBwdkpwOgl+t1du1+AB/aNkfnng8apFE+/fRGAm0Yd3A9VruypxIua6TDdTd4 4QGgjWbGxCh68FJioz41NOxfeBuLdE4nda7p/uUc=
Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1550175908407321.3607987078998; Thu, 14 Feb 2019 12:25:08 -0800 (PST)
Date: Thu, 14 Feb 2019 15:25:08 -0500
From: Roelof DuToit <r@nerd.ninja>
To: David Benjamin <davidben@chromium.org>
Cc: Christopher Wood <christopherwood07@gmail.com>, TLS WG <tls@ietf.org>
Message-Id: <168edaf3233.104d73d5e24703.2816492539373755558@nerd.ninja>
In-Reply-To: <CAF8qwaBdQeZS=bmFC955XzrVyNubB7h0WPiAQp0eZnf__Xov3Q@mail.gmail.com>
References: <714E43FA-3660-485A-8E50-04EE43F8DA2E@gmail.com> <168e9a61d1e.cce5c9ea206228.28832954982140191@nerd.ninja> <CAF8qwaD1qSZWs-14WF3sYo1cKK4jjSoce3JaQzfj7HqmWOTKjA@mail.gmail.com> <168ed8bb0f5.1026877c920218.3245439195642672251@nerd.ninja> <CAF8qwaBdQeZS=bmFC955XzrVyNubB7h0WPiAQp0eZnf__Xov3Q@mail.gmail.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_Part_80932_982993558.1550175908403"
X-Priority: Medium
User-Agent: Zoho Mail
X-Mailer: Zoho Mail
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/VH7MxqIGx7fY7EBvHW799Nm8dgY>
Subject: Re: [TLS] ESNI PRs #124 and #125: Improving ESNI Robustness and GREASE
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.29
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, 14 Feb 2019 20:25:28 -0000

---- On Thu, 14 Feb 2019 15:13:11 -0500 David Benjamin <davidben@chromium.org> wrote ----






On Thu, Feb 14, 2019 at 1:46 PM Roelof DuToit <mailto:r@nerd.ninja> wrote:









---- On Thu, 14 Feb 2019 13:00:16 -0500 David Benjamin <mailto:davidben@chromium.org> wrote ----







On Wed, Feb 13, 2019 at 7:37 PM Roelof DuToit <mailto:r@nerd.ninja> wrote:



Questions for PR [1]:



* Regarding this text:

The client MUST NOT use the server-provided retry keys until the handshake completes successfully. On success, it MUST NOT overwrite the DNS-provided keys with the retry keys. It MUST use the retry keys at most once and continue offering DNS-provided keys for subsequent connections. This avoids introducing a tracking vector, should a malicious server present client-specific retry keys.



.. specifically this part: ".. use the retry keys at most once".  

Q1: Are you saying the client should persistently remember which public_name values triggered retry keys?  For how long?






No, exactly the opposite. You use the retry key for just the retry and then forget about it.

https://mailarchive.ietf.org/arch/msg/tls/xBEHe1_CcYEYinZQHxWGq8vjA0Q












I understood that part.   Let my clarify my question with an example:



A1. Client uses DNS-provided keys, and server returns retry keys

A2. Client uses retry keys, and everything works..

A3. Client restarts

A4. Client uses DNS-provided keys, and server returns the same retry keys as in A1

A5. Client violates spec by using those retry keys for a second time?



And what about this example:



B1. Client uses DNS-provided keys, and server returns retry keys

B2. Client uses retry keys, and everything works..

B3. Client uses DNS-provided keys, and server returns retry keys

B4. Client violates spec by using those retry keys for a second time?






Oh, I see. Yeah, that's just a mistake in the text. A5 and B4 aren't meant to be violations, since the client saw the retry keys again. I'll wordsmith that too in the next iteration.








Could a MITM (the kind that can finish the handshake) set esni_retry_request every time it sees an unknown record_digest in the ESNI extension, and essentially use the retry mechanism to subvert the intent of ESNI?









 







Q2: What happens if fronting server A sent retry keys, and the subsequent transport connection ends up on server B, which also sends retry keys?






You keep retrying. And hen you hit the text which says:



> Clients SHOULD implement a limit on retries caused by "esni_retry_request" or

> servers which do not acknowledge the "encrypted_server_name" extension.




This is an error-correcting mechanism to avoid deployment risks. If your TLS deployment is so out of sync with itself that:



- It deployed ESNI keys in the DNS that your servers do not understand.

- Even on a retry to presumably the same IP address, you hit a different server node.

- Your load balancer keeps bouncing between different server nodes connections right after each other.

- Each of your server nodes believes in a totally disjoint set of ESNI keys.



Then I think giving up and failing the connection is not the end of the world.



 



--Roelof





---- On Wed, 13 Feb 2019 17:15:57 -0500 Christopher Wood <mailto:christopherwood07@gmail.com> wrote ----










Hi folks,



PRs [1] and [2] need a little more review before we merge since 

they’re non-trivial changes. Please have a look and let the list know 

if you have objections with the contents therein. Otherwise, we will 

merge them by the end of the next week.



Thanks!

Chris (no hat)








[1] https://github.com/tlswg/draft-ietf-tls-esni/pull/124






[2] https://github.com/tlswg/draft-ietf-tls-esni/pull/125



_______________________________________________

TLS mailing list

mailto:TLS@ietf.org

https://www.ietf.org/mailman/listinfo/tls






_______________________________________________

TLS mailing list

mailto:TLS@ietf.org

https://www.ietf.org/mailman/listinfo/tls