
From jgr208@alum.lehigh.edu  Wed Dec  3 05:50:09 2014
Return-Path: <jgr208@alum.lehigh.edu>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D6ED51A1B05 for <hybi@ietfa.amsl.com>; Wed,  3 Dec 2014 05:50:09 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.978
X-Spam-Level: 
X-Spam-Status: No, score=-1.978 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham
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 DMLRlTy6DDZP for <hybi@ietfa.amsl.com>; Wed,  3 Dec 2014 05:50:05 -0800 (PST)
Received: from mail-yh0-f49.google.com (mail-yh0-f49.google.com [209.85.213.49]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9040C1A1AD9 for <hybi@ietf.org>; Wed,  3 Dec 2014 05:50:04 -0800 (PST)
Received: by mail-yh0-f49.google.com with SMTP id f10so7137644yha.36 for <hybi@ietf.org>; Wed, 03 Dec 2014 05:50:04 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=W2GNYLwP2cMGQnggpl7Z6k9Fsix9VAzcvC8wkHhj1Zo=; b=Hxm9o9dlgyfZScOL9i/LxDDLkYBKPMUNNsf3W3sUCdNqyuAGVxk/nIsD4KZeNz8GpA 9wkwxWJLKxPqAobIeS7YGYiO+Kzm2Ix6Zq21igrSpc1YD98GK7bqLsiZ8ZD7amm+jytN Un4G0B81GiSoGDUabwb8phx+dG2D+RQLY7CXGqlt8QJU1XK37o7+GXA34Mht46YR52wI DL0QowL56ovAkAM1GrHwqs82JfjwsSPuu+kgfNAfWV6HiQzWB9CagyBeVflcAR4UP/AQ MpqPTK9FHL0Hj0JUFdztW6NPfWydnyTcmrP4XULOzJcTBEhHhUqvCiXbgPeaCRTRAJGO QMXw==
X-Gm-Message-State: ALoCoQlugw3nx47a7Fnm+jdAASroMfTx6XTCxWI1Zay6ZwdZtwhajfK4EQdoCtFq/zTcFgcZGq0b
MIME-Version: 1.0
X-Received: by 10.236.16.230 with SMTP id h66mr5486686yhh.145.1417614603946; Wed, 03 Dec 2014 05:50:03 -0800 (PST)
Received: by 10.170.204.82 with HTTP; Wed, 3 Dec 2014 05:50:03 -0800 (PST)
Date: Wed, 3 Dec 2014 08:50:03 -0500
Message-ID: <CANHVnYn32EEQU4wByMgThR0+_WNVWE9Pe0vTPp923Fp=HtcBRQ@mail.gmail.com>
From: Jason Ricles <jgr208@alum.lehigh.edu>
To: hybi@ietf.org
Content-Type: text/plain; charset=UTF-8
Archived-At: http://mailarchive.ietf.org/arch/msg/hybi/P8Y1cwvrU3iCL14LIaC8o-qkQ10
Subject: [hybi] websockets 1002 error
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi/>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 03 Dec 2014 13:52:03 -0000

Hi I have a question about a 1002 protocol error I am getting with
websockets, can anyone here help me to debug why this error is
occurring?


From nobody Thu Dec  4 01:42:28 2014
Return-Path: <ricea@google.com>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 29FD21A0126 for <hybi@ietfa.amsl.com>; Thu,  4 Dec 2014 01:42:27 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.388
X-Spam-Level: 
X-Spam-Status: No, score=-1.388 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=no
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 dNtc5vzqWYYe for <hybi@ietfa.amsl.com>; Thu,  4 Dec 2014 01:42:25 -0800 (PST)
Received: from mail-vc0-x22d.google.com (mail-vc0-x22d.google.com [IPv6:2607:f8b0:400c:c03::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9ECE81A0113 for <hybi@ietf.org>; Thu,  4 Dec 2014 01:42:25 -0800 (PST)
Received: by mail-vc0-f173.google.com with SMTP id im17so7607999vcb.32 for <hybi@ietf.org>; Thu, 04 Dec 2014 01:42:24 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=sXjwA3mGeYpeQSg9fsaV832oA8IgmbCD6/v+Ot+HENw=; b=OjnaU0R2wmFY3ToUSKG1h11kmNB64HYp3IntM/7PX3kMR3M4pcFAR8wb0uWHqDMuYO t7ns5xpb2xOqTgge802xZFKaeoYhCB1vaeTLLsCIN7EtmlyGPRG96VIM6YwL8sVP42MP AzFWO6HpV0UWGFw9kGtALQBXu1ByqSf06Zd/E91LPEMTzjSRvMuAKgASzCnDF0ulp3U2 wzwkPw1J3uVIVwykZAeJxqTQ8PlDAqW+0YeLk9n8o0cNKg7BXCys5eJxE0Q+pvHrbSSV sIsMarrPXgYfqegLUvBatB91HDOT1Co8ZFoR0JJ1qcOi/SxPhRH7TqJe4sdwbDckQx1p Jl0Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=sXjwA3mGeYpeQSg9fsaV832oA8IgmbCD6/v+Ot+HENw=; b=JwGEzzqc7rmrvcebsNj1W+50Gas3NJI5T41hWuk38oWu++36QKTgKSMwEBBvNBtqx0 GvEi035TPywOxaga0THlqWVTK2ZnUCxJL966fQni/Y21J98cbynzxNR0vTgzosptDC8E 92QxjY+i1D2EfnOi6UEIrKgYdEIrTu0AQrqU1XWDcKYe7mp0RZBz1L8EVTgJWN3BkoTM pWmw7lU6TyFf2Kbq5rnMx8LVXcjkRuN9Mn4tkBLpR0nWqVvKq+RPZOctAmOb3o7Lm0hA 8jhYgJ3UC7g19u77jTQVv2OSl7cko+fETtS9uPtm7toblSb3Vb1oJZqyLmSrxHSVhJDu 3tgw==
X-Gm-Message-State: ALoCoQnPPwVPWDAbqXF+m38Mkr38wGW8rRbMa7PtGyD7nwicRLwouhXWUEpfph/LOhD1X4i778K+
MIME-Version: 1.0
X-Received: by 10.52.184.167 with SMTP id ev7mr4139502vdc.67.1417686144750; Thu, 04 Dec 2014 01:42:24 -0800 (PST)
Received: by 10.52.119.208 with HTTP; Thu, 4 Dec 2014 01:42:24 -0800 (PST)
In-Reply-To: <20141117205658.35A91181C9B@rfc-editor.org>
References: <20141117205658.35A91181C9B@rfc-editor.org>
Date: Thu, 4 Dec 2014 18:42:24 +0900
Message-ID: <CAHixhFr266EGnT8cWbERHsS_GiobUtn+LMwJT1HX05W=krZk1g@mail.gmail.com>
From: Adam Rice <ricea@google.com>
To: RFC Errata System <rfc-editor@rfc-editor.org>
Content-Type: multipart/alternative; boundary=bcaec548a4550fb77d050960c7ab
Archived-At: http://mailarchive.ietf.org/arch/msg/hybi/2G_BzMqLILUZrQkkDq7kcmfWAjk
Cc: "hybi@ietf.org" <hybi@ietf.org>, Pete Resnick <presnick@qti.qualcomm.com>, "ifette+ietf@google.com" <ifette+ietf@google.com>, jhall@futuresouth.us, Gabriel Montenegro <Gabriel.Montenegro@microsoft.com>, Barry Leiba <barryleiba@computer.org>
Subject: Re: [hybi] [Technical Errata Reported] RFC6455 (4185)
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi/>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 04 Dec 2014 09:42:27 -0000

--bcaec548a4550fb77d050960c7ab
Content-Type: text/plain; charset=UTF-8

On 18 November 2014 at 05:56, RFC Errata System <rfc-editor@rfc-editor.org>
wrote:

> However, implementations have been observed that allow the headers payload
> length to be specified as a higher length than the actual raw payload of
> that frame.


[citation needed]


> Obviously, this opens up the potential for a memory consumption DoS attack
> on an implementation that uses this method.


The specification allows for frame sizes up to 9 exabytes. Any
implementation which blindly allocates the specified frame size without
limit is trivially vulnerable to a DoS attack.

The wording of the specification with regards to fragmentation is not as
clear as I would like, but I don't think that constitutes an errata.

The structure of a frame is clearly and unambiguously specified in section
5.2. The text of 5.4 in no way nullifies that.

--bcaec548a4550fb77d050960c7ab
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 1=
8 November 2014 at 05:56, RFC Errata System <span dir=3D"ltr">&lt;<a href=
=3D"mailto:rfc-editor@rfc-editor.org" target=3D"_blank" class=3D"cremed">rf=
c-editor@rfc-editor.org</a>&gt;</span> wrote:<br><blockquote class=3D"gmail=
_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:=
1ex">However, implementations have been observed that allow the headers pay=
load length to be specified as a higher length than the actual raw payload =
of that frame.</blockquote><div><br></div><div>[citation needed]</div><div>=
=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bo=
rder-left:1px #ccc solid;padding-left:1ex">Obviously, this opens up the pot=
ential for a memory consumption DoS attack on an implementation that uses t=
his method.</blockquote><div><br></div><div>The specification allows for fr=
ame sizes up to 9 exabytes. Any implementation which blindly allocates the =
specified frame size without limit is trivially vulnerable to a DoS attack.=
</div><div><br></div><div>The wording of the specification with regards to =
fragmentation is not as clear as I would like, but I don&#39;t think that c=
onstitutes an errata.</div><div><br></div><div>The structure of a frame is =
clearly and unambiguously specified in section 5.2. The text of 5.4 in no w=
ay nullifies that.</div></div></div></div>

--bcaec548a4550fb77d050960c7ab--


From nobody Thu Dec  4 10:59:10 2014
Return-Path: <barryleiba.mailing.lists@gmail.com>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3E8A81A0033 for <hybi@ietfa.amsl.com>; Thu,  4 Dec 2014 10:59:07 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.278
X-Spam-Level: 
X-Spam-Status: No, score=-1.278 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FM_FORGED_GMAIL=0.622, FREEMAIL_FROM=0.001, SPF_PASS=-0.001] autolearn=no
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 kDMa51YFZFC8 for <hybi@ietfa.amsl.com>; Thu,  4 Dec 2014 10:59:03 -0800 (PST)
Received: from mail-ig0-x232.google.com (mail-ig0-x232.google.com [IPv6:2607:f8b0:4001:c05::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9590D1A001A for <hybi@ietf.org>; Thu,  4 Dec 2014 10:59:03 -0800 (PST)
Received: by mail-ig0-f178.google.com with SMTP id hl2so15181043igb.17 for <hybi@ietf.org>; Thu, 04 Dec 2014 10:59:02 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;  h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=OyyzjAPKnL0eQjsTXwmiBNYUzeWNRN/9fA261FpJdkg=; b=K8xVYF/j6XgcAauy9KHRjZIHu+doxNpLdUXLEnZb3a/wTWAWKjeWYcLw2czG4CZqHV QHatAUpqF3kLFzoEM+VIvopf8YzllN0nIt/JfkJYoVBIby0tb2NhD20OyOCq9OSRfkpd q7p8pdtz+4RJNSqvsvIae3bfk2OmudmNQENNhG9wanT3OyHJ9wJcek7lmoj+sbp5D1pT MVtT3sNz0lxJjSe/dypnpOLjmZwvZrhcTVo1rcJ+HnONFiEYZXv3aMFejKS/5A0sbVJ0 MfVfC5QqGm09Y0F5O0h3kNAwMOfzrT4evhEbu4mIggWBwbRtOcexXW+7SoUYwZ3vB+ju eEuQ==
MIME-Version: 1.0
X-Received: by 10.107.13.12 with SMTP id 12mr11398408ion.68.1417719542678; Thu, 04 Dec 2014 10:59:02 -0800 (PST)
Sender: barryleiba.mailing.lists@gmail.com
Received: by 10.107.173.83 with HTTP; Thu, 4 Dec 2014 10:59:02 -0800 (PST)
In-Reply-To: <CALaySJ+=nsJFqjvuvWGi7DbAbFTXTCh_peTAidACBpj+ZGRyTw@mail.gmail.com>
References: <20141117203844.45BA5181C98@rfc-editor.org> <CALaySJ+=nsJFqjvuvWGi7DbAbFTXTCh_peTAidACBpj+ZGRyTw@mail.gmail.com>
Date: Thu, 4 Dec 2014 13:59:02 -0500
X-Google-Sender-Auth: eCXHaetA-8aAfd1j3uLHy6HOUtc
Message-ID: <CAC4RtVC6ecN302Wj+iCR0CZ8yN5tVYSOD=XX2Lm7zR-9hAxzVw@mail.gmail.com>
From: Barry Leiba <barryleiba@computer.org>
To: RFC Errata System <rfc-editor@rfc-editor.org>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Archived-At: http://mailarchive.ietf.org/arch/msg/hybi/dC4WlKn3dqNCxPMtAfTfn5B8eQA
Cc: Pete Resnick <presnick@qti.qualcomm.com>, "hybi@ietf.org" <hybi@ietf.org>, "ifette+ietf@google.com" <ifette+ietf@google.com>, jhall@futuresouth.us, Gabriel Montenegro <Gabriel.Montenegro@microsoft.com>
Subject: Re: [hybi] [Technical Errata Reported] RFC6455 (4184)
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi/>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 04 Dec 2014 18:59:07 -0000

> Thanks, Jonathan, for the report.  But first, let me say something
> about what the errata system is for:
> The errata system is meant for recording errors in specifications that
> would have been considered errors at the time of publication, but that
> got missed in the reviews.  It is not meant to record things that
> we've discovered *since* publication, in trying to implement the spec.
> Gaps in the spec that were discovered in the process of implementation
> aren't fodder for errata reports, but absolutely should be discussed
> on the <hybi@ietf.org> mailing list.
>
> So: My sense is that this report is in that latter category.  Yes?
> Perhaps work should be done on a document update, but I don't think
> this is errata material.

I haven't seen a response to this.  I'm going to give it until Monday,
8 Dec, before I mark this as Rejected, with a note recommending
discussion of these points on the hybi mailing list.

Barry, Applications AD

> On Mon, Nov 17, 2014 at 3:38 PM, RFC Errata System
> <rfc-editor@rfc-editor.org> wrote:
>> The following errata report has been submitted for RFC6455,
>> "The WebSocket Protocol".
>>
>> --------------------------------------
>> You may review the report below and at:
>> http://www.rfc-editor.org/errata_search.php?rfc=3D6455&eid=3D4184
>>
>> --------------------------------------
>> Type: Technical
>> Reported by: Jonathan Hall <jhall@futuresouth.us>
>>
>> Section: 5.4
>>
>> Original Text
>> -------------
>> 5.4.  Fragmentation
>>
>>    The primary purpose of fragmentation is to allow sending a message
>>    that is of unknown size when the message is started without having to
>>    buffer that message.  If messages couldn't be fragmented, then an
>>    endpoint would have to buffer the entire message so its length could
>>    be counted before the first byte is sent.  With fragmentation, a
>>    server or intermediary may choose a reasonable size buffer and, when
>>    the buffer is full, write a fragment to the network.
>>
>>    A secondary use-case for fragmentation is for multiplexing, where it
>>    is not desirable for a large message on one logical channel to
>>    monopolize the output channel, so the multiplexing needs to be free
>>    to split the message into smaller fragments to better share the
>>    output channel.  (Note that the multiplexing extension is not
>>    described in this document.)
>>
>>    Unless specified otherwise by an extension, frames have no semantic
>>    meaning.  An intermediary might coalesce and/or split frames, if no
>>    extensions were negotiated by the client and the server or if some
>>    extensions were negotiated, but the intermediary understood all the
>>    extensions negotiated and knows how to coalesce and/or split frames
>>    in the presence of these extensions.  One implication of this is that
>>    in absence of extensions, senders and receivers must not depend on
>>    the presence of specific frame boundaries.
>>
>>    The following rules apply to fragmentation:
>>
>>    o  An unfragmented message consists of a single frame with the FIN
>>       bit set (Section 5.2) and an opcode other than 0.
>>
>>    o  A fragmented message consists of a single frame with the FIN bit
>>       clear and an opcode other than 0, followed by zero or more frames
>>       with the FIN bit clear and the opcode set to 0, and terminated by
>>       a single frame with the FIN bit set and an opcode of 0.  A
>>       fragmented message is conceptually equivalent to a single larger
>>       message whose payload is equal to the concatenation of the
>>       payloads of the fragments in order; however, in the presence of
>>       extensions, this may not hold true as the extension defines the
>>       interpretation of the "Extension data" present.  For instance,
>>       "Extension data" may only be present at the beginning of the first
>>       fragment and apply to subsequent fragments, or there may be
>>       "Extension data" present in each of the fragments that applies
>>       only to that particular fragment.  In the absence of "Extension
>>       data", the following example demonstrates how fragmentation works.
>>
>>       EXAMPLE: For a text message sent as three fragments, the first
>>       fragment would have an opcode of 0x1 and a FIN bit clear, the
>>       second fragment would have an opcode of 0x0 and a FIN bit clear,
>>       and the third fragment would have an opcode of 0x0 and a FIN bit
>>       that is set.
>>
>>    o  Control frames (see Section 5.5) MAY be injected in the middle of
>>       a fragmented message.  Control frames themselves MUST NOT be
>>       fragmented.
>>
>>    o  Message fragments MUST be delivered to the recipient in the order
>>       sent by the sender.
>>
>>    o  The fragments of one message MUST NOT be interleaved between the
>>       fragments of another message unless an extension has been
>>       negotiated that can interpret the interleaving.
>>
>>    o  An endpoint MUST be capable of handling control frames in the
>>       middle of a fragmented message.
>>
>>    o  A sender MAY create fragments of any size for non-control
>>       messages.
>>
>>    o  Clients and servers MUST support receiving both fragmented and
>>       unfragmented messages.
>>
>>    o  As control frames cannot be fragmented, an intermediary MUST NOT
>>       attempt to change the fragmentation of a control frame.
>>
>>    o  An intermediary MUST NOT change the fragmentation of a message if
>>       any reserved bit values are used and the meaning of these values
>>       is not known to the intermediary.
>>
>>    o  An intermediary MUST NOT change the fragmentation of any message
>>       in the context of a connection where extensions have been
>>       negotiated and the intermediary is not aware of the semantics of
>>       the negotiated extensions.  Similarly, an intermediary that didn't
>>       see the WebSocket handshake (and wasn't notified about its
>>       content) that resulted in a WebSocket connection MUST NOT change
>>       the fragmentation of any message of such connection.
>>
>>    o  As a consequence of these rules, all fragments of a message are of
>>       the same type, as set by the first fragment's opcode.  Since
>>       control frames cannot be fragmented, the type for all fragments in
>>       a message MUST be either text, binary, or one of the reserved
>>       opcodes.
>>
>>    NOTE: If control frames could not be interjected, the latency of a
>>    ping, for example, would be very long if behind a large message.
>>    Hence, the requirement of handling control frames in the middle of a
>>    fragmented message.
>>
>>    IMPLEMENTATION NOTE: In the absence of any extension, a receiver
>>    doesn't have to buffer the whole frame in order to process it.  For
>>    example, if a streaming API is used, a part of a frame can be
>>    delivered to the application.  However, note that this assumption
>>    might not hold true for all future WebSocket extensions.
>>
>>
>> Corrected Text
>> --------------
>>
>>
>> Notes
>> -----
>> There is no indication or mention of the payload length of the frame wit=
h regards to fragmentation. In abstract, it's apparent that the payload len=
gth specified in the header of the frame corresponds to the actual frames p=
ayload length. However, implementations have been observed that allow the h=
eaders payload length to be specified as a higher length than the actual ra=
w payload of that frame. In the event that this occurs, some implementation=
s are reallocating memory to support the length of what is reported as the =
entire payload of all fragmented messages combined, and continue building t=
he buffer off of each frame from that point forward by allocating enough me=
mory for specified payload length. Obviously, this opens up the potential f=
or a memory consumption DoS attack on an implementation that uses this meth=
od. A lack of specification with regards to the RFC allows for such a mista=
ke to happen, as it is not clearly defined in the fragmentation section.
>>
>> The RFC specifies that fragmented messages should be used to send messag=
es of an unknown length, i.e. streaming media, and therefore should also sp=
ecify that the frame length bit should be preserved to the length of only t=
hat current frame and not be used to specify the overall payload length of =
all fragmented messages combined. Intermediaries should be forced to work w=
ith them on a frame-by-frame basis and to drop the connection of any instan=
ces where the specified length of the frames payload does not match the len=
gth of the actual raw payload data for that one frame.
>>
>> Instructions:
>> -------------
>> This erratum is currently posted as "Reported". If necessary, please
>> use "Reply All" to discuss whether it should be verified or
>> rejected. When a decision is reached, the verifying party (IESG)
>> can log in to change the status and edit the report, if necessary.
>>
>> --------------------------------------
>> RFC6455 (draft-ietf-hybi-thewebsocketprotocol-17)
>> --------------------------------------
>> Title               : The WebSocket Protocol
>> Publication Date    : December 2011
>> Author(s)           : I. Fette, A. Melnikov
>> Category            : PROPOSED STANDARD
>> Source              : BiDirectional or Server-Initiated HTTP
>> Area                : Applications
>> Stream              : IETF
>> Verifying Party     : IESG
>>
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi


From nobody Thu Dec  4 11:29:48 2014
Return-Path: <webmaster@zaphoyd.com>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 17E391A01D8 for <hybi@ietfa.amsl.com>; Thu,  4 Dec 2014 11:29:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] autolearn=ham
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 nu54qpO_Il1T for <hybi@ietfa.amsl.com>; Thu,  4 Dec 2014 11:29:43 -0800 (PST)
Received: from leaf101.mfilter.dimenoc.com (apple.mfilter.dimenoc.com [72.29.89.4]) by ietfa.amsl.com (Postfix) with ESMTP id 1AD071A0174 for <hybi@ietf.org>; Thu,  4 Dec 2014 11:29:43 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by leaf101.mfilter.dimenoc.com (Postfix) with ESMTP id 7878E6C014D for <hybi@ietf.org>; Thu,  4 Dec 2014 14:29:40 -0500 (EST)
X-Virus-Scanned: amavisd-new at leaf.mfilter.dimenoc.com
Received: from leaf101.mfilter.dimenoc.com ([127.0.0.1]) by localhost (leaf101.mfilter.dimenoc.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NZM8T3bmenM4 for <hybi@ietf.org>; Thu,  4 Dec 2014 14:29:38 -0500 (EST)
Received: from sh78.surpasshosting.com (sh78.surpasshosting.com [72.29.64.142]) by leaf101.mfilter.dimenoc.com (Postfix) with ESMTP for <hybi@ietf.org>; Thu,  4 Dec 2014 14:29:38 -0500 (EST)
Received: from cvpn-205-208-120-185.uchicago.edu ([205.208.120.185]:52128) by sh78.surpasshosting.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82) (envelope-from <webmaster@zaphoyd.com>) id 1Xwc5r-0001Oo-09; Thu, 04 Dec 2014 14:29:39 -0500
Content-Type: text/plain; charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\))
From: Peter Thorson <webmaster@zaphoyd.com>
In-Reply-To: <CANHVnYn32EEQU4wByMgThR0+_WNVWE9Pe0vTPp923Fp=HtcBRQ@mail.gmail.com>
Date: Thu, 4 Dec 2014 14:29:28 -0500
Content-Transfer-Encoding: quoted-printable
Message-Id: <B1DB6BD6-D49E-4560-9670-E52360F728E2@zaphoyd.com>
References: <CANHVnYn32EEQU4wByMgThR0+_WNVWE9Pe0vTPp923Fp=HtcBRQ@mail.gmail.com>
To: Jason Ricles <jgr208@alum.lehigh.edu>
X-Mailer: Apple Mail (2.1990.1)
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - sh78.surpasshosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - zaphoyd.com
X-Get-Message-Sender-Via: sh78.surpasshosting.com: authenticated_id: webmaster@zaphoyd.com
X-Source: 
X-Source-Args: 
X-Source-Dir: 
Archived-At: http://mailarchive.ietf.org/arch/msg/hybi/9ur-xsUKWhvjGQDZHqwUpIG3Ogs
Cc: hybi@ietf.org
Subject: Re: [hybi] websockets 1002 error
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi/>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 04 Dec 2014 19:29:46 -0000

Hi Jason,

Can you be more specific? In general, the 1002/protocol error is =
returned whenever one of the WebSocket endpoints does something that =
does not conform to the spec set out in RFC6455.

If you are working with third party software I would get in touch with =
its authors/official support channels. If you are working on your own =
implementation I=E2=80=99d suggest running the Autobahn test suite =
against it and take a careful look at the RFC6455 sections referencing =
the tests that fail.

Peter


> On Dec 3, 2014, at 08:50 , Jason Ricles <jgr208@alum.lehigh.edu> =
wrote:
>=20
> Hi I have a question about a 1002 protocol error I am getting with
> websockets, can anyone here help me to debug why this error is
> occurring?
>=20
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi


From nobody Thu Dec  4 11:33:18 2014
Return-Path: <barryleiba@gmail.com>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 74F9F1A02BE for <hybi@ietfa.amsl.com>; Thu,  4 Dec 2014 11:33:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.278
X-Spam-Level: 
X-Spam-Status: No, score=-1.278 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FM_FORGED_GMAIL=0.622, FREEMAIL_FROM=0.001, SPF_PASS=-0.001] autolearn=no
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 POV87m9VlDP3 for <hybi@ietfa.amsl.com>; Thu,  4 Dec 2014 11:33:10 -0800 (PST)
Received: from mail-la0-x236.google.com (mail-la0-x236.google.com [IPv6:2a00:1450:4010:c03::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6D1A91A0177 for <hybi@ietf.org>; Thu,  4 Dec 2014 11:33:09 -0800 (PST)
Received: by mail-la0-f54.google.com with SMTP id pv20so10349788lab.13 for <hybi@ietf.org>; Thu, 04 Dec 2014 11:33:07 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;  h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=pvI6N5O/Wbk2027wRZpzHzwIRIN/SJ9qW7fTbREnjYI=; b=Ke1ls184wMKXK4bZeAPdH1RpW2iO1J9ZnJ22N/LANa9hWCqckVORlIXw3AshIffh+8 T/1EemHYM5hI9lBNkklf4jATR8YqB2kpus1OnWF5MC5MPjaKfx0fWK3UtPt86x83hePl iJUIDKMI7BHIX0f5UYy9RI2++4SIRuy+a0/7WQMJGKzg0nQR/qJbxKQpkX9GbcZPihiA EeZaSlrkgwiDoXM7gImAv4f0Mw7q7f8kzXrP6Vyr1TEeVfw2XmijfF3IQfHPiWEbNY3S kuQaxmo7zmaRbtjGa0KCSm2wzi1axj5YQnKYx/C13xpfszJFSzVqN93adobeJsWIJq3g gkGw==
MIME-Version: 1.0
X-Received: by 10.112.166.74 with SMTP id ze10mr11112694lbb.68.1417721587734;  Thu, 04 Dec 2014 11:33:07 -0800 (PST)
Sender: barryleiba@gmail.com
Received: by 10.152.127.168 with HTTP; Thu, 4 Dec 2014 11:33:07 -0800 (PST)
In-Reply-To: <D0A60BAF.1C012%jhall@futuresouth.us>
References: <CAC4RtVC6ecN302Wj+iCR0CZ8yN5tVYSOD=XX2Lm7zR-9hAxzVw@mail.gmail.com> <D0A60BAF.1C012%jhall@futuresouth.us>
Date: Thu, 4 Dec 2014 14:33:07 -0500
X-Google-Sender-Auth: C8pfncy9l88C114b3LH2-spM2W4
Message-ID: <CALaySJKoskLqx9WExQpE4XKsvmCuKnxqnJnz0n=krMghvywVYg@mail.gmail.com>
From: Barry Leiba <barryleiba@computer.org>
To: Jonathan Hall <jhall@futuresouth.us>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Archived-At: http://mailarchive.ietf.org/arch/msg/hybi/s9lANrXj9LcNeuOrTrPVQaTdGgI
Cc: Pete Resnick <presnick@qti.qualcomm.com>, "hybi@ietf.org" <hybi@ietf.org>, "ifette+ietf@google.com" <ifette+ietf@google.com>, Gabriel Montenegro <Gabriel.Montenegro@microsoft.com>, RFC Errata System <rfc-editor@rfc-editor.org>
Subject: Re: [hybi] [Technical Errata Reported] RFC6455 (4184)
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi/>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 04 Dec 2014 19:33:12 -0000

> My apologies for using the errata system to report this. This is the firs=
t
> time I=B9ve worked with commenting or giving opinions on RFC=B9s, so I
> appreciate the guidance on proper processes and channels for submitting
> such information. I=B9ve taken note of your advice and will be sure to us=
e
> the mailing list from this point forward for any
> comments/questions/concerns discovered during implementation.

Great; no need to apologize: it would be good if we had more
information about how to comment on RFCs when errata reports aren't
the best way.  And thanks for understanding.

I encourage you to continue the discussion on the hybi list.  (Please
start a separate discussion thread, and trim the extra folks off the
distribution list... just keep <hybi@ietf.org>.)

I'm off to close out the errata report now.

Barry

> The reason I found the notes I submitted to be of value is because I have
> actually seen implementations that are taking the specified length of the
> frame and allocating memory for it without verifying the length of the
> actual payload data being received in that frame. A successful memory
> consumption PoC was written by an individual who tested it initially
> against a library that was somewhat popular at the time. I felt that the
> document was overall very straight forward and concise, but did leave the
> opportunity for someone to make a similar mistake pertaining to fragmente=
d
> frames. But the more I think about it, the mistake could also be made wit=
h
> acceptance of frames in general. That is to say, if a frame specifies the
> payload is X amount of bytes, but the payload is really Y amount of bytes=
,
> one should - in their implementation - check to ensure the payload length
> actually does match the purported length of the payload in the frame. In
> the implementations I did encounter, the only time they accepted a frame
> that the frame-payload-length did not match the length of the actual raw
> payload was when the fin bit was set to 0. The only thing I could
> attribute that mistake to was a misunderstanding or misinterpretation of
> the RFC.
>
> Thank you everyone who has participated in this discussion and followed u=
p
> on it.
>
> Jonathan D. Hall
>
> Future South Technologies
> www.futuresouth.us
> (504) 470-3748 =AD [main]
> (504) 232-3306 =AD  [cell]
>
>
> Life is a dream for the wise, a game for the fool, a comedy for the rich
> and a tragedy for the poor.
>
>
>
>
>
>
> On 12/4/14, 12:59 PM, "Barry Leiba" <barryleiba@computer.org> wrote:
>
>>> Thanks, Jonathan, for the report.  But first, let me say something
>>> about what the errata system is for:
>>> The errata system is meant for recording errors in specifications that
>>> would have been considered errors at the time of publication, but that
>>> got missed in the reviews.  It is not meant to record things that
>>> we've discovered *since* publication, in trying to implement the spec.
>>> Gaps in the spec that were discovered in the process of implementation
>>> aren't fodder for errata reports, but absolutely should be discussed
>>> on the <hybi@ietf.org> mailing list.
>>>
>>> So: My sense is that this report is in that latter category.  Yes?
>>> Perhaps work should be done on a document update, but I don't think
>>> this is errata material.
>>
>>I haven't seen a response to this.  I'm going to give it until Monday,
>>8 Dec, before I mark this as Rejected, with a note recommending
>>discussion of these points on the hybi mailing list.
>>
>>Barry, Applications AD
>>
>>> On Mon, Nov 17, 2014 at 3:38 PM, RFC Errata System
>>> <rfc-editor@rfc-editor.org> wrote:
>>>> The following errata report has been submitted for RFC6455,
>>>> "The WebSocket Protocol".
>>>>
>>>> --------------------------------------
>>>> You may review the report below and at:
>>>> http://www.rfc-editor.org/errata_search.php?rfc=3D6455&eid=3D4184
>>>>
>>>> --------------------------------------
>>>> Type: Technical
>>>> Reported by: Jonathan Hall <jhall@futuresouth.us>
>>>>
>>>> Section: 5.4
>>>>
>>>> Original Text
>>>> -------------
>>>> 5.4.  Fragmentation
>>>>
>>>>    The primary purpose of fragmentation is to allow sending a message
>>>>    that is of unknown size when the message is started without having
>>>>to
>>>>    buffer that message.  If messages couldn't be fragmented, then an
>>>>    endpoint would have to buffer the entire message so its length coul=
d
>>>>    be counted before the first byte is sent.  With fragmentation, a
>>>>    server or intermediary may choose a reasonable size buffer and, whe=
n
>>>>    the buffer is full, write a fragment to the network.
>>>>
>>>>    A secondary use-case for fragmentation is for multiplexing, where i=
t
>>>>    is not desirable for a large message on one logical channel to
>>>>    monopolize the output channel, so the multiplexing needs to be free
>>>>    to split the message into smaller fragments to better share the
>>>>    output channel.  (Note that the multiplexing extension is not
>>>>    described in this document.)
>>>>
>>>>    Unless specified otherwise by an extension, frames have no semantic
>>>>    meaning.  An intermediary might coalesce and/or split frames, if no
>>>>    extensions were negotiated by the client and the server or if some
>>>>    extensions were negotiated, but the intermediary understood all the
>>>>    extensions negotiated and knows how to coalesce and/or split frames
>>>>    in the presence of these extensions.  One implication of this is
>>>>that
>>>>    in absence of extensions, senders and receivers must not depend on
>>>>    the presence of specific frame boundaries.
>>>>
>>>>    The following rules apply to fragmentation:
>>>>
>>>>    o  An unfragmented message consists of a single frame with the FIN
>>>>       bit set (Section 5.2) and an opcode other than 0.
>>>>
>>>>    o  A fragmented message consists of a single frame with the FIN bit
>>>>       clear and an opcode other than 0, followed by zero or more frame=
s
>>>>       with the FIN bit clear and the opcode set to 0, and terminated b=
y
>>>>       a single frame with the FIN bit set and an opcode of 0.  A
>>>>       fragmented message is conceptually equivalent to a single larger
>>>>       message whose payload is equal to the concatenation of the
>>>>       payloads of the fragments in order; however, in the presence of
>>>>       extensions, this may not hold true as the extension defines the
>>>>       interpretation of the "Extension data" present.  For instance,
>>>>       "Extension data" may only be present at the beginning of the
>>>>first
>>>>       fragment and apply to subsequent fragments, or there may be
>>>>       "Extension data" present in each of the fragments that applies
>>>>       only to that particular fragment.  In the absence of "Extension
>>>>       data", the following example demonstrates how fragmentation
>>>>works.
>>>>
>>>>       EXAMPLE: For a text message sent as three fragments, the first
>>>>       fragment would have an opcode of 0x1 and a FIN bit clear, the
>>>>       second fragment would have an opcode of 0x0 and a FIN bit clear,
>>>>       and the third fragment would have an opcode of 0x0 and a FIN bit
>>>>       that is set.
>>>>
>>>>    o  Control frames (see Section 5.5) MAY be injected in the middle o=
f
>>>>       a fragmented message.  Control frames themselves MUST NOT be
>>>>       fragmented.
>>>>
>>>>    o  Message fragments MUST be delivered to the recipient in the orde=
r
>>>>       sent by the sender.
>>>>
>>>>    o  The fragments of one message MUST NOT be interleaved between the
>>>>       fragments of another message unless an extension has been
>>>>       negotiated that can interpret the interleaving.
>>>>
>>>>    o  An endpoint MUST be capable of handling control frames in the
>>>>       middle of a fragmented message.
>>>>
>>>>    o  A sender MAY create fragments of any size for non-control
>>>>       messages.
>>>>
>>>>    o  Clients and servers MUST support receiving both fragmented and
>>>>       unfragmented messages.
>>>>
>>>>    o  As control frames cannot be fragmented, an intermediary MUST NOT
>>>>       attempt to change the fragmentation of a control frame.
>>>>
>>>>    o  An intermediary MUST NOT change the fragmentation of a message i=
f
>>>>       any reserved bit values are used and the meaning of these values
>>>>       is not known to the intermediary.
>>>>
>>>>    o  An intermediary MUST NOT change the fragmentation of any message
>>>>       in the context of a connection where extensions have been
>>>>       negotiated and the intermediary is not aware of the semantics of
>>>>       the negotiated extensions.  Similarly, an intermediary that
>>>>didn't
>>>>       see the WebSocket handshake (and wasn't notified about its
>>>>       content) that resulted in a WebSocket connection MUST NOT change
>>>>       the fragmentation of any message of such connection.
>>>>
>>>>    o  As a consequence of these rules, all fragments of a message are
>>>>of
>>>>       the same type, as set by the first fragment's opcode.  Since
>>>>       control frames cannot be fragmented, the type for all fragments
>>>>in
>>>>       a message MUST be either text, binary, or one of the reserved
>>>>       opcodes.
>>>>
>>>>    NOTE: If control frames could not be interjected, the latency of a
>>>>    ping, for example, would be very long if behind a large message.
>>>>    Hence, the requirement of handling control frames in the middle of =
a
>>>>    fragmented message.
>>>>
>>>>    IMPLEMENTATION NOTE: In the absence of any extension, a receiver
>>>>    doesn't have to buffer the whole frame in order to process it.  For
>>>>    example, if a streaming API is used, a part of a frame can be
>>>>    delivered to the application.  However, note that this assumption
>>>>    might not hold true for all future WebSocket extensions.
>>>>
>>>>
>>>> Corrected Text
>>>> --------------
>>>>
>>>>
>>>> Notes
>>>> -----
>>>> There is no indication or mention of the payload length of the frame
>>>>with regards to fragmentation. In abstract, it's apparent that the
>>>>payload length specified in the header of the frame corresponds to the
>>>>actual frames payload length. However, implementations have been
>>>>observed that allow the headers payload length to be specified as a
>>>>higher length than the actual raw payload of that frame. In the event
>>>>that this occurs, some implementations are reallocating memory to
>>>>support the length of what is reported as the entire payload of all
>>>>fragmented messages combined, and continue building the buffer off of
>>>>each frame from that point forward by allocating enough memory for
>>>>specified payload length. Obviously, this opens up the potential for a
>>>>memory consumption DoS attack on an implementation that uses this
>>>>method. A lack of specification with regards to the RFC allows for such
>>>>a mistake to happen, as it is not clearly defined in the fragmentation
>>>>section.
>>>>
>>>> The RFC specifies that fragmented messages should be used to send
>>>>messages of an unknown length, i.e. streaming media, and therefore
>>>>should also specify that the frame length bit should be preserved to
>>>>the length of only that current frame and not be used to specify the
>>>>overall payload length of all fragmented messages combined.
>>>>Intermediaries should be forced to work with them on a frame-by-frame
>>>>basis and to drop the connection of any instances where the specified
>>>>length of the frames payload does not match the length of the actual
>>>>raw payload data for that one frame.
>>>>
>>>> Instructions:
>>>> -------------
>>>> This erratum is currently posted as "Reported". If necessary, please
>>>> use "Reply All" to discuss whether it should be verified or
>>>> rejected. When a decision is reached, the verifying party (IESG)
>>>> can log in to change the status and edit the report, if necessary.
>>>>
>>>> --------------------------------------
>>>> RFC6455 (draft-ietf-hybi-thewebsocketprotocol-17)
>>>> --------------------------------------
>>>> Title               : The WebSocket Protocol
>>>> Publication Date    : December 2011
>>>> Author(s)           : I. Fette, A. Melnikov
>>>> Category            : PROPOSED STANDARD
>>>> Source              : BiDirectional or Server-Initiated HTTP
>>>> Area                : Applications
>>>> Stream              : IETF
>>>> Verifying Party     : IESG
>>>>
>>>
>>> _______________________________________________
>>> hybi mailing list
>>> hybi@ietf.org
>>> https://www.ietf.org/mailman/listinfo/hybi
>


From nobody Thu Dec  4 11:35:59 2014
Return-Path: <wwwrun@rfc-editor.org>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 28C431A020B; Thu,  4 Dec 2014 11:35:52 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.912
X-Spam-Level: 
X-Spam-Status: No, score=-1.912 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
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 PnOnON_KMiIt; Thu,  4 Dec 2014 11:35:48 -0800 (PST)
Received: from rfc-editor.org (rfc-editor.org [IPv6:2001:1900:3001:11::31]) by ietfa.amsl.com (Postfix) with ESMTP id 93A2F1A020A; Thu,  4 Dec 2014 11:35:48 -0800 (PST)
Received: by rfc-editor.org (Postfix, from userid 30) id CAECD181CDC; Thu,  4 Dec 2014 11:35:13 -0800 (PST)
To: jhall@futuresouth.us, ifette+ietf@google.com, Alexey.Melnikov@isode.com
X-PHP-Originating-Script: 1005:errata_mail_lib.php
From: RFC Errata System <rfc-editor@rfc-editor.org>
Message-Id: <20141204193513.CAECD181CDC@rfc-editor.org>
Date: Thu,  4 Dec 2014 11:35:13 -0800 (PST)
Archived-At: http://mailarchive.ietf.org/arch/msg/hybi/rVq1sufbNCTWxuiHffNyHRMFtCI
Cc: hybi@ietf.org, barryleiba@computer.org, iesg@ietf.org, rfc-editor@rfc-editor.org
Subject: [hybi] [Errata Rejected] RFC6455 (4184)
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi/>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 04 Dec 2014 19:35:52 -0000

The following errata report has been rejected for RFC6455,
"The WebSocket Protocol".

--------------------------------------
You may review the report below and at:
http://www.rfc-editor.org/errata_search.php?rfc=6455&eid=4184

--------------------------------------
Status: Rejected
Type: Technical

Reported by: Jonathan Hall <jhall@futuresouth.us>
Date Reported: 2014-11-17
Rejected by: Barry Leiba (IESG)

Section: 5.4

Original Text
-------------
5.4.  Fragmentation

   The primary purpose of fragmentation is to allow sending a message
   that is of unknown size when the message is started without having to
   buffer that message.  If messages couldn't be fragmented, then an
   endpoint would have to buffer the entire message so its length could
   be counted before the first byte is sent.  With fragmentation, a
   server or intermediary may choose a reasonable size buffer and, when
   the buffer is full, write a fragment to the network.

   A secondary use-case for fragmentation is for multiplexing, where it
   is not desirable for a large message on one logical channel to
   monopolize the output channel, so the multiplexing needs to be free
   to split the message into smaller fragments to better share the
   output channel.  (Note that the multiplexing extension is not
   described in this document.)

   Unless specified otherwise by an extension, frames have no semantic
   meaning.  An intermediary might coalesce and/or split frames, if no
   extensions were negotiated by the client and the server or if some
   extensions were negotiated, but the intermediary understood all the
   extensions negotiated and knows how to coalesce and/or split frames
   in the presence of these extensions.  One implication of this is that
   in absence of extensions, senders and receivers must not depend on
   the presence of specific frame boundaries.

   The following rules apply to fragmentation:

   o  An unfragmented message consists of a single frame with the FIN
      bit set (Section 5.2) and an opcode other than 0.

   o  A fragmented message consists of a single frame with the FIN bit
      clear and an opcode other than 0, followed by zero or more frames
      with the FIN bit clear and the opcode set to 0, and terminated by
      a single frame with the FIN bit set and an opcode of 0.  A
      fragmented message is conceptually equivalent to a single larger
      message whose payload is equal to the concatenation of the
      payloads of the fragments in order; however, in the presence of
      extensions, this may not hold true as the extension defines the
      interpretation of the "Extension data" present.  For instance,
      "Extension data" may only be present at the beginning of the first
      fragment and apply to subsequent fragments, or there may be
      "Extension data" present in each of the fragments that applies
      only to that particular fragment.  In the absence of "Extension
      data", the following example demonstrates how fragmentation works.

      EXAMPLE: For a text message sent as three fragments, the first
      fragment would have an opcode of 0x1 and a FIN bit clear, the
      second fragment would have an opcode of 0x0 and a FIN bit clear,
      and the third fragment would have an opcode of 0x0 and a FIN bit
      that is set.

   o  Control frames (see Section 5.5) MAY be injected in the middle of
      a fragmented message.  Control frames themselves MUST NOT be
      fragmented.

   o  Message fragments MUST be delivered to the recipient in the order
      sent by the sender.

   o  The fragments of one message MUST NOT be interleaved between the
      fragments of another message unless an extension has been
      negotiated that can interpret the interleaving.

   o  An endpoint MUST be capable of handling control frames in the
      middle of a fragmented message.

   o  A sender MAY create fragments of any size for non-control
      messages.

   o  Clients and servers MUST support receiving both fragmented and
      unfragmented messages.

   o  As control frames cannot be fragmented, an intermediary MUST NOT
      attempt to change the fragmentation of a control frame.

   o  An intermediary MUST NOT change the fragmentation of a message if
      any reserved bit values are used and the meaning of these values
      is not known to the intermediary.

   o  An intermediary MUST NOT change the fragmentation of any message
      in the context of a connection where extensions have been
      negotiated and the intermediary is not aware of the semantics of
      the negotiated extensions.  Similarly, an intermediary that didn't
      see the WebSocket handshake (and wasn't notified about its
      content) that resulted in a WebSocket connection MUST NOT change
      the fragmentation of any message of such connection.

   o  As a consequence of these rules, all fragments of a message are of
      the same type, as set by the first fragment's opcode.  Since
      control frames cannot be fragmented, the type for all fragments in
      a message MUST be either text, binary, or one of the reserved
      opcodes.

   NOTE: If control frames could not be interjected, the latency of a
   ping, for example, would be very long if behind a large message.
   Hence, the requirement of handling control frames in the middle of a
   fragmented message.

   IMPLEMENTATION NOTE: In the absence of any extension, a receiver
   doesn't have to buffer the whole frame in order to process it.  For
   example, if a streaming API is used, a part of a frame can be
   delivered to the application.  However, note that this assumption
   might not hold true for all future WebSocket extensions.


Corrected Text
--------------


Notes
-----
There is no indication or mention of the payload length of the frame with regards to fragmentation. In abstract, it's apparent that the payload length specified in the header of the frame corresponds to the actual frames payload length. However, implementations have been observed that allow the headers payload length to be specified as a higher length than the actual raw payload of that frame. In the event that this occurs, some implementations are reallocating memory to support the length of what is reported as the entire payload of all fragmented messages combined, and continue building the buffer off of each frame from that point forward by allocating enough memory for specified payload length. Obviously, this opens up the potential for a memory consumption DoS attack on an implementation that uses this method. A lack of specification with regards to the RFC allows for such a mistake to happen, as it is not clearly defined in the fragmentation section.

The RFC specifies that fragmented messages should be used to send messages of an unknown length, i.e. streaming media, and therefore should also specify that the frame length bit should be preserved to the length of only that current frame and not be used to specify the overall payload length of all fragmented messages combined. Implementations should be forced to work with them on a frame-by-frame basis and to drop the connection of any instances where the specified length of the frames payload does not match the length of the actual raw payload data for that one frame.
 --VERIFIER NOTES-- 
Thanks, Jonathan, for some useful comments.  As we discussed, these aren't appropriate for the errata system, but should be discussed on the relevant mailing list for possibly inclusion in an update or follow-on to the document.  That list is <hybi@ietf.org>.

--------------------------------------
RFC6455 (draft-ietf-hybi-thewebsocketprotocol-17)
--------------------------------------
Title               : The WebSocket Protocol
Publication Date    : December 2011
Author(s)           : I. Fette, A. Melnikov
Category            : PROPOSED STANDARD
Source              : BiDirectional or Server-Initiated HTTP
Area                : Applications
Stream              : IETF
Verifying Party     : IESG


From nobody Fri Dec 19 13:37:02 2014
Return-Path: <barryleiba.mailing.lists@gmail.com>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D2E701AC3D0 for <hybi@ietfa.amsl.com>; Fri, 19 Dec 2014 13:37:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.278
X-Spam-Level: 
X-Spam-Status: No, score=-1.278 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FM_FORGED_GMAIL=0.622, FREEMAIL_FROM=0.001, SPF_PASS=-0.001] autolearn=no
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 JfRzjvuuBa_p for <hybi@ietfa.amsl.com>; Fri, 19 Dec 2014 13:36:56 -0800 (PST)
Received: from mail-ie0-x234.google.com (mail-ie0-x234.google.com [IPv6:2607:f8b0:4001:c03::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B604B1A86F2 for <hybi@ietf.org>; Fri, 19 Dec 2014 13:36:56 -0800 (PST)
Received: by mail-ie0-f180.google.com with SMTP id rp18so1521940iec.11 for <hybi@ietf.org>; Fri, 19 Dec 2014 13:36:55 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;  h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=y9oZYdHm79laSCwbbr9TBXKRcMobAyFQWUX91TvyT0c=; b=XLfpjBCl5KwCe57Q7bvNGELd5Y0TcWNj+Mx1PVh90LULWvi3/UVHQSYl3Q2Tb8H/+S EmzL6YRrQ7b4BOwKhJ0ovngskOKmXTIChpxFRyDat+Uq1SMVD96lGC6YbuErsgci9GbE Edd8DaF4PbhPnhhpfvc6jEpgLZSeh8bTPQaxe/416/jdQ/WsF+nX9eruPkfU2DUYBSqa 0svoGmrShteMWLkWm+sXU6ntyIW3/Dg/moWkdkyWA3q2UWHDJyWOQQxDk8nJAcx2CNIl V6PBYfsXZi2HFhV36dPCnb1laLdU6DGr7l2KVoNWK75X5a6kgWXcyodFyTxNQqYTgJnV aBcQ==
MIME-Version: 1.0
X-Received: by 10.50.61.201 with SMTP id s9mr5254202igr.29.1419025015791; Fri, 19 Dec 2014 13:36:55 -0800 (PST)
Sender: barryleiba.mailing.lists@gmail.com
Received: by 10.107.173.83 with HTTP; Fri, 19 Dec 2014 13:36:55 -0800 (PST)
In-Reply-To: <CAC4RtVCcfkQqjRUHw-AcYxN=C_jkYztAivD7yYJ48bV2yz=0dQ@mail.gmail.com>
References: <CAC4RtVCcfkQqjRUHw-AcYxN=C_jkYztAivD7yYJ48bV2yz=0dQ@mail.gmail.com>
Date: Fri, 19 Dec 2014 16:36:55 -0500
X-Google-Sender-Auth: PV8sNivSYKXIG10RwIIFU-Pt8Xk
Message-ID: <CAC4RtVA2ayF-d7X25hvF4=zyOL3oA5EHX1CWke7GqwJydfr==g@mail.gmail.com>
From: Barry Leiba <barryleiba@computer.org>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
Content-Type: text/plain; charset=UTF-8
Archived-At: http://mailarchive.ietf.org/arch/msg/hybi/sWa1Bd6qMf7gNiTTX0K2JE1nVok
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] (Not yet) Closing the hybi working group
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi/>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 19 Dec 2014 21:37:01 -0000

Salvatore?

On Tue, Nov 4, 2014 at 12:26 PM, Barry Leiba <barryleiba@computer.org> wrote:
> On Thu, Oct 16, 2014 at 2:21 PM, Salvatore Loreto
> <salvatore.loreto@ericsson.com> wrote:
>>
>> I will review the draft next-next week (starting October 27 after the IETF
>> submission deadline)
>>  to check the status and evaluate its readiness for publication.
>>
>> I will work (via mail or phone) with Takeshi in case I find that some
>> editing still needs to be done.
>> I hope it works for Takeshi as well.
>
> Where are we on this?
>
> Barry

