NEW_CONNECTION_ID sequence numbers

Martin Thomson <mt@lowentropy.net> Wed, 05 January 2022 05:57 UTC

Return-Path: <mt@lowentropy.net>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1A2DB3A2632 for <quic@ietfa.amsl.com>; Tue, 4 Jan 2022 21:57:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=lowentropy.net header.b=Bg51uXDT; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=XRn6vufc
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 r0fXghvN_Geq for <quic@ietfa.amsl.com>; Tue, 4 Jan 2022 21:57:23 -0800 (PST)
Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id EC8FF3A2630 for <quic@ietf.org>; Tue, 4 Jan 2022 21:57:22 -0800 (PST)
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 01C9D320051E for <quic@ietf.org>; Wed, 5 Jan 2022 00:57:20 -0500 (EST)
Received: from imap41 ([10.202.2.91]) by compute3.internal (MEProxy); Wed, 05 Jan 2022 00:57:21 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lowentropy.net; h=mime-version:message-id:date:from:to:subject:content-type; s= fm1; bh=wUvwIXx8Y1JchvnjtP9hbQRJcKIY4RLLacQMJqw8vvw=; b=Bg51uXDT bz06knOxXSPLn83QiG1aJ07d+ULTMnwme/ffmrW8gIZHfazhqC3gAMYzutw8jI3I sy3G+bBsV2/XPQ20VWQ0BNKZtee5/D1+LArGC0gqmZ7VHtiZaykxdG6sjzgF7G32 Tl6u+rzZTkXSjN2HBlXQXXoEN9psAWhVJGKLxNQsrImPCzRM4ZIslKdKrcx+mU93 oHvIPpCGk6awOvNFiL194W8XTcPdw3LwrsQN6sVlhB+Bp1mY54S+if22UnG64ZLW D3NoAe99e15bfmgvrN3ejZ99Rlq879vQd2mOJ835Ll6h25SonUlUUNRYwMC5g6dT CeyG9MdhMCV7KQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=wUvwIXx8Y1JchvnjtP9hbQRJcKIY4 RLLacQMJqw8vvw=; b=XRn6vufcBk/HQRDskNpV6PeUcLkoJaT/oOMkdfNufiEA0 xtpIu5xlnE2ihOWpkIOpeQ7WDEfbyLoQaMwSuM8p3lqVH7x9rCg3eKMgM8SaaX4W 36AyBmZ72V9P5LWFVzM3jPX5BrP2zgUy2gHgrj4IuNK4i5XEPZap8cJEcwKWbvU+ lExHtMcjyuxiw0BAWyDpCDDD5nxj4Q6wHE+3h+ITT4YgLK9C8SfTG+nyidv6DFjP s1+/jej94GzHbixgWz8zSd1DVVslDWl2mhmfbNGqDFyTL5M3ARjP4seqA3n/ybBy SMRMzwcAYoMCsmtEI7QqVvasbzTh8lmlu9Gof9rXQ==
X-ME-Sender: <xms:QDPVYf-8wg-cQsX9Nnferl-TmHMTQopiNneKA_k6Nqi1G4V8JKDZ5Q> <xme:QDPVYbuuwVA-GwITZG4U-2a2bpCRTHa_Dl-3x3aqgdyj5yEQt8hf1_sujfTLkz9I9 aW9zUPPtTnKXkiDoGE>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudefgedgkeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfffhffvufgtsehttdertd erredtnecuhfhrohhmpedfofgrrhhtihhnucfvhhhomhhsohhnfdcuoehmtheslhhofigv nhhtrhhophihrdhnvghtqeenucggtffrrghtthgvrhhnpeejteefgfejudeltddtiedugf fffeefkeffudetgeegjeeuffdtueeugffgteefheenucffohhmrghinhepqhhuihgtfihg rdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epmhhtsehlohifvghnthhrohhphidrnhgvth
X-ME-Proxy: <xmx:QDPVYdC_N5vAlsjfuvyxsWHS-HRkzTkKSisDth3a4IGU9niwNLj8gQ> <xmx:QDPVYbf3tKU1T3IVgwXXybhv1UBrOW9-yUlhIkvFk-qp6RDxwetmaw> <xmx:QDPVYUOnk2897XkH8mFZ3JsJNNFiNbdVEkl6Bs8WnWgk5AOX20nKqg> <xmx:QDPVYaYoqDklRK2TQmNq_T7ZB235fdjgy6zxMUDX1WhQbujAtS3HDQ>
Received: by mailuser.nyi.internal (Postfix, from userid 501) id 1425C3C0465; Wed, 5 Jan 2022 00:57:20 -0500 (EST)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.5.0-alpha0-4525-g8883000b21-fm-20211221.001-g8883000b
Mime-Version: 1.0
Message-Id: <27e024ed-a78f-416e-869d-82930c7388a3@beta.fastmail.com>
Date: Wed, 05 Jan 2022 16:56:59 +1100
From: Martin Thomson <mt@lowentropy.net>
To: quic@ietf.org
Subject: NEW_CONNECTION_ID sequence numbers
Content-Type: text/plain
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/254-t-QaVFxl5U5Mp9VMMlm9oT0>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 05 Jan 2022 05:57:28 -0000

Hey,

I discovered a problem in my implementation of NEW_CONNECTION_ID that quicly didn't like.  I was always skipping sequence number 1, even when there was no preferred address, which caused quicly to think that I was exceeding the limits it set.

Kazuho, Jana, and I all agree that my code was wrong, but I found it pretty hard to clearly identify how this was specified in the spec.  Here's what it says:

>  The sequence number of the initial connection ID is 0. If the preferred_address transport parameter is sent, the sequence number of the supplied connection ID is 1.
> 
> Additional connection IDs are communicated to the peer using NEW_CONNECTION_ID frames (Section 19.15). The sequence number on each newly issued connection ID MUST increase by 1.

-- https://quicwg.org/base-drafts/rfc9000.html#name-issuing-connection-ids

Is it abundantly clear that I'm wrong based on this?  Did I miss a clearer piece of text elsewhere?  Or, should we be looking to open an erratum?

Cheers,
Martin