Re: Design Issue: Overlong Frames

James M Snell <jasnell@gmail.com> Fri, 10 May 2013 23:31 UTC

Return-Path: <ietf-http-wg-request@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0A26921F8607 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 10 May 2013 16:31:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.549
X-Spam-Level:
X-Spam-Status: No, score=-10.549 tagged_above=-999 required=5 tests=[AWL=0.050, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YXEQRfVCQLwT for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 10 May 2013 16:31:13 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 1022B21F84CD for <httpbisa-archive-bis2Juki@lists.ietf.org>; Fri, 10 May 2013 16:31:12 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1UawlG-0008TI-Tq for ietf-http-wg-dist@listhub.w3.org; Fri, 10 May 2013 23:30:02 +0000
Resent-Date: Fri, 10 May 2013 23:30:02 +0000
Resent-Message-Id: <E1UawlG-0008TI-Tq@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <jasnell@gmail.com>) id 1Uawl1-0007ZT-Nw for ietf-http-wg@listhub.w3.org; Fri, 10 May 2013 23:29:47 +0000
Received: from mail-oa0-f54.google.com ([209.85.219.54]) by maggie.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <jasnell@gmail.com>) id 1Uawl1-0004Sm-43 for ietf-http-wg@w3.org; Fri, 10 May 2013 23:29:47 +0000
Received: by mail-oa0-f54.google.com with SMTP id o17so1048528oag.13 for <ietf-http-wg@w3.org>; Fri, 10 May 2013 16:29:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=4kB14V/90Zs3HGNWkKnoIL82SeBZuXqsKYHsx0Z/TDI=; b=OagAjMhpqTUzU5GSxRvnccWWvgCf+EGrlQU9/355n+SG5Brlk7JD0OO86/gzTC4yVi RNcSgz7c3IB1+zKT/kzgw5E7f+zgQGCtHCEbxI790hK7osOEzd1tz9haXPcZd+z3h50/ uz8W/JytEOl7sxQHbzFnTHKgpTHXedfQDcx2dyG6PRsnrCi4jzqM6tcH9Vf4OyGhVSAT 690EkljnVf0eu3MXYo0IypbawKzQNSuOB2Z9j6QssZ68gxWHI68R19DG4j3DInOer2aZ V9uUZVWlySn2n+ZHrbOOp1FfyJTLdU16JUtKrkvT5H3uokv8liORSaJ7IdAuPFiYGcWT s13g==
X-Received: by 10.60.92.41 with SMTP id cj9mr8015704oeb.31.1368228560932; Fri, 10 May 2013 16:29:20 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.60.3.137 with HTTP; Fri, 10 May 2013 16:29:00 -0700 (PDT)
In-Reply-To: <CABP7RbewOju850tE2GV2U4JZVawGTFGoWoYF7LaofGdKcXYqZg@mail.gmail.com>
References: <CABP7RbewOju850tE2GV2U4JZVawGTFGoWoYF7LaofGdKcXYqZg@mail.gmail.com>
From: James M Snell <jasnell@gmail.com>
Date: Fri, 10 May 2013 16:29:00 -0700
Message-ID: <CABP7Rbc9whm3quCKO3EA3kg-BTCetLz4D0PYXoiepEjUKESueg@mail.gmail.com>
To: "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=209.85.219.54; envelope-from=jasnell@gmail.com; helo=mail-oa0-f54.google.com
X-W3C-Hub-Spam-Status: No, score=-3.4
X-W3C-Hub-Spam-Report: AWL=-2.627, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1Uawl1-0004Sm-43 4d282fd04576af4e7c353e3e2d264204
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Design Issue: Overlong Frames
Archived-At: <http://www.w3.org/mid/CABP7Rbc9whm3quCKO3EA3kg-BTCetLz4D0PYXoiepEjUKESueg@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/17942
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

See: [1] and [2] for pull requests with suggested spec text dealing
with this issue:

[1] https://github.com/http2/http2-spec/pull/92 (re: frame sizes)
[2] https://github.com/http2/http2-spec/pull/93 (re: security considerations)

On Thu, May 9, 2013 at 10:26 AM, James M Snell <jasnell@gmail.com> wrote:
> In going through a number of issues relating to frame sizes, I note
> that the spec currently does not deal with the issue of "overlong" or
> padded frames. That is, what happens if a frame contains more data
> than what is explicitly called for in it's definition.
>
> For instance, the GOAWAY frame currently defines it's payload as a
> 32-bit error code. What happens if that frame contains more than
> 32-bits? .. e.g.
>
>   00 40 07 00 00 00 00 00
>   0A BC DE FF FF FF FF FF
>
> An implementation that is not being careful could completely miss the
> extra junk bytes here. For GOAWAY it's obviously not too much of a
> concern, but the risk for abuse exists for all frames that define a
> specific structure for the payload data.
>
> Recommendation: Adding a short statement that a PROTOCOL_ERROR MUST be
> returned if a frame contains more bytes than what is expressly
> specified in the frame definition.
>
> - James