Re: Rationalise HTTP_WRONG_STREAM and HTTP_UNEXPECTED_FRAME

Lucas Pardue <lucaspardue.24.7@gmail.com> Thu, 08 August 2019 21:08 UTC

Return-Path: <lucaspardue.24.7@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 1F8651202E8 for <quic@ietfa.amsl.com>; Thu, 8 Aug 2019 14:08:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.747
X-Spam-Level:
X-Spam-Status: No, score=-1.747 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 qgITEEM-wbdU for <quic@ietfa.amsl.com>; Thu, 8 Aug 2019 14:08:17 -0700 (PDT)
Received: from mail-ua1-x934.google.com (mail-ua1-x934.google.com [IPv6:2607:f8b0:4864:20::934]) (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 49C431202DD for <quic@ietf.org>; Thu, 8 Aug 2019 14:08:17 -0700 (PDT)
Received: by mail-ua1-x934.google.com with SMTP id 34so36979500uar.8 for <quic@ietf.org>; Thu, 08 Aug 2019 14:08:17 -0700 (PDT)
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=FBfUDjwZxXWYJVmvaDKBkZ87TmIBbmRELAPDpn09VZI=; b=q9ff01hAbZAMBnEjjd6Pscz0Tn6p9bqt4Mbk6UnWa9G8LXKZLmVQYadMV18LAdqPLC A8QQWp5q/p9XDkHw7H5xgTyWmvcqUImor6unmnfWDPLst1RvMjBAwLZb0AI/YedsEBUc yRykzDMaJoNO9x77zQVuXcfCXmmigganT+K6Blg5Hk5Ajio2Bm9qHMN1AFU0ajsOiK/c osTPUhrd5vxifrl5tR188tGskL3OTSwhJDEYnwXUx8kcLBeyajmXF3njmdP2bA8JvRAJ ZsCPjrKzgaTvVemoIRNP4AhJjVLOeEJNjBV4S8RATwLihBcbLhVs3jPT20fHiq/dI8Gc 1DNg==
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=FBfUDjwZxXWYJVmvaDKBkZ87TmIBbmRELAPDpn09VZI=; b=L5NoMr9UcZoTrfNv8ZeFnzZnyx+tKMtvtFCR/oPB3BlZGrShCDG3pAkrjYUceFvr0m SO+90hD/PVz2MP0cLoO5LLsakjd9/lSQa/rZkDY2XMMzI4SG2YIIkp0ag+4xewU92rXb D9VLzrx6VGaOdaa9NNNjm5N3wQ7fiyflhpDF0bd+Pi1+nTDfZw9gBMGXpim6I+sIq0JW eaGkrf05Ld4PtdRtabJQ3QgQTxsNM2sq9pG67rMjPH6Vqwhgq/I/iv3BYXkJ4SG+K5t6 zNbaHZLLP7lT4LR4L9WMZNYLZFJtEOxyD1kwtdmhzMTy7DBbaVbe2D9eIHE3r0oyye6c +gVQ==
X-Gm-Message-State: APjAAAWg3LSb8QaButUkUFSVQVj6wRd+hv6iwGdKV7OZ8qEsH14VfCLt +CyvePEgcAsuTGN3lavJV0V3+LOHkcBDaFoaLgNLdnq2
X-Google-Smtp-Source: APXvYqw5D+ik445ibnDUAZMQLt7FIi79PQ0jqFz90QqamiKtsQvo0aMmSh+6zP6nePBb1YINAheUZuz2KafFKhNGI2Y=
X-Received: by 2002:a9f:248b:: with SMTP id 11mr11198857uar.9.1565298496315; Thu, 08 Aug 2019 14:08:16 -0700 (PDT)
MIME-Version: 1.0
References: <CALGR9ob7=MzO5qt987dpBAxBqnsMRvkrgYz7svktKsMNNhjAdw@mail.gmail.com> <608f1832-2ac3-4459-875e-bdc9a86ad8b8@www.fastmail.com> <CY4PR22MB098352FA3BDA1AAF6918BA75DAD70@CY4PR22MB0983.namprd22.prod.outlook.com>
In-Reply-To: <CY4PR22MB098352FA3BDA1AAF6918BA75DAD70@CY4PR22MB0983.namprd22.prod.outlook.com>
From: Lucas Pardue <lucaspardue.24.7@gmail.com>
Date: Thu, 08 Aug 2019 22:08:04 +0100
Message-ID: <CALGR9oZWcPJcHuKghRuW4vspHo9CxWf+OeOnB0U3xFGzTA7D=A@mail.gmail.com>
Subject: Re: Rationalise HTTP_WRONG_STREAM and HTTP_UNEXPECTED_FRAME
To: Mike Bishop <mbishop@evequefou.be>
Cc: Martin Thomson <mt@lowentropy.net>, "quic@ietf.org" <quic@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000d72461058fa17412"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/cCn4Hf0sIQtwWq42tJKqSCN13K4>
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: Thu, 08 Aug 2019 21:08:19 -0000

I also overlooked something, HTTP_MALFORMED_FRAME was replaced with
HTTP_FRAME_ERROR which is presently defiend for use when a frame layout is
wrong, or its size is wrong.

Is the case of syntax error sufficiently unique from used incorrectly error
that HTTP_WRONG_STREAM and HTTP_UNEXPECTED_FRAME  currently articulate?
There is some overlap, so an more extreme step would be to merge them into
HTTP_FRAME_ERROR.

I'm undecided on the best course of action here, I don't even think
preparing candidate PRs will help the conversation much because of the
nature of the issue.

On Thu, Aug 8, 2019 at 8:16 PM Mike Bishop <mbishop@evequefou.be> wrote:

> As Lucas said, if you have a separate parser by stream type and the frames
> defined for other streams simply aren't handled, that would violate the
> MUST-error requirements we currently have.  You would fail a compliance
> test.
>
>
>
> I see a couple separable questions that we need to answer to move forward
> here:
>
>    - *Should this even be possible?*  QUIC has established a pattern of
>    making it impossible to send invalid values.  An H3 incarnation of that
>    pattern would be to split the frame type spaces so there’s no such thing as
>    WRONG_STREAM, just unknown frame types.  Should WRONG_STREAM be possible to
>    express?
>    - *If so, is this error easily detectable?*  We’ve established a
>    principle that easily detected protocol violations will be required to
>    generate an error.  The current text reflects this principle, since known
>    frame types and their valid streams are easily detectable.
>       - If the pattern Martin suggests might be common, and therefore
>       this error isn’t “easily detected,” these would become SHOULD-error instead.
>    - Only then, the original question, *is there value in having separate
>    error codes?*
>
>
>
> I find the separate frame type registries slightly attractive, but unless
> we cross-reserve values (which defeats the point), we’d be breaking the
> last vestiges of HTTP/2 resemblance.  It’s also a pretty fundamental change
> for a protocol on the edge of late-stage process.  I don’t think I’d want
> to bite that off unless the working group as a whole feels strongly that
> it’s an improvement, and I’m not seeing that so far.
>
>
>
> I tend to think that misuse of known frame types is easily detectable and
> therefore Martin’s hypothetical implementation is simply wrong.  However,
> the value in the distinction between the two seems minimal.  I’d vote for
> merging.
>
>
>
> -----Original Message-----
> From: QUIC <quic-bounces@ietf.org> On Behalf Of Martin Thomson
> Sent: Tuesday, August 6, 2019 8:29 PM
> To: quic@ietf.org
> Subject: Re: Rationalise HTTP_WRONG_STREAM and HTTP_UNEXPECTED_FRAME
>
>
>
> On Wed, Aug 7, 2019, at 10:03, Lucas Pardue wrote:
>
> > As part of the HTTP error analysis and feedback, in June I created
>
> > issue #2809 "Rationalise HTTP_WRONG_STREAM and HTTP_UNEXPECTED_FRAME"
>
> > [1].
>
>
>
> The notion of a signal for "I got a frame that I understood, but it was in
> the wrong place" is fine.  Good even.  But I don't see a need to have two
> such signals.  So I'm in favour of collapsing the two.  I don't understand
> the distinction between these signals as it stands anyway.
>
>
>
> However, I'm also concerned that this is going to get wrapped up in the
> usual compliance test mess.  If I hook up different parsers on different
> streams and my request stream parser doesn't know about SETTINGS at all, so
> ignores it when it suddenly appears on a request stream, is the test case
> going to fail when I don't generate HTTP_FRAME_IN_THE_WRONG_PLACE?
>
>
>