Re: QUIC Version Negotiation Extension

David Schinazi <dschinazi.ietf@gmail.com> Mon, 04 November 2019 22:09 UTC

Return-Path: <dschinazi.ietf@gmail.com>
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 22FA5120B10 for <quic@ietfa.amsl.com>; Mon, 4 Nov 2019 14:09:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.997
X-Spam-Level:
X-Spam-Status: No, score=-1.997 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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=gmail.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 4dV3Jbw4gHK7 for <quic@ietfa.amsl.com>; Mon, 4 Nov 2019 14:09:34 -0800 (PST)
Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A3903120AB7 for <quic@ietf.org>; Mon, 4 Nov 2019 14:09:33 -0800 (PST)
Received: by mail-lf1-x130.google.com with SMTP id j14so13463711lfb.8 for <quic@ietf.org>; Mon, 04 Nov 2019 14:09:33 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mfnisDyRIVW7eDzYB99yOk97IR/LDGbl8AKw3bepw1I=; b=ND3u8KRvw+ZB1O3otmcLf34W5s+9u6lXLLjnKSC6QzRjXMdku/VULcqzv5NzIhh/+0 v0Oqj41TCDSvU+aalFrpPVj+dcaVxP04tYX//yf+zRxWCY/VAbjycJp+IwZzYMeH2Bqh P7ONNWKS0FAW1Mp5Q/24TUOvsExQu6ZqzPwb+V+GLLzP1207bWh7mt1h/EUoGwbDY79r H+NvclUDwLB23TVE2ELCgEuzCovjKUgQxcB9r1LWKM2e1isqs06Bo/hC5gynopR61of5 JA99x+x2yCYx85yz0FDqe+8HWG0NnHs63xQovipaepr9p60pf5PBaB04l0hqn7jpZest 2QaQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mfnisDyRIVW7eDzYB99yOk97IR/LDGbl8AKw3bepw1I=; b=kKcFSgiD8Dmn3cRWnG1LXO+N1w7Br4HJIDvhKw8fQo/E8YZ6vZQgyR6Smn1ROW0w7m Q2Hytyw4hOCXa2KI3RFzrNeF8wPLXI6cS/q1g1eNC0jWbJcQHKCBNostmxJBs1QD/keO GKQ1dETVKcrntRTllA1dK7cqpHDC0s4tj0laQDOP/+8quH+E12BAtqsE6fV1OqN9vDP6 tVA4fowu8ChXGhOyUolcn3dxvlbgy54kZTTTdE4tRlOscpn3gdG6+Bzr0QgQej3oWCbN FYz1+UCeEv4W8LaWRaM6+M/DqjQSP1NQWmOvWEfZICByN8ONyJlutlRRYqxwjh68Fis3 MmUA==
X-Gm-Message-State: APjAAAXfIywer3h6x1pSWaVBAnsNrWPxIlMVjQaBurUHGCZHnRDJLKtI wWMse7pdbRJtTDhwRbA3+FfsjQWiIaOtNbkOEi0esQM7
X-Google-Smtp-Source: APXvYqwRj3Q/N4ENifavWu0lZClVhRDx15Fw8B5VMQbXVAW4nCLr4Ryfpnr5EFxPskMsVEuTx5+EeTLAKQWQnMzBvlw=
X-Received: by 2002:ac2:434c:: with SMTP id o12mr18588477lfl.33.1572905371785; Mon, 04 Nov 2019 14:09:31 -0800 (PST)
MIME-Version: 1.0
References: <CAPDSy+4wrhqejh9k8=G7W267EgcT5Z2sDK7ZBGKtNn5kkbXGfg@mail.gmail.com> <CAN1APdcZv-MtwRT77++r6EKdzJUc1NKEJfY4CZeOSaK50nPZYg@mail.gmail.com>
In-Reply-To: <CAN1APdcZv-MtwRT77++r6EKdzJUc1NKEJfY4CZeOSaK50nPZYg@mail.gmail.com>
From: David Schinazi <dschinazi.ietf@gmail.com>
Date: Mon, 04 Nov 2019 14:09:20 -0800
Message-ID: <CAPDSy+5obMbiLDKYKXXg1ZthoMqyg60KD+6HR69CQqiEHb6W7g@mail.gmail.com>
Subject: Re: QUIC Version Negotiation Extension
To: Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com>
Cc: QUIC <quic@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000f35ea205968c91dc"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/tn-u5liMHiwute7pfWqGu_1wC2E>
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: Mon, 04 Nov 2019 22:09:43 -0000

Thanks for reading Mikkel! Responses inline.

On Mon, Nov 4, 2019 at 1:47 PM Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com>
wrote:

> (reposting on proper topic)
>
> Some random observations reading through the document
>
> - Is the order relevant in the receiver version list?
>

Yes all lists of versions are ordered.


> - It is tempting to just hash the received version list, but that requires
> agreeing on an algorithm, unless the algorithm is stated to be specific to
> that version, which is complicated.
>

Which list are you referring to? For all the ones in the draft, the peer
needs access to all the elements so I don't think a hash would help.


> - VERSION_NEGOTIATION_ERROR vs drop - I’m not sure it is a good idea to
> close the connection. The initials are public so it is possible to inject
> false versions. There are probably many other similar attacks we don’t
> bother with, but still …
>

Once we're this far in the handshake, we cannot recover from this error.
Dropping the packet will only make things worse.


> - Checking that a transport parameter field is the same as the long header
> version seems redundant - why have those fields? Is it because the Initial
> header fields are not sufficiently protected via TLS magic (or similar)?
>

Yes, this makes sure an attacker cannot spoof the version field in initial
packets.


> - We generally use varint, but why have varints mixed with 32-bit version
> lists? I suggest making the list length 32-bit for easier processing.
>

QUICv1 uses varints pretty much everywhere, we're sticking to that design
here.


> - Downgrade - I’m a bit worried about state management and server
> redeployments. A server could reject a valid packet because an Initial was
> routed to a new server. (Reading further, I see this is addressed). This is
> probably a pragmatic solution, but it has an assumption about eventual
> global coordination. I suspect something could be done here with tokens or
> CID routing, but it is not trivial.
>

Sounds interesting. Do you have a concrete proposal?


> - Security Considerations - perhaps it is worth noting the transport
> parameters need additional protection beyond the Initial packet protection?
> This follows from TLS, but if TLS is not being used, this can version
> negotiation even if other parts of the protocol version is not sensitive to
> this in that particular version.
>

draft-ietf-quic-transport section 7 requires transport parameters to be
authenticated.


> - Greasing 0x?a?a?a?a - I’m not really sure about the point of this.
> Especially if we get salted versions in separate proposal.
>

We follow the QUIC reserved version design here.


> - It is not immediately obvious if version negotiation can go on and on,
> or if it settles after at most one roundtrip one way or the other. This
> might depend on the client QUIC version, but that is a fuzzy term in this
> context.
>

It can only happen once, though it might be a good idea to make that
clearer.


> - Improve discussion of Previously Attempted Version. While the
> requirements are readable, the purpose of doing this check is less obvious.
> Presumably this deals with downgrade attacks, but more explanation would be
> appreciated.
>

The downgrade prevention section discusses the purpose of this field. What
details do you think we should add?

Mikkel
>
>
> On 4 November 2019 at 21.30.10, David Schinazi (dschinazi.ietf@gmail.com)
> wrote:
>
> Hi everyone,
>
> From the recent discussion on multiple PRs, it appears that there might be
> a need for downgrade-safe QUIC version negotiation, earlier than we
> expected.
>
> EKR and I updated our extension to hopefully suit these needs:
> https://tools.ietf.org/html/draft-schinazi-quic-version-negotiation-02
>
> Comments welcome here or on the GitHub (link in draft).
>
> Thanks,
> David
>
>