Re: [quicwg/base-drafts] Can a client send 0-RTT data when receiving Retry? (#1507)

Kazuho Oku <notifications@github.com> Thu, 19 July 2018 17:03 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 C8969130E80 for <quic-issues@ietfa.amsl.com>; Thu, 19 Jul 2018 10:03:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.01
X-Spam-Level:
X-Spam-Status: No, score=-3.01 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01] 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 MXGaKUa5CBXD for <quic-issues@ietfa.amsl.com>; Thu, 19 Jul 2018 10:03:02 -0700 (PDT)
Received: from o11.sgmail.github.com (o11.sgmail.github.com [167.89.101.202]) (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 2C003130E3C for <quic-issues@ietf.org>; Thu, 19 Jul 2018 10:03:02 -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=/RJe26ZAq1ALMCFjeb1VI213dmY=; b=pgwS1Bh92yKXkyW2 B6D/Ax3V50aHoDgAfxsFSLXbVVVUrJbjG0+ffhUFBj1KVPHhcgaCcDGX2sgGQsV6 uxPfNKQY7HfcvmP3+rzNlRV/qbnhzlxrnin+40SSa2cDNYAbnlSEyIK/bOKOjrnK imptrW4nZLZTsBSWnljSOmQNEig=
Received: by filter0163p1iad2.sendgrid.net with SMTP id filter0163p1iad2-19583-5B50C443-22 2018-07-19 17:02:59.426106317 +0000 UTC m=+149971.877447477
Received: from github-lowworker-39ccb07.cp1-iad.github.net (unknown [192.30.252.40]) by ismtpd0003p1iad1.sendgrid.net (SG) with ESMTP id fWZdH4FpSDa_p0-MGZSA5g for <quic-issues@ietf.org>; Thu, 19 Jul 2018 17:02:59.281 +0000 (UTC)
Received: from github.com (localhost [127.0.0.1]) by github-lowworker-39ccb07.cp1-iad.github.net (Postfix) with ESMTP id 3FE71400F57 for <quic-issues@ietf.org>; Thu, 19 Jul 2018 10:02:59 -0700 (PDT)
Date: Thu, 19 Jul 2018 17:02:59 +0000
From: Kazuho Oku <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+0166e4abd8acd6294de089836b368383d2072fefe05a8e3692cf000000011768864392a169ce1418d0ad@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/issues/1507/406347056@github.com>
In-Reply-To: <quicwg/base-drafts/issues/1507@github.com>
References: <quicwg/base-drafts/issues/1507@github.com>
Subject: Re: [quicwg/base-drafts] Can a client send 0-RTT data when receiving Retry? (#1507)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5b50c4433d639_6fd53f8082cccf583425f"; 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: l64QuQ2uJCcEyUykJbxN122A6QRmEpucztpreh3Pak3B3D0qY1HZsRTHTrKZMEvBbLFntHV9OAoTCi MihPU0T6ayeilBH8kriThFYgOSFPP0o2Ba8i3uUrQkuKy8BdkoCKU9c8rcIRjQn3HdOTMmuwjeiEzF iTDnkxadPBVBy4h8fNnQmi7nt8MYtg1IysAlE2MCGXYC/I6wP3jzNKNMM5BLUk3SsLWCIt0SXAOtIf o=
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/p7pSEYMoMJOlmWmaX4zJyiUzsv4>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.27
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, 19 Jul 2018 17:03:05 -0000

> I don't think that token handling is all that difficult here.

One of the issues here is that an on-path or a man-on-the-side attacker can mount a cut-and-paste attack that replaces token with a different value.

Let me explain one possible attack, that happens in following steps:
1. attacker connects to the server and obtains a token that says "server-config=A"
2. client connects to the server and obtains a NST and a token that says "server-config=B". At this 
3. client tries to reconnect to the server using the NST and the token obtained in step 2
4. an attacker enforces a retry by sending a token obtained in step 1

At this point, client believes that it can send 0-RTT packets based on the negotiated settings in step 2, which is "server-config=B". The server would assume that the 0-RTT packets that it will receive is based on "server-config=C".

I am not sure how scary it sounds right now, however it could become a practical concern when we start adding extension frames to QUIC.

To avoid this type of attack, the server needs to do something like:
* store the server settings in the session ticket rather than the token. TLS stacks will need to provide an interface for that (if they do not provide one yet), or
* have a different STEK for every server-config, so that resumption will fail if the client provides tries to resume with a PSK that is not bound to the server-config found in the token

-- 
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/1507#issuecomment-406347056