Re: [hybi] Review of draft-ietf-hybi-thewebsocketprotocol-13

"Richard L. Barnes" <rbarnes@bbn.com> Tue, 06 September 2011 17:39 UTC

Return-Path: <rbarnes@bbn.com>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6B30B21F8C8A; Tue, 6 Sep 2011 10:39:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.402
X-Spam-Level:
X-Spam-Status: No, score=-106.402 tagged_above=-999 required=5 tests=[AWL=-0.103, BAYES_00=-2.599, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
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 c2+5eP7PjaEV; Tue, 6 Sep 2011 10:39:35 -0700 (PDT)
Received: from smtp.bbn.com (smtp.bbn.com [128.33.1.81]) by ietfa.amsl.com (Postfix) with ESMTP id C084A21F8C86; Tue, 6 Sep 2011 10:39:35 -0700 (PDT)
Received: from ros-dhcp192-1-51-76.bbn.com ([192.1.51.76]:61771) by smtp.bbn.com with esmtps (TLSv1:AES128-SHA:128) (Exim 4.74 (FreeBSD)) (envelope-from <rbarnes@bbn.com>) id 1R0zeE-000LSZ-D0; Tue, 06 Sep 2011 13:41:22 -0400
Mime-Version: 1.0 (Apple Message framework v1084)
Content-Type: text/plain; charset="iso-8859-1"
From: "Richard L. Barnes" <rbarnes@bbn.com>
In-Reply-To: <CALiegfmn0e8Ei9x-KnH3Ejh3TBHy2gv-dfHMStoTYxZrjWH-Sg@mail.gmail.com>
Date: Tue, 06 Sep 2011 13:41:21 -0400
Content-Transfer-Encoding: quoted-printable
Message-Id: <9FDB497E-960E-4F53-B978-C343564C39EE@bbn.com>
References: <942CCA6B-B784-441B-96CA-3506FFC439E1@bbn.com> <4E620046.2000400@isode.com> <E566DD99-64E5-47DF-A24C-3AA4E2EA20CA@bbn.com> <634914A010D0B943A035D226786325D422C0EB8DED@EXVMBX020-12.exch020.serverdata.net> <2E9037FF-84E3-4DAE-877C-592CB2DEA9A7@bbn.com> <CALiegfmn0e8Ei9x-KnH3Ejh3TBHy2gv-dfHMStoTYxZrjWH-Sg@mail.gmail.com>
To: Iñaki Baz Castillo <ibc@aliax.net>
X-Mailer: Apple Mail (2.1084)
Cc: General Area Review Team <gen-art@ietf.org>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Review of draft-ietf-hybi-thewebsocketprotocol-13
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.12
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: Tue, 06 Sep 2011 17:39:36 -0000

Giant WebSocket messages are a new vector, however.

The only point here is to point out the new vector and recommend healthy implementation practices.  It's an implementation recommendation, not an interoperability concern.  

Wouldn't you agree that HTTP servers would be less vulnerable to SlowLoris if they imposed limits on the number of HTTP headers of the length of time that a request must take?  All I'm suggesting is that this document suggest similar good habits.

--Richard


On Sep 6, 2011, at 1:37 PM, Iñaki Baz Castillo wrote:

> 2011/9/6 Richard L. Barnes <rbarnes@bbn.com>:
>> In all of these examples, the implementation is imposing "some limit" (the streamer just has an effective zero limit).  The exhaustion/DoS possibilities arise when an implementation doesn't enforce a limit -- just keeps growing the buffer as long as frames keep coming.  That's the reason for making the recommendation for "some limit" a MUST instead of a MAY -- if you don't enforce some limit, then someone on the other end can force you to accept unlimited data.
> 
> This is not a good argument. Think in HTTP. I can send an HTTP request
> with "infinite" headers to a HTTP server expecting that the server
> would buffer all of them and suffer of DoS. See:
> 
>  http://ha.ckers.org/slowloris/
> 
> And note that HTTP protocol does NOT provide something like "HTTP
> headers max size" negotiation at all. It's up to the HTTP server to
> determine whether to consider incoming request as a DoS or not and act
> according.
> 
> And what I've explained aslo applies to any other headers-based text
> protocol and others (SIP, XMPP, FTP....).
> 
> 
> 
> -- 
> Iñaki Baz Castillo
> <ibc@aliax.net>