Back to work

Martin Thomson <mt@lowentropy.net> Tue, 27 October 2020 06:34 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 6D7833A15C5 for <quic@ietfa.amsl.com>; Mon, 26 Oct 2020 23:34:55 -0700 (PDT)
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=jd1BwdlX; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=OOMXN9sJ
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 3ForvkpXQrF7 for <quic@ietfa.amsl.com>; Mon, 26 Oct 2020 23:34:53 -0700 (PDT)
Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 863253A15C3 for <quic@ietf.org>; Mon, 26 Oct 2020 23:34:53 -0700 (PDT)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 74687B58 for <quic@ietf.org>; Tue, 27 Oct 2020 02:34:52 -0400 (EDT)
Received: from imap10 ([10.202.2.60]) by compute1.internal (MEProxy); Tue, 27 Oct 2020 02:34:52 -0400
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= fm3; bh=PGPwjdi7NRQPFQZnXPOeE9vVSgkrcBhwG0mOp6q+fEk=; b=jd1BwdlX imjNKHqllFn2866xN7fqGvJ6dv60eM71nSzhyCuVnujH+LBo+xcJ03GF2C+2ghZq rAvNqG6uqAEyImTnEY8SiTqeTboBGmlG/D7GF8YvF+TEMiwCS/sDNprYxVmCDSqd QoKBfYTGi4zWJhJpZWaCQ+Vik9ilRkgDDShgHC402mXMz22vnO0otUtU5JAvwgI9 oGBzNSFVm+xKjIad/KFHC2xznnCJiKocKpkZjgypjKWFKZAZdQsxyojfhVLJFVDp 7TqNb6XycYJHm1hioxlGIQR3izLbkCH1p2cDzb0y/C9NGBRs+pZyvhVboXdaKv5m Ebu0ZsPtCQ8gkA==
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=PGPwjdi7NRQPFQZnXPOeE9vVSgkrc BhwG0mOp6q+fEk=; b=OOMXN9sJ0XFtERIlafv/ld4YDaNQoMUDvUlQQFgUO9i5W 8jSvOwgtW8XBxxzd4DTQ3wes5Jpp8hmjG/CsW7OyIm8w6CKLxOPe7ZJSdXZIRVwy LSvXIHem1NHT5J+hOuYEbl81Bza6JKRI3pCDFTiBys/x50Li7HaCJfJmd/FFAT6s rejMH/Gc9D0dYEBtvM9wrF+fk/P93KZlYD5KQ1HJP4MzM4+ECEgMNeeft1N8drFD 3Qk0bzeHZmBsXd2ZbjjlCNBYFULB1Z1wR4M1wvUAhCkQKIJ1zOg7vNrUvUV9ZsY9 Z40Bvweb9fUud2ASPZnCgKLCzqRSX1VB34vgfuoPg==
X-ME-Sender: <xms:i7-XX_9WLVyQnURVUKAssYYFYFQXIsFw7Bar9kEVpca8NPXNIQEDJQ> <xme:i7-XX7tAgZgs3Ix8kUY69bPnDmQMy_jirFxvokxytL3aWwBQgLhFEGNDqMjBUhZBX dtQKEFmRk5BxDBgYLc>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrkeekgdelhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkfffhvffutgesthdtredtre ertdenucfhrhhomhepfdforghrthhinhcuvfhhohhmshhonhdfuceomhhtsehlohifvghn thhrohhphidrnhgvtheqnecuggftrfgrthhtvghrnhepgeeuheeujedvieevffehvdekge ffkefggfdtteelfeekfeeftdejhfdtuddvuddtnecuffhomhgrihhnpehgihhthhhusgdr tghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hmtheslhhofigvnhhtrhhophihrdhnvght
X-ME-Proxy: <xmx:i7-XX9Dp9NxUdT3PDwKGGAfwuEufeNZaDSuiZ74sfgm2rHW6Orf6-w> <xmx:i7-XX7fZ-04j6Avx1u18g3U9i1umw5lGMTH6Rf59EKZjh9icQWrPZQ> <xmx:i7-XX0PhzYnEKjohdsT3InSn2ho1iYBZDLspsa2laSeLcCrWcVbXCg> <xmx:jL-XX6YCDIt4EY5GoW1MfLiyn8PYS_u4F3XytUVyKssrR0UT0sI6Eg>
Received: by mailuser.nyi.internal (Postfix, from userid 501) id A269320214; Tue, 27 Oct 2020 02:34:51 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.3.0-529-g69105b1-fm-20201021.003-g69105b13
Mime-Version: 1.0
Message-Id: <0f150dec-e408-48bf-8e54-05e3e96e7a85@www.fastmail.com>
Date: Tue, 27 Oct 2020 17:34:31 +1100
From: Martin Thomson <mt@lowentropy.net>
To: quic@ietf.org
Subject: Back to work
Content-Type: text/plain
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/0-i83pWVY9t2C5-tezsJIkYbVhA>
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: Tue, 27 Oct 2020 06:34:55 -0000

Nick opened https://github.com/quicwg/base-drafts/issues/4257 last week.

Amplification attacks based on spoofed path migrations seem like they might need some thought.

We have two options we're debating and it seems like a good candidate for broader discussion.

# Background

We currently recommend that you send kMinimumWindow each kInitialRtt to an unvalidated peer address after migration.  This is a different limit to that we use during the handshake and not absolutely bounded.  Thus, if an attacker can spoof migration the spoofed address might receive path validation probes at this rate until the path validation fails.

If our recommendations for validation are followed, this means that you could have a relatively small packet (21 bytes is our minimum, but then we have to add overheads and a connection ID to be realistic, so maybe 51 bytes) to get 1200 times the number of probes sent during path validation (which might between 3 and maybe 9 depending on how you interpret the text).

The same connection can be used to attack as many different hosts as the server is willing to probe from the same connection.  Whether this is in parallel or series doesn't matter so much, we're most interested in the number of bytes involved.

That seems bad, but you have to remember that the attacker has performed a full handshake: all the crypto and round trips necessary to get this going.  That's a non-trivial cost; even if the attacker doesn't bother with retransmissions and timers, it's still a fairly large commitment to mount the attack.

Rough calculations show that 3 probes toward a single target isn't that interesting for an attacker.  If you count a minimal handshake in their costs, they get less than 3x amplification if there are 3 probes and nearly 8x for 9 probes.

If an attacker has multiple targets and considers attacking all of them equally worthwhile, then then can amortize the setup cost across those targets.  Then it depends on how many targets they have and how many paths the server is willing to probe.  Attacker advantage then goes up asymptotically toward the maximum advantage, which is about 25 times the number of probes sent in response to the single packet.

Kazuho also points out that the attacker is mounting a denial of service on themselves as part of this.  Migration causes a probe on the existing, validated path.  Those can be answered readily to limit the number of probes, but congesting their downlink in this way might limit their ability to create additional connections.

# Option 1: 3x limit

We could make the 3x limit for unvalidated paths a blanket requirement.

This is principled, but complicates the process if validating a path.  If you haven't received much data on that path, then you will be unable to send a fully padded probe and so validation only establishes that the recipient is present; then you have to probe again to determine that the path supports the 1200 byte MTU.

This is also risky.  The last two changes we made in this area produced nasty regressions.  This issue is a direct result of changes; without the requirement to pad packets containing PATH_CHALLENGE, this would not be an issue.

# Option 2: Document the exposure and let implementations manage this

The existing rate limiting does have a limited ability to limit amplification.  25x amplification isn't anything to celebrate, but you might say that the setup cost and other inherent limitations mean that it is rarely that bad.  If the number of probes and the number of failed path validations are both limited, then this could be entirely manageable.  For instance, 3 probes, a connection ID of 8 bytes and 4 path validations provide just 11.6x advantage.

Recommending that implementations limit the number probes and the number of probed paths might then be sufficient.

Note: The rate limiting we currently have only helps if servers limit the number of active connections in some way.