Re: [HTTP/3]Sending reserved frame before SETTINGS

Ian Swett <ianswett@google.com> Sat, 01 February 2020 22:49 UTC

Return-Path: <ianswett@google.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 61EEB120104 for <quic@ietfa.amsl.com>; Sat, 1 Feb 2020 14:49:05 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -17.5
X-Spam-Level:
X-Spam-Status: No, score=-17.5 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.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 F9I1Rq76wKkx for <quic@ietfa.amsl.com>; Sat, 1 Feb 2020 14:49:03 -0800 (PST)
Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) (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 B1972120025 for <quic@ietf.org>; Sat, 1 Feb 2020 14:49:02 -0800 (PST)
Received: by mail-wr1-x42a.google.com with SMTP id y17so13055532wrh.5 for <quic@ietf.org>; Sat, 01 Feb 2020 14:49:02 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Gda+xlhfYpMR//DtnlKCWwFXujRvYWAIcdSZZ6RByWE=; b=AxljG8kcOefFKX7+ssTQpZ0PcV74Fkm0EXBSS6MQZU+3TcP+r8v9QlJkqzOb09cdaf 2oxCZyy8TwFQ2IqjjJJXMz4ks+B7bCzrTqMjybPW6UtA8pEKFGmCdLI0RImjMcmjeO3l mtkx2sLequLmMeeiVUXtJ7CFS/1a2ctwjxE4w52lfvN+yYvRTvixMf7k4UqiZ8rrDsWv HeS7rLh2m5DHWDqGfAT6g79XcFAETnYTBn3bhMJYHsPNDeoCXDgn5LJzlIE2+35ERnE7 ON0hWY5zv/QYiSMDEOC5J9aUudICtQpi55EJ9tEDdAuqABgFHJb8RgOwscfeZWJ3gHlS fACQ==
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=Gda+xlhfYpMR//DtnlKCWwFXujRvYWAIcdSZZ6RByWE=; b=G+4Adlte7eeW5S1P5e/ehVu2ooaOyQwvaWzqPoU0qGQHFgtmrrA5a3FKiqrOijaOgX twG0A7KHLsEnLMW8zD5RXvv4Agkr5DmLubOjiquVqJYhUwlRk7PCT9OiDVBtpmOwXrmo qhSIeQ4jAQqoj1h1H6ouUaLMczlIV9+270fOQBFJZ4Y+iMepOQdizzlzqEy7EWIzYGOr hL2R0Nj8Ec15YzzmkZ9wfRZ4MsWRbGjxGcPgWgZKL+hmkN9lfALaCKKnP7qCkiKlRZO9 wKGvmfvtWOpcld0UCQf/I7czwPhlsl05X7BzABn7MoB1Z18qaR97NqyVH3Sm4WU1530T E5pA==
X-Gm-Message-State: APjAAAXolXI6aKqDgB8sIxSKVRGMEdRtzKwF8nUoRmFCcuZ6faCnWjIL iI2g6JQ7P3ozg9XDFOHDRQ0i4B3fEp7kppAzlAfkCA+C
X-Google-Smtp-Source: APXvYqxc8M9TRH8o9hVjToDuvioy4VTCUxonSObrhlwP8dqpm5Aatlwb8/4irY/aijzUlUXrH452+J5CR6eJHW/Y5/w=
X-Received: by 2002:adf:8b59:: with SMTP id v25mr4498915wra.419.1580597340944; Sat, 01 Feb 2020 14:49:00 -0800 (PST)
MIME-Version: 1.0
References: <CAPOFeyhp5YE+Y2nSUfEwGUHamp19vL_XT1kJZ-krOm00i915Eg@mail.gmail.com> <CAKDhxQocLR9sotSRWFtM7Kup4zXk2dTP-bxehoYjxuJHFtXuRA@mail.gmail.com>
In-Reply-To: <CAKDhxQocLR9sotSRWFtM7Kup4zXk2dTP-bxehoYjxuJHFtXuRA@mail.gmail.com>
From: Ian Swett <ianswett@google.com>
Date: Sat, 01 Feb 2020 17:48:48 -0500
Message-ID: <CAKcm_gNnsp1uWn5W7o5g_0ODfiqDk-1nAL7vPXUNHTf3wwN2DA@mail.gmail.com>
Subject: Re: [HTTP/3]Sending reserved frame before SETTINGS
To: Ryan Hamilton <ryan@optimism.cc>
Cc: Renjie Tang <renjietang=40google.com@dmarc.ietf.org>, IETF QUIC WG <quic@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000000aa531059d8b7fa8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/LU2VGSsWdtayKtV8zNQz2WVOCds>
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: Sat, 01 Feb 2020 22:49:06 -0000

Thanks for bringing this up Renjie.  I agree the subsequent text seems to
clarify the answer.

However, is that the behavior we want, given it does limit extensibility in
some small ways?

On Sat, Feb 1, 2020 at 11:25 AM Ryan Hamilton <ryan@optimism.cc> wrote:

> Wow, interesting question!
>
> 6.2.1 requires the SETTINGS frame to be first on the control frame:
>
>    If the first frame of the control stream is any other frame
>    type, this MUST be treated as a connection error of type
>    H3_MISSING_SETTINGS.
>
>
> Whereas 7.2.9 says reserved frames have no semantic meaning:
>
>    Frame types of the format "0x1f * N + 0x21" for integer values of N
>    are reserved to exercise the requirement that unknown types be
>    ignored (Section 9 <https://tools.ietf.org/html/draft-ietf-quic-http-25#section-9>).  These frames have no semantics, and can be sent
>    on any open stream when application-layer padding is desired.
>
>
> This sounds like a conflict since something that has no semantics seems
> like it should not cause errors! However, looking Section 9 I think we find
> the resolution:
>
>    Implementations MUST ignore unknown or unsupported values in all
>    extensible protocol elements.  Implementations MUST discard frames
>    and unidirectional streams that have unknown or unsupported types.
>    This means that any of these extension points can be safely used by
>    extensions without prior arrangement or negotiation.  However, where
>    a known frame type is required to be in a specific location, such as
>    the SETTINGS frame as the first frame of the control stream (see
>    Section 6.2.1 <https://tools.ietf.org/html/draft-ietf-quic-http-25#section-6..2.1>), an unknown frame type does not satisfy that
>    requirement and SHOULD be treated as an error.
>
>
> So it seems that it's illegal to send a GREASED frame before the SETTINGS frame. Does that sound right to you?
>
>
> Cheers,
>
>
> Ryan
>
>
> On Fri, Jan 31, 2020 at 11:10 PM Renjie Tang <renjietang=
> 40google.com@dmarc.ietf.org> wrote:
>
>> Hi all,
>>
>> When I was implementing greasing for HTTP/3 frames, I came across a
>> potential confusion.
>>
>> Presumably, if a non-reserved unknown frame is received before SETTINGS
>> on a control stream, the connection should be closed.
>>
>> But if a reserved frame is received before SETTINGS frame on a control
>> stream, does it count as an error and close the connection? Or should
>> it simply be ignored because it has no semantic meaning?
>>
>> Thanks!
>> Renjie
>>
>