Re: Alternative ways to keeps ODCID on the server

Kazuho Oku <kazuhooku@gmail.com> Tue, 28 January 2020 23:58 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 5CFFD1200FF for <quic@ietfa.amsl.com>; Tue, 28 Jan 2020 15:58:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Level:
X-Spam-Status: No, score=-1.998 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=unavailable 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 pAn8pyANzJyU for <quic@ietfa.amsl.com>; Tue, 28 Jan 2020 15:58:29 -0800 (PST)
Received: from mail-ua1-x935.google.com (mail-ua1-x935.google.com [IPv6:2607:f8b0:4864:20::935]) (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 ECB0A1200EB for <quic@ietf.org>; Tue, 28 Jan 2020 15:58:28 -0800 (PST)
Received: by mail-ua1-x935.google.com with SMTP id y3so5537895uae.3 for <quic@ietf.org>; Tue, 28 Jan 2020 15:58:28 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=w3fiCYq4pTibbKkL23Y/YQHXAC/T31COmE4GZCwd3Hw=; b=Yk43dTh4IQVUDOq0klubeClCmE3giN8Zq8nPBLJiU2Yi+9Oq4lxYrkbNkr6ZLnIln6 zH9oQmFO6lTttYC4MW4zectOLkA/fQea9Y9sMkGE6zw0osFPo/gOzf0x3lJ+P50a3kbS ZaHwS8duynuZG/CBk4vGGdi0acXZcTulKlOW/OB+PuFQtrdjcEhXIhFp3BsHenjY5Byz VAQDfHKGOz6uAFR/P4vyaBS7WSRAOOOozGfxw7k2FNnYB+Dlc0rbYL7UgrbG/Sh2e+GP ELTbSOGydMmHWwMpeg/M09WhHIz77Zztw3Pk+zErUBnmFIN4JiZg9UyVU4rqYmrDw1K4 0BiA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=w3fiCYq4pTibbKkL23Y/YQHXAC/T31COmE4GZCwd3Hw=; b=o3RFUum/FBfSqWNJmre11rMdctEOVYDMTz7y+Deg8riBzsXJUFnnxIgc0oVEUKddDz RCAyJ34o7T3Ju9CvHzsA5Y40rRlo97yx1Evj5vEC7zZZ+JAYMRTTAx6NPtLZxqYfbKAF gzh79kP0HUI+nk9eVruWwO5V2ly12Ot41OGCpST6o810gIP2gUw36lG3oRByHr1JEdTN 2HB29gMUhEm+LRRt96/rXQtZ+V24ZGSvK4RANSNg2D5LmGXYD5r2YTVjtcKvvl5FDXKg Fnxk0WhkJk3IMs2dxBvrXVGdJH8nsajXK8MfTkzd9iwL6zvUBuig4pg228QARUIFj7/x BA2w==
X-Gm-Message-State: APjAAAV1ifuPx+lsb9KcAHpyNjqBG+MT6TEnx42e7tUIhrh5Lf1oM/Fj s5rbM+MmxkdnWPpjGb0nrvHPGkrIU/vA7FBmVZw=
X-Google-Smtp-Source: APXvYqxRXvXPWmz53C6drzdewMJARzCIjlVToRpTAl2hq2VIF0U4lFnGUfyXgBAc20qG3CPRGsdM7nR7EKXY8xjYVOw=
X-Received: by 2002:ab0:471a:: with SMTP id h26mr15482610uac.34.1580255908069; Tue, 28 Jan 2020 15:58:28 -0800 (PST)
MIME-Version: 1.0
References: <20200124222434.GA8279@ubuntu-dmitri> <7b228c14-c0d3-6458-77ab-945e713ef429@huitema.net> <CAOYVs2qhPBtbjrVEXE+oMXWUWRBqhzDfZsiOatRW5Zd67e1sWg@mail.gmail.com> <ee0f625b-b260-9e3d-12b6-80291fc110eb@huitema.net> <CAKcm_gNKu5b__cjy5212pWN=PKwdZKX23rXHs423-u8hZMjr+w@mail.gmail.com> <20200125135411.GA19655@ubuntu-dmitri> <CANatvzyTHXog=46wwpmVshkYcY0YFGdvWXj0dGjKVUj0dXa7pA@mail.gmail.com> <f25d2034-0938-f716-c356-5873eeb58cda@huitema.net> <CAOYVs2pvLxvQFkwYY6FuT5wQ_OWjjvhSBoMpyrOn9Gh-qNiyQw@mail.gmail.com> <da59defa-ef61-d9ec-d3bd-a045316d0d19@huitema.net> <CAOYVs2qEL-GRN=zrN5JZbDrfLH33tyhZXwDfZ3GZYt16WWHipg@mail.gmail.com> <bd99f633-f28b-b99d-7529-9ee1d279a8ab@huitema.net>
In-Reply-To: <bd99f633-f28b-b99d-7529-9ee1d279a8ab@huitema.net>
From: Kazuho Oku <kazuhooku@gmail.com>
Date: Wed, 29 Jan 2020 08:58:17 +0900
Message-ID: <CANatvzyPp7nWGurOyRp8a0_DKLXJ=AwYXwf+9h9kOpi4pHjwFw@mail.gmail.com>
Subject: Re: Alternative ways to keeps ODCID on the server
To: Christian Huitema <huitema@huitema.net>
Cc: Marten Seemann <martenseemann@gmail.com>, Ian Swett <ianswett=40google.com@dmarc.ietf.org>, IETF QUIC WG <quic@ietf.org>, Dmitri Tikhonov <dtikhonov@litespeedtech.com>
Content-Type: multipart/alternative; boundary="0000000000000e05e3059d3c00e0"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/6tETi7bQaynDw-ZRylttSeoSSfk>
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, 28 Jan 2020 23:58:31 -0000

2020年1月28日(火) 15:45 Christian Huitema <huitema@huitema.net>:

> But then, the client that responded to a retry will fail the connection if
> the ODCID parameter is not there. There are two alternative in the bad
> token scenario: good faith client with an obsolete new token, or client
> that received a bad faith retry. In the first case, there is no harm
> completing the connection. In the second case, the client will drop it so
> there is only a modest issue of temporary resource allocation.
>

While I agree that the two scenarios being described here are the
possibilities, I now tend to agree that the MAY can be dropped. Previously,
I missed the fact that ODCID has to be carried as a TP (as correctly
pointed out by Marten and Dmitri).

Regarding attack scenarios, I'd argue that it would be awkward for an
attacker to only send a spoofed packet to the server-side, when a malicious
middlebox can also send a packet to the client. I'd also argue that there
are many other ways of spoofing a client-sent Initial packet, and that
having a defense just for retry tokens does not change the picture.

Therefore, I think dropping the MAY is fine. I think a server can continue
to ignore the retry token when it assumes that it was spoofed, but my take
is that it's not worth writing it down.

> On 1/27/2020 8:35 PM, Marten Seemann wrote:
>
> The client knows if it used a NEW_TOKEN token. More specifically, the
> client knows if it received and responded to a Retry packet.
>
> On Tue, Jan 28, 2020 at 11:21 AM Christian Huitema <huitema@huitema.net>
> wrote:
>
>>
>> On 1/27/2020 7:11 PM, Marten Seemann wrote:
>>
>> > That's actually what I implemented. If the token can be verified, accept
>> > the connection, treat it as validated. If it cannot be verified, check
>> > whether the token is necessary, e.g., would any incoming connection
>> > trigger retry. If it is necessary, drop the connection; if not
>> > necessary, continue as if no token was there.
>>
>> Doesn't that defeat the purpose of the original_connection_id transport
>> parameter? We introduced it to prevent middleboxes from performing a Retry.
>> With this logic, a middlebox could perform a Retry, and then corrupt the
>> token on the second Initial to trick the server into accepting the
>> connection.
>> Furthermore, client implementation will check for the
>> original_connection_id TP, and fail the connection if this TP is missing.
>>
>> The spec also has language that I'd interpret as forbidding this:
>> If the server sends a Retry packet, it MUST include the Destination
>> Connection ID field from the client's first Initial packet in the transport
>> parameter.
>>
>> How do you reconcile that requirement with the "NEW TOKEN" mechanism? If
>> the Initial packet carries a NEW TOKEN, it will be accepted and there won't
>> be any ODCID transport parameter.
>>
>> -- Christian Huitema
>>
>

-- 
Kazuho Oku