Re: [quicwg/base-drafts] Authenticate connection IDs (#3499)

David Schinazi <notifications@github.com> Wed, 11 March 2020 02:18 UTC

Return-Path: <noreply@github.com>
X-Original-To: quic-issues@ietfa.amsl.com
Delivered-To: quic-issues@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4F8EB3A0F2F for <quic-issues@ietfa.amsl.com>; Tue, 10 Mar 2020 19:18:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.1
X-Spam-Level:
X-Spam-Status: No, score=-3.1 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, SPF_HELO_NONE=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=github.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 8X719URUJL7z for <quic-issues@ietfa.amsl.com>; Tue, 10 Mar 2020 19:18:21 -0700 (PDT)
Received: from out-21.smtp.github.com (out-21.smtp.github.com [192.30.252.204]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 54CE93A0F37 for <quic-issues@ietf.org>; Tue, 10 Mar 2020 19:18:21 -0700 (PDT)
Received: from github-lowworker-cd7bc13.ac4-iad.github.net (github-lowworker-cd7bc13.ac4-iad.github.net [10.52.25.102]) by smtp.github.com (Postfix) with ESMTP id 64A8AA044C for <quic-issues@ietf.org>; Tue, 10 Mar 2020 19:18:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1583893100; bh=iHUlfloyDifj3+PH3BtT++gTCdos1MKTixmqQ1k6wc4=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID: List-Archive:List-Post:List-Unsubscribe:From; b=OtG/iPyBBIoRNW9pk9F9GM9WfiNqLLhd0AAl2Z6J+AT5hpSG6EUrZ07N+1wIL2ITv FDMAVJv33Pq8X2iPMpFkR5aKJ97NyEfEv6Zf3VHoL935Sri5VOAxxyoqrlJLr7GzWy 7Gtrv2SpgOKRowTxZkrN9EwmdE0IyFoSRr5+NXJI=
Date: Tue, 10 Mar 2020 19:18:20 -0700
From: David Schinazi <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+AFTOJK72O2WNJMUWBNREZ6N4OQVWZEVBNHHCESD76A@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/pull/3499/review/372435145@github.com>
In-Reply-To: <quicwg/base-drafts/pull/3499@github.com>
References: <quicwg/base-drafts/pull/3499@github.com>
Subject: Re: [quicwg/base-drafts] Authenticate connection IDs (#3499)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5e684a6c539eb_12043fe358ccd96013775"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: DavidSchinazi
X-GitHub-Recipient: quic-issues
X-GitHub-Reason: subscribed
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: quic-issues@ietf.org
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/gR499M5RHLGkw7bLkdt_aT4VRG0>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.29
List-Id: Notification list for GitHub issues related to the QUIC WG <quic-issues.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic-issues/>
List-Post: <mailto:quic-issues@ietf.org>
List-Help: <mailto:quic-issues-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 11 Mar 2020 02:18:23 -0000

DavidSchinazi approved this pull request.

Thanks for writing this! I support this change and only have minor nits.

> +verifying them ensures that the choice of connection ID cannot be influenced by
+an attacker. An endpoint MUST treat any of the following as a connection error
+of type PROTOCOL_VIOLATION:
+
+* absence of the handshake_connection_id transport parameter from either
+  endpoint,
+
+* absence of the original_connection_id transport parameter from the server,
+
+* absence of the retry_connection_id transport parameter from the server after
+  receiving a Retry packet,
+
+* presence of the retry_connection_id transport parameter when no Retry packet
+  was received, or
+
+* a mismatch between values of these transport parameters and the Destination

I think you mean `a mismatch between values of these transport parameters and the respective Connection ID fields an endpoint used.` since it doesn't just protect destination

> @@ -1522,9 +1560,10 @@ specify whether they MUST, MAY, or MUST NOT be stored for 0-RTT. A client need
 not store a transport parameter it cannot process.
 
 A client MUST NOT use remembered values for the following parameters:
-original_connection_id, preferred_address, stateless_reset_token, and
-ack_delay_exponent. The client MUST use the server's new values in the
-handshake instead, and absent new values from the server, the default value.
+ack_delay_exponent, handshake_connection_id, original_connection_id,

Shouldn't `original_connection_id` stay in this list? And what about `handshake_connection_id`?

> @@ -4357,13 +4395,15 @@ A client MUST NOT reset the packet number for any packet number space after
 processing a Retry packet; {{packet-0rtt}} contains more information on this.
 
 A server acknowledges the use of a Retry packet for a connection using the
-original_connection_id transport parameter (see
-{{transport-parameter-definitions}}).  If the server sends a Retry packet, it
+retry_connection_id transport parameter; see
+{{transport-parameter-definitions}}. If the server sends a Retry packet, it

We may want to rephrase this to more clearly state that `original_connection_id` is always filled in by the server

> @@ -4572,9 +4612,8 @@ original_connection_id (0x00):
 
 : The value of the Destination Connection ID field from the first Initial packet
   sent by the client.  This transport parameter is only sent by a server.  This
-  is the same value sent in the "Original Destination Connection ID" field of a
-  Retry packet (see {{packet-retry}}).  A server MUST include the
-  original_connection_id transport parameter if it sent a Retry packet.
+  is the same value sent in the "Original Destination Connection ID" field that

Thanks for catching that, my bad for missing it.

> @@ -4742,6 +4781,22 @@ active_connection_id_limit (0x0e):
   When a zero-length connection ID is being used, the active_connection_id_limit
   parameter MUST NOT be sent.
 
+handshake_connection_id (0x0f):
+
+: The value that the endpoint included in the Source Connection ID field of the
+  first Initial packet it sends during the handshake. Endpoints MUST validate
+  that this transport parameter is present and that it matches the value that
+  was received in Initial packets. Authenticating this value ensures that an
+  attacker is unable to influence the selection of connection IDs during the

to avoid jinxing things, how about `Authenticating this value mitigates an attacker's ability to influence the selection of connection IDs during the handshake.`

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/3499#pullrequestreview-372435145