Re: [quicwg/base-drafts] Attacks Against Address Migration (#2582)

erickinnear <notifications@github.com> Sat, 20 April 2019 01:13 UTC

Return-Path: <noreply@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 007F91200F6 for <quic-issues@ietfa.amsl.com>; Fri, 19 Apr 2019 18:13:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.001
X-Spam-Level:
X-Spam-Status: No, score=-8.001 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-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 T2alRJH_GQRl for <quic-issues@ietfa.amsl.com>; Fri, 19 Apr 2019 18:13:55 -0700 (PDT)
Received: from out-6.smtp.github.com (out-6.smtp.github.com [192.30.252.197]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A6C471200C3 for <quic-issues@ietf.org>; Fri, 19 Apr 2019 18:13:55 -0700 (PDT)
Date: Fri, 19 Apr 2019 18:13:54 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1555722834; bh=nAR2vj+/9rSoAIqnML5GWJMeN5GGeKwAlm103F+QSCE=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID: List-Archive:List-Post:List-Unsubscribe:From; b=MLB9dAx84KBxZOnvKjc4okB2MDHSRL4E7Y2QdLhqIF1QkS1XshxR1X0TBwNdGXrRp js92lXtLeWyG4CAKH8u+AFlVHKQL5Ufqjis8v0A/tk1O2c43f9wWLwJDT+YpWwCpd2 jzr26nKkDiQAzxQ6oQsyhtqHy8E76Dfyx8rExOBU=
From: erickinnear <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+AFTOJK2UFQFTNHBCQUBMPVN2Y6SNFEVBNHHBTAYDQU@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/issues/2582/485047208@github.com>
In-Reply-To: <quicwg/base-drafts/issues/2582@github.com>
References: <quicwg/base-drafts/issues/2582@github.com>
Subject: Re: [quicwg/base-drafts] Attacks Against Address Migration (#2582)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5cba72527b196_e8f3fb1966cd96435924"; charset=UTF-8
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: erickinnear
X-GitHub-Recipient: quic-issues
X-GitHub-Reason: subscribed
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: quic-issues@ietf.org
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/ToZDB8kYfMdEs0Xpi09Fd34aN5E>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.29
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: Sat, 20 Apr 2019 01:13:58 -0000

I think the summary in the context of new information to do with these attacks is that an attacker can attack the NAT to effectively "take over" your port. Therefore, using the remote address isn't super useful.

So far, we've got some language that says you have to validate both the old and new path on any migration and use the old one if the new path fails to validate. Even if the old path isn't necessarily correct, an off-path attacker should not be able to cause validation of a path to fail -- it can either win the race with the packets and cause it to succeed over a different path, or it can lose that race and it validates on original path.
That text is in {{on-path-spoofing}}:
```
To protect the connection from failing due to such a spurious migration, an
endpoint MUST revert to using the last validated peer address when validation of
a new peer address fails.
```

At the end of the day, the concern with an attacker migrating from off-path to on-path is pretty well covered by the existing text in {{off-path-forward}}: 
```
In response to an apparent migration, endpoints MUST validate the previously
active path using a PATH_CHALLENGE frame.  This induces the sending of new
packets on that path.  If the path is no longer viable, the validation attempt
will time out and fail; if the path is viable, but no longer desired, the
validation will succeed, but only results in probing packets being sent on the
path.

An endpoint that receives a PATH_CHALLENGE on an active path SHOULD send a
non-probing packet in response.  If the non-probing packet arrives before any
copy made by an attacker, this results in the connection being migrated back to
the original path.  Any subsequent migration to another path restarts this
entire process.

This defense is imperfect, but this is not considered a serious problem. If the
path via the attack is reliably faster than the original path despite multiple
attempts to use that original path, it is not possible to distinguish between
attack and an improvement in routing.

An endpoint could also use heuristics to improve detection of this style of
attack.  For instance, NAT rebinding is improbable if packets were recently
received on the old path, similarly rebinding is rare on IPv6 paths.  Endpoints
can also look for duplicated packets.  Conversely, a change in connection ID is
more likely to indicate an intentional migration rather than an attack.
```

In all cases here, either the attacker continues to forward your packets faster than before (they could always view them, so that's not a new privilege for them), or they stop being faster/drop all the packets. 
As long as we've induced traffic onto the connection such that it will "migrate" back to the correct/working path, then it's not perfect, but we're okay.

======

All that to say, I think the requirements that are currently in the text are pretty much right, even taking into account the additional cases outlined in this issue. The few minor tweaks necessary should be covered by PR #2637.

-- 
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/2582#issuecomment-485047208