Re: [quicwg/base-drafts] Improve ACK_ECN frame encoding (e.g., use bit-vector) (#1439)

Kazuho Oku <notifications@github.com> Thu, 14 June 2018 12:47 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 B3B54131136 for <quic-issues@ietfa.amsl.com>; Thu, 14 Jun 2018 05:47:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.009
X-Spam-Level:
X-Spam-Status: No, score=-3.009 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, MAILING_LIST_MULTI=-1, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01, 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 TI8x5875PMwI for <quic-issues@ietfa.amsl.com>; Thu, 14 Jun 2018 05:47:33 -0700 (PDT)
Received: from o5.sgmail.github.com (o5.sgmail.github.com [192.254.113.10]) (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 891A0130F53 for <quic-issues@ietf.org>; Thu, 14 Jun 2018 05:47:33 -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=aVIuy79pef7pUg3QufrcciY7CKo=; b=kDf3OUQ9JJ6rGW3b 300burzPL1yv7CaXaM4cTjqgPLtbuOBN7a4S6QHHLxQUe59dmxx+GaIHITOYdBd5 7FM3MfGdn7xt6yd5pbDQecrGCevRUK4MhrFcIC/YUselivXCciBSnIPUQZy3WHLC fiL4zKVb1DhoONgyfxo+bNtt7W4=
Received: by filter0649p1las1.sendgrid.net with SMTP id filter0649p1las1-5953-5B2263E3-31 2018-06-14 12:47:31.701553714 +0000 UTC
Received: from github-lowworker7-cp1-prd.iad.github.net (unknown [192.30.252.47]) by ismtpd0023p1mdw1.sendgrid.net (SG) with ESMTP id WOw1z9QbTc--6FNNSnmrZw for <quic-issues@ietf.org>; Thu, 14 Jun 2018 12:47:30.955 +0000 (UTC)
Received: from github.com (localhost [127.0.0.1]) by github-lowworker7-cp1-prd.iad.github.net (Postfix) with ESMTP id 974FAA1D3C for <quic-issues@ietf.org>; Thu, 14 Jun 2018 05:47:30 -0700 (PDT)
Date: Thu, 14 Jun 2018 12:47:31 +0000
From: Kazuho Oku <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+0166e4ab19842090b646ad5e8ac3bf9cc21e1fa4724e8dd992cf00000001173a25e292a169ce13c0caa7@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/issues/1439/397281950@github.com>
In-Reply-To: <quicwg/base-drafts/issues/1439@github.com>
References: <quicwg/base-drafts/issues/1439@github.com>
Subject: Re: [quicwg/base-drafts] Improve ACK_ECN frame encoding (e.g., use bit-vector) (#1439)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5b2263e2956de_30ea3fc4087daf804688e1"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: kazuho
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: l64QuQ2uJCcEyUykJbxN122A6QRmEpucztpreh3Pak0NTR3+nrjXOLGliO+o+W73ZEC0nsLnDOPGet fb97H7kiVxtiDbO3A7sfbbtkSYAMIbPIg6VbsZUPCvTu5P86vaISxbXkbjIb1iFfe/OLmuZL+tQRob HW4/GAiwgbbG+NHOBU0RmpVL6hJRLxC59As4yXjKXavzwaer5VrrMeSIn3nXgfbTHJC1pl18nL3x1o A=
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/XGNzWPvZkLayY7g5rbpjG_8JFjk>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.26
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: Thu, 14 Jun 2018 12:47:36 -0000

> So the receiver at the point of sending an ACK has received PN=2,3,4 where 4 has a CE mark. Then the ACK will say: Largest PN=4, length=3, CE vector = 001.
> 
> But then arrives PN=4, 5, 5 before it is time to send the next ACK. So the duplicate of PN=4 has ECN=ECT(0), and first 5 has ECT(0) and second ECN-CE set. Thus the ACK will be:
Largest PN=5, length 4, CE vector 0001?
> https://github.com/quicwg/base-drafts/issues/1439#issuecomment-397246970 by @gloinul 

I'd assume that the second ACK will contain CE vector of 0010.

Quoting what @mikkelfj says, the specification can require one of the three behaviors. My understanding is that _b_ is the behavior we want in order to mitigate the impact of injection attacks racing against the original packet.

> Assume receiver does not detect or reject duplicate packets, but it does track an ACK backlog and there has some natural ACK dectection capability.
> If packet 4 in the above example first sets CE, this will be visible in the backlog. A second packet 4 without CE can then see that 4 is already pending ACK and can choose to a) overwrite the CE bit, b) do nothing since a packet is present, or c) use inclusive OR on the CE bit.
> https://github.com/quicwg/base-drafts/issues/1439#issuecomment-397256856 @mikkelfj 

> From my perspective receiver suppressing duplicated packets are a work saver for the receiver.
> https://github.com/quicwg/base-drafts/issues/1439#issuecomment-397246970 @gloinul 

A receiver can suppress duplicates to some extent, but it can never be perfect. 

I do not think it is a good idea to require receivers to implement complicated countermeasures against packet injection attacks for two reasons: 1) it's not enforceable 2) having complex requirement will take people away from implementing ECN support.

Sending back the signal that tells which PN arrived with CE bit set simplifies the architecture at the same time giving us a guaranteed level of protection. See https://github.com/quicwg/base-drafts/issues/1439#issuecomment-397258455 by @mikkelfj.

> It doesn't need to do more than PN decryption for the packet.
> https://github.com/quicwg/base-drafts/issues/1439#issuecomment-397246970 by @gloinul 

The receiver is required to decrypt the payload even if it has seen the PN before, unless it knows that the payload is identical in some other ways (e.g. by comparing the hash of the payload). Please refer to [QUIC-TLS draft section 10.3](https://quicwg.org/base-drafts/draft-ietf-quic-tls.html#rfc.section.10.3).

> And if you are not suppressing duplicated packets early, then you will have to consider what you do with each individual frame type. Is it safe to process a duplicate or do you need to suppress it at frame type level. To me it opens up the implementation to much more attacks.
> https://github.com/quicwg/base-drafts/issues/1439#issuecomment-397246970 by @gloinul 

It does not. Frames are guaranteed to be idempotent. See #1424.

They need to be idempotent because there is no reliable way for a receiver to tell if a packet it has received is a duplicate.

-- 
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/issues/1439#issuecomment-397281950