Re: [hybi] Extensibility mechanisms?

Jamie Lokier <jamie@shareable.org> Mon, 26 July 2010 22:26 UTC

Return-Path: <jamie@shareable.org>
X-Original-To: hybi@core3.amsl.com
Delivered-To: hybi@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id C4C9A3A6872 for <hybi@core3.amsl.com>; Mon, 26 Jul 2010 15:26:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.473
X-Spam-Level:
X-Spam-Status: No, score=-2.473 tagged_above=-999 required=5 tests=[AWL=0.126, BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iiZbXAKdPdWY for <hybi@core3.amsl.com>; Mon, 26 Jul 2010 15:26:16 -0700 (PDT)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id D76E13A6897 for <hybi@ietf.org>; Mon, 26 Jul 2010 15:26:15 -0700 (PDT)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1OdW83-000439-O8; Mon, 26 Jul 2010 23:26:35 +0100
Date: Mon, 26 Jul 2010 23:26:35 +0100
From: Jamie Lokier <jamie@shareable.org>
To: Scott Ferguson <ferg@caucho.com>
Message-ID: <20100726222635.GD23142@shareable.org>
References: <AANLkTikLDjBP-Xs5t6TxmJuq4nG8jwThQ=n34B4cEmup@mail.gmail.com> <4C479CE4.6070805@caucho.com> <AANLkTims1er0Rbv0ysP4gRs1Kd0He8hapHeJ3nON=JQa@mail.gmail.com> <4C47C5B0.3030006@caucho.com> <AANLkTi=ND-FOH8OoD=TCbiyeSZ-h0LhxQBXN5w-2hfvj@mail.gmail.com> <4C48A468.3040009@caucho.com> <AANLkTikeLr325F03bowJu7NeHEqY_+OzEnQcrxHbCwhW@mail.gmail.com> <4C48AF24.2040501@caucho.com> <AANLkTinodV_uPvJLxSG_uyg9pjeCjC=iDOxP0SinGxtN@mail.gmail.com> <4C48B3EC.8040908@caucho.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <4C48B3EC.8040908@caucho.com>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Extensibility mechanisms?
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/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: Mon, 26 Jul 2010 22:26:17 -0000

Scott Ferguson wrote:
> Adam Barth wrote:
> >On Thu, Jul 22, 2010 at 1:50 PM, Scott Ferguson <ferg@caucho.com> wrote:
> >  
> >>Adam Barth wrote:
> >>    
> >>>We need to know the server understands web sockets before spamming
> >>>them with attacker-controlled bytes.  If we don't, we'll repeat the
> >>>long and tragic history of cross-protocol vulnerabilities caused by
> >>>HTTP POST.
> >>>
> >>>This is a hard requirement.
> >>>      
> >>Then I think it should be added to the requirements document, because 
> >>that's
> >>a fundamental design decision.
> >>    
> >
> >   REQ. 19:  WebSocket should be designed to be robust against cross-
> >      protocol attacks.  The protocol design should consider and
> >      mitigate the risk presented by WebSocket clients to existing
> >      servers (including HTTP servers).  It should also consider and
> >      mitigate the risk to WebSocket servers presented by clients for
> >      other protocols (including HTTP).
> >  
> Yes, but that's not specific enough for your requirement because 
> "consider and mitigate" doesn't necessarily imply "client must validate 
> server before sending content."
> 
> As long as everyone's clear and agrees on the "client must validate 
> server before sending content" requirement, then we're fine.

It seems a strange leap of logic, as it isn't the only way to mitigate
the attack risk and it has perceptible negative consequences.

Anyway I can't see how "client must validate server before sending
content" can be satisfied.  Clients are free to encode their content
in the subprotocol field, and JavaScript apps might actually resort to
that if it's the only way to hack around that side of the RT delay.
I'm not sure if the API gives any way for JS apps to retrieve anything
interesting sent on the other side of the handshake.

Note I have no problem with "client must validate server before
sending WebSocket encoded frames / dangerous frames / non-HTTP frames
(take your pick)" .

-- Jamie