Re: [quicwg/base-drafts] Increase resilience to spoofed Version Negotiation packets (#524)

Mike Bishop <notifications@github.com> Tue, 16 May 2017 22:29 UTC

Return-Path: <bounces+848413-a050-quic-issues=ietf.org@sgmail.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 189E7129BAF for <quic-issues@ietfa.amsl.com>; Tue, 16 May 2017 15:29:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.8
X-Spam-Level:
X-Spam-Status: No, score=-4.8 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_MSPIKE_H2=-2.8, RP_MATCHES_RCVD=-0.001, 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=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 MyvF66xgPc2B for <quic-issues@ietfa.amsl.com>; Tue, 16 May 2017 15:29:52 -0700 (PDT)
Received: from o4.sgmail.github.com (o4.sgmail.github.com [192.254.112.99]) (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 0CF9112EC7A for <quic-issues@ietf.org>; Tue, 16 May 2017 15:25:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=github.com; h=from:reply-to:to:cc:in-reply-to:references:subject:mime-version:content-type:content-transfer-encoding:list-id:list-archive:list-post:list-unsubscribe; s=s20150108; bh=KaAfHvEkAEt7wIjS0hcpkeA3NDc=; b=GwTAIDg5SV4B2g7h C76Y5Nq50s4A1cH9hnE9fQKKD1y24Ie6H18SuH8yqTzCunq51liDHfO0za+IMeIz zhzj6JPtLiuDpU9Az+LkuxLTz35eZQBFkinf9KBLCxuNOCu8PcGcjO//Fja4+Ht0 iP1IGFE1nVMIxw4bh/VS1qrANP0=
Received: by filter0428p1mdw1.sendgrid.net with SMTP id filter0428p1mdw1-1132-591B7C08-79 2017-05-16 22:24:08.851083822 +0000 UTC
Received: from github-smtp2a-ext-cp1-prd.iad.github.net (github-smtp2a-ext-cp1-prd.iad.github.net [192.30.253.16]) by ismtpd0005p1iad1.sendgrid.net (SG) with ESMTP id DYfgfoK_QBWr5Aa2alYf5w for <quic-issues@ietf.org>; Tue, 16 May 2017 22:24:08.901 +0000 (UTC)
Date: Tue, 16 May 2017 15:24:08 -0700
From: Mike Bishop <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+0166e4ab340e4fc3a9318071e3cab912c3579b0c672fb00092cf0000000115333e0892a169ce0d99fec5@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/pull/524/review/38528721@github.com>
In-Reply-To: <quicwg/base-drafts/pull/524@github.com>
References: <quicwg/base-drafts/pull/524@github.com>
Subject: Re: [quicwg/base-drafts] Increase resilience to spoofed Version Negotiation packets (#524)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_591b7c08b4dbb_4b6e3fd8ed905c30112192"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: MikeBishop
X-GitHub-Recipient: quic-issues
X-GitHub-Reason: subscribed
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: quic-issues@ietf.org
X-SG-EID: l64QuQ2uJCcEyUykJbxN122A6QRmEpucztpreh3Pak1lTNw+/3BhJHz2fujeIn2/gsOUgOLMkdvCW9 rWSsVJtJ1q765svjrEcUeZDAv3/I975Fmwh1oX7OvxwP8rU1jvZ3hIsWWROOE9yyG8OGzwchiHCUU7 uB/ofCNsm0QUUL8N5FnTCNyC42+hDdNYbKAbehu4mLk0uei+srwF3saj/b9KDgK3aWe7gdXzsPvd15 w=
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/NreGcS6uyv13y-5G7RZPrN4HOjo>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.22
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: Tue, 16 May 2017 22:29:54 -0000

MikeBishop requested changes on this pull request.

First part seems good; second part makes me a little sad.

> @@ -1228,6 +1235,18 @@ client MUST terminate with a QUIC_VERSION_NEGOTIATION_MISMATCH error code if
 version negotiation occurred but it would have selected a different version
 based on the value of the supported_versions list.
 
+If the client receives a Version Negotiation packet and these validation checks
+subsequently fail, it is likely that the client received a spoofed Version
+Negotiation packet.  A client MAY attempt to create a new connection and ignore
+any Version Negotiation packets that match those that caused the connection to
+fail.
+
+Note:
+
+: The client cannot rely on the version list from the transport parameters.

I'd rephrase this -- the client certainly *can* rely on that list -- once the handshake has completed.

> -uses on every packet it sends.  Packets MUST continue to use long headers and
-MUST include the new negotiated protocol version.
+A client MUST discard a Version Negotiation packet that does not contain Packet
+Number and Version fields that match those fields in a packet that the client
+previously sent.  This doesn't guarantee that the Version Negotiation packet is
+genuine, but it reduces the chances that the packet is spoofed.
+
+A client that receives a valid Version Negotiation packet selects an acceptable
+protocol version from those listed by the server.  The client then reattempts to
+create a connection using that version.  Though the contents of a packet might
+not change in response to version negotiation, a client MUST choose a new packet
+number it uses on every packet it sends.
+
+If the server does not list an acceptable version, the client MAY ignore the
+Version Negotiation packet.  This might reduce the likelihood that a spoofed
+Version Negotiation packet can be used to disrupt connection establishment.

This seems very painful if there is a real mismatch.  We've already blocked out injected packets, and I suspect that legitimate failures will be more common.

-- 
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/524#pullrequestreview-38528721