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

Adam Barth <ietf@adambarth.com> Mon, 28 March 2011 23:33 UTC

Return-Path: <ietf@adambarth.com>
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 93DFE3A6AA1 for <hybi@core3.amsl.com>; Mon, 28 Mar 2011 16:33:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.64
X-Spam-Level:
X-Spam-Status: No, score=-2.64 tagged_above=-999 required=5 tests=[AWL=0.037, 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 ZgSvBmKykBXP for <hybi@core3.amsl.com>; Mon, 28 Mar 2011 16:33:29 -0700 (PDT)
Received: from mail-yi0-f44.google.com (mail-yi0-f44.google.com [209.85.218.44]) by core3.amsl.com (Postfix) with ESMTP id 80FBA3A6A9F for <hybi@ietf.org>; Mon, 28 Mar 2011 16:33:29 -0700 (PDT)
Received: by yic13 with SMTP id 13so1569633yic.31 for <hybi@ietf.org>; Mon, 28 Mar 2011 16:35:07 -0700 (PDT)
Received: by 10.150.250.3 with SMTP id x3mr4763001ybh.333.1301355305774; Mon, 28 Mar 2011 16:35:05 -0700 (PDT)
Received: from mail-iw0-f172.google.com (mail-iw0-f172.google.com [209.85.214.172]) by mx.google.com with ESMTPS id p23sm1594254ybk.9.2011.03.28.16.35.04 (version=SSLv3 cipher=OTHER); Mon, 28 Mar 2011 16:35:05 -0700 (PDT)
Received: by iwn39 with SMTP id 39so4168353iwn.31 for <hybi@ietf.org>; Mon, 28 Mar 2011 16:35:04 -0700 (PDT)
Received: by 10.43.55.84 with SMTP id vx20mr7155211icb.49.1301355304097; Mon, 28 Mar 2011 16:35:04 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.43.133.200 with HTTP; Mon, 28 Mar 2011 16:34:34 -0700 (PDT)
In-Reply-To: <BANLkTikOeQA5SCx5GdoBZOa5UcdfRQPZVg@mail.gmail.com>
References: <BANLkTi=0a84PA+2hN9U7S9uvNWgmestE2g@mail.gmail.com> <BANLkTikOeQA5SCx5GdoBZOa5UcdfRQPZVg@mail.gmail.com>
From: Adam Barth <ietf@adambarth.com>
Date: Mon, 28 Mar 2011 16:34:34 -0700
Message-ID: <AANLkTinojsFjXa4zLYHQjqGvKFkR614OEc862Eb_8rC7@mail.gmail.com>
To: Iñaki Baz Castillo <ibc@aliax.net>
Content-Type: text/plain; charset="ISO-8859-1"
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:33:30 -0000

On Mon, Mar 28, 2011 at 4:22 PM, Iñaki Baz Castillo <ibc@aliax.net> wrote:
> 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?

As stated above, we're assuming example.com has an open redirector.

Adam