Re: Questions about Version Negotiation Concerning Possible Handshake Interruption

Kazuho Oku <kazuhooku@gmail.com> Fri, 09 February 2018 11:31 UTC

Return-Path: <kazuhooku@gmail.com>
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 5C141126BF6 for <quic@ietfa.amsl.com>; Fri, 9 Feb 2018 03:31:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1
X-Spam-Level:
X-Spam-Status: No, score=-1 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 sHvpGxkajA9a for <quic@ietfa.amsl.com>; Fri, 9 Feb 2018 03:31:29 -0800 (PST)
Received: from mail-pg0-x22f.google.com (mail-pg0-x22f.google.com [IPv6:2607:f8b0:400e:c05::22f]) (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 A8965126BF0 for <quic@ietf.org>; Fri, 9 Feb 2018 03:31:29 -0800 (PST)
Received: by mail-pg0-x22f.google.com with SMTP id t4so2390183pgp.8 for <quic@ietf.org>; Fri, 09 Feb 2018 03:31:29 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=HdNEnrqcSOp5aR8G5Ma1dUn+SUH+dbEZ37NIZHXrb2c=; b=P/oEd1hQu3XfM1M+AcxyuM9DtijTg5vuLUaEbbfc4fVlvP8KUF0E7xFWSAc3n+XEV5 K27az8B9YDisK5ZPnqslpx4hLZnKW2JZV/NJbLfaiptOOu9RKBwhbpZTADPLRijMY/oe EW+aT2BubIWPzhWleBPwoPy55mC3hYMDrFfdi72Vfz0O3cWs5zOQBH6BgnDZrzHKVMeB kpXu5MOU4PXystQ6r2ac9vfdcRHaWpokWfhEtVFb6k2BG16nFWkB/f1Nv7N/5tqUGGrw UtbLKirDJbl6AZPSfcblwUP41moXCnCN6Ws+HSAP+AVUWCJeqphpERJBCrI6Ee27kpgW +xqg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=HdNEnrqcSOp5aR8G5Ma1dUn+SUH+dbEZ37NIZHXrb2c=; b=AmQOKUkpRDIfxAOdHE2Ehljfz3glkun8C6sK8NxdIaCX4Minpd18DGiTe7srDQAt1+ 40SjpmWQFWNSom1wjLKnU/zUNGu+n3+MUeALGsNjCPtr9oA8FlpmLb9nPW7uNze473o9 KssRI2o8FTXGdQo2SV3aqHihtL4UNlpwSySWMCD4Zzmma90/gghraa9has4HZ9ilIgvv S+avB2ugKjC2AP7SNioQgYEhWJynTPnYexSGmvDPXUNinZq3tQ8rUwYct34WLfkafmTb 4UPAXBMhPNkUgfX45SyJfrvcVZekFCcgiEi36L4TExkkRLsnGbgKP80fDqPbLiJ42KCS kw6Q==
X-Gm-Message-State: APf1xPDhLl4+aGv1tx+bEHBixJgUaKCalRtsSyImts1uFhQY+SRBnYxr M7aJvKzjlyCB5ge8B8AaErCS9sMFqJBSE26gcMYASA==
X-Google-Smtp-Source: AH8x224EMk7tQfDSdSjWvYT4DQ8PzILzbc8+XRxsC7w19IXYnSFc5OR92GYEFrCdexw1NPJ1Iwo3m65TFi3fA7hHi5Y=
X-Received: by 10.99.124.66 with SMTP id l2mr2124555pgn.290.1518175889100; Fri, 09 Feb 2018 03:31:29 -0800 (PST)
MIME-Version: 1.0
Received: by 10.236.156.11 with HTTP; Fri, 9 Feb 2018 03:31:28 -0800 (PST)
In-Reply-To: <3d558827-f2a7-877c-e00a-d6a22ef241c5@gmail.com>
References: <1d386744-c46a-842a-b172-24e290e03668@gmail.com> <CABkgnnVRn+1sNZQFB8BZc4VyzN5usLmYJ3xLo+p2uTeW_0Ji_Q@mail.gmail.com> <CAN1APdfpJ0rYPPiOgfcdDRx3noh+YYvJatP0MYTqRRXMBwF6pA@mail.gmail.com> <3d558827-f2a7-877c-e00a-d6a22ef241c5@gmail.com>
From: Kazuho Oku <kazuhooku@gmail.com>
Date: Fri, 09 Feb 2018 20:31:28 +0900
Message-ID: <CANatvzzZEuJ3TY=+0BMLqbBE5mScG_Jnrypg3xkciykOX78G8A@mail.gmail.com>
Subject: Re: Questions about Version Negotiation Concerning Possible Handshake Interruption
To: Lingmo Zhu <zlm2006@gmail.com>
Cc: Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com>, Martin Thomson <martin.thomson@gmail.com>, "quic@ietf.org" <quic@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/3zdaqTGpKcTnW1eF8Y6L0MlhhKA>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.22
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: Fri, 09 Feb 2018 11:31:31 -0000

2018-02-09 20:19 GMT+09:00 Lingmo Zhu <zlm2006@gmail.com>:
> Thank you for the clarification. I admit that downgrade attack could be hard
> to imagine. In fact what I really concerned is some scenario like:
>
> The client accepts version set X and the server cluster accepts some
> versions in X, so handshake should go well. But middle box tries to send
> VNEG with a version list excluding X. If VNEG wins, handshake could be
> aborted.
>
> In that scenario, HTTP could fall back to TCP and be interrupted simply by
> RST. TBH I just hope QUIC could not be easily interrupted. I'm not sure if
> such corner case should be considered.

I think that this is a valid concern.

QUIC is tolerant to on-path attackers trying to reset the connection,
once the handshake succeeds. We should spend reasonable effort to
achieve tolerance during the handshake as well.

Regarding how to fix the issue, I think the mitigation that Lingmo
suggested in his first post makes sense (i.e. client waits for some
time even after receiving a VERSION_NEGOTIATION packet).

OTOH, I think that we have room for improving version negotiation. In
TLS, client offers multiple versions and server selects one;
therefore, the handshake finishes in minimal round-trips, which is
good for performance and also gives less chance for on-path attacks to
succeed. In QUIC, the server sends a list of versions and let the
client send another unprotected packet. This is both waste of time and
also is more prone to attacks, due to spending an extra round without
protection.

I think we should change the negotiation scheme so that the server can
select the version to use. The hard part of making such change would
be the fact that we need to decouple the TLS version and the QUIC
version, though.


>
>
> On 2018/02/09 18:22, Mikkel Fahnøe Jørgensen wrote:
>
> A possible attack scenario:
>
> A server cluster accepts version X and version Y, and sends {X, Y} in VNEG
> message if it sees any other requested version.
> Except: the cluster also accepts version X_old to deal with hard to upgrade
> baby alarms. It never announces X_old in VNEG but it will accept it if
> proposed by the client.
>
> Middleware now tries to inject X_old in version negotiation to convince the
> client to use that version in instead of version X the client would normally
> use. If VNEG wins the handshake race, X_old is now triggered.
>
> But the cluster knows that it would never have proposed X_old so if the
> client does verify properly, the handshake should fail.
>
> What I’m not sure about is if the current logic actually supports a case
> were X_old is accepted if volunteered, but never when negotiated.
>
>
> Kind Regards,
> Mikkel Fahnøe Jørgensen
>
>
> On 9 February 2018 at 11.11.13, Martin Thomson (martin.thomson@gmail.com)
> wrote:
>
> Any spoofed version negotiation packet will be detected once the
> handshake completes: the server is required to include its list of
> supported versions in the TLS handshake. See the link Mikkel provided
> for details.
>
> On Fri, Feb 9, 2018 at 8:34 PM, Lingmo Zhu <zlm2006@gmail.com> wrote:
>> Hi
>>
>> I'm new to QUIC and not sure if that could be considered but for Version
>> Negotiation with the same connection ID as Initial packet, client should
>> choose an acceptable version from the list. What if spoofing from
>> something
>> like router happens? Should mitigations be considered, such as adding a
>> delay for validated Version Negotiation handling so that following
>> handshake
>> packets could be received later and that fake Version Negotiation could be
>> ignored?
>>
>> Such concerning is just come out from DNS hijacking which is partially
>> similar, though for QUIC it would only interrupt the handshake. I'm not
>> sure
>> but it might be used by downgrade attack in the future. Of course I'm new
>> to
>> this field so my opinion would be wrong.
>>
>> Thanks.
>>
>> Lingmo Zhu
>>
>
>



-- 
Kazuho Oku