Re: [hybi] Why redirects are a bad for the security of WebSockets (was Re: Clarify wheter HTTP responses other than 101 are valid)

Iñaki Baz Castillo <ibc@aliax.net> Mon, 28 March 2011 23:20 UTC

Return-Path: <ibc@aliax.net>
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 0DFB63A6A74 for <hybi@core3.amsl.com>; Mon, 28 Mar 2011 16:20:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.631
X-Spam-Level:
X-Spam-Status: No, score=-2.631 tagged_above=-999 required=5 tests=[AWL=0.046, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 5wnTCKl3geIX for <hybi@core3.amsl.com>; Mon, 28 Mar 2011 16:20:57 -0700 (PDT)
Received: from mail-qy0-f172.google.com (mail-qy0-f172.google.com [209.85.216.172]) by core3.amsl.com (Postfix) with ESMTP id 927473A6960 for <hybi@ietf.org>; Mon, 28 Mar 2011 16:20:57 -0700 (PDT)
Received: by qyk29 with SMTP id 29so1499279qyk.10 for <hybi@ietf.org>; Mon, 28 Mar 2011 16:22:35 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.229.122.81 with SMTP id k17mr3898785qcr.239.1301354554807; Mon, 28 Mar 2011 16:22:34 -0700 (PDT)
Received: by 10.229.35.72 with HTTP; Mon, 28 Mar 2011 16:22:34 -0700 (PDT)
In-Reply-To: <BANLkTi=0a84PA+2hN9U7S9uvNWgmestE2g@mail.gmail.com>
References: <BANLkTi=0a84PA+2hN9U7S9uvNWgmestE2g@mail.gmail.com>
Date: Tue, 29 Mar 2011 01:22:34 +0200
Message-ID: <BANLkTikOeQA5SCx5GdoBZOa5UcdfRQPZVg@mail.gmail.com>
From: Iñaki Baz Castillo <ibc@aliax.net>
To: Adam Barth <ietf@adambarth.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org, Patrick McManus <pmcmanus@mozilla.com>
Subject: Re: [hybi] Why redirects are a bad for the security of WebSockets (was Re: Clarify wheter HTTP responses other than 101 are valid)
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, 28 Mar 2011 23:20:59 -0000

2011/3/28 Adam Barth <ietf@adambarth.com>:
> Reading this code, it's quite natural to assume that sending and
> receiving information on socket will actually communicate with
> example.com.  For example, I might send confidential information to
> example.com or rely upon the integrity of information received from
> example.com.  However, if example.com has has an open redirector (as
> is extremely common on the Internet), this assumption is incorrect and
> leads to vulnerabilities.

Let me a question: if you would trust the connection with example.com,
why shouldn't you trust it in case it redirects you to other place?



> Now, we can wring our hands and claim that this sort of issue isn't
> our problem, but it is.  Simply warning folks about these traps in
> Security Considerations is just passing the buck.  Instead, we
> shouldn't add this complexity to WebSockets at this time.  We can
> always change out minds and add support for redirects in the future,
> but we can never remove support once added.

Which is the main advantage/feature HTTP redirections provide? is it
load-balancing? If so, forget the ugly 3XX responses and just add DNS
SRV support to WebSocket protocol.



-- 
Iñaki Baz Castillo
<ibc@aliax.net>