Re: http/1 opportunistic encryption

Erik Nygren <erik@nygren.org> Fri, 10 July 2015 04:44 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B51FC1A8895 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 9 Jul 2015 21:44:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.289
X-Spam-Level:
X-Spam-Status: No, score=-6.289 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, 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 8D0TbLNbtDXG for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 9 Jul 2015 21:44:42 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id F21D71A8894 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 9 Jul 2015 21:44:41 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1ZDQ81-0002WM-SF for ietf-http-wg-dist@listhub.w3.org; Fri, 10 Jul 2015 04:41:37 +0000
Resent-Date: Fri, 10 Jul 2015 04:41:37 +0000
Resent-Message-Id: <E1ZDQ81-0002WM-SF@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <nygren@gmail.com>) id 1ZDQ7w-0002VW-R7 for ietf-http-wg@listhub.w3.org; Fri, 10 Jul 2015 04:41:32 +0000
Received: from mail-ig0-f169.google.com ([209.85.213.169]) by maggie.w3.org with esmtps (TLS1.2:RSA_ARCFOUR_SHA1:128) (Exim 4.80) (envelope-from <nygren@gmail.com>) id 1ZDQ7u-0006dQ-8h for ietf-http-wg@w3.org; Fri, 10 Jul 2015 04:41:32 +0000
Received: by igrv9 with SMTP id v9so5145471igr.1 for <ietf-http-wg@w3.org>; Thu, 09 Jul 2015 21:41:04 -0700 (PDT)
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=vL+rIebv/pRu57fWAeE35Ivz5b4nYasfMZ+B5dYX1Pw=; b=Ej/iBSsmzAkiLpBpukdjw3qPb926wJgJrhhENURrc+F7uFyChyqCHRfwBIEJurnI/U +R9kSA1z5c5HtGi20RVdY4MUGZr0ze6GXQ23JGIOFl/SXsEZJpYMyaCcqVp5uwjAoR2p xoHOAHT4e4eSESOVbQOdICuBW1zgPG/09vx4UZJO/AmDcrFJI53UuMUwQTBBukqzv5Kz rGxqZrer4J3Z1h0wzdhNa/yl89NNc+okSiruyhxsyqF4eCB294bleQSs7Xap8QVo49jg W+WUjgBGbmNu7sOiFSy7uWqfFLfPxsHY9ct0E7dGuEy7goCdSGKQBs8jPW6Y2d+Uge05 wDtw==
MIME-Version: 1.0
X-Received: by 10.50.79.129 with SMTP id j1mr1251793igx.12.1436503264131; Thu, 09 Jul 2015 21:41:04 -0700 (PDT)
Sender: nygren@gmail.com
Received: by 10.79.104.193 with HTTP; Thu, 9 Jul 2015 21:41:04 -0700 (PDT)
In-Reply-To: <CABkgnnWMKkYUNrGBAGq6wqmr2hqpxBZfmGrwkAj3YUtT6SmdWQ@mail.gmail.com>
References: <55322077-4296-40A2-8D2E-4E2278CA8657@greenbytes.de> <B7FF5738-9645-4686-A090-2BA67064D656@mnot.net> <DE64E378-8278-499A-8FA8-6DCB866731A1@greenbytes.de> <20150617083412.GA17419@LK-Perkele-VII> <1C569435-489B-4D46-A443-82B32A80F893@greenbytes.de> <CABkgnnWT3kKZq2=RJ3z0pv94SRFnfpy_6W7prGPeZUfV0XbiFQ@mail.gmail.com> <F26B6537-2C60-489E-809D-4DB1C854D938@greenbytes.de> <CABkgnnWMKkYUNrGBAGq6wqmr2hqpxBZfmGrwkAj3YUtT6SmdWQ@mail.gmail.com>
Date: Fri, 10 Jul 2015 00:41:04 -0400
X-Google-Sender-Auth: KzErAwrSv9PlZCaqH-9_o9gc1Po
Message-ID: <CAKC-DJgkhebYsDSyj-ZWcTH0j6jW-iwMiPJyxJX1UnkiHEPq6g@mail.gmail.com>
From: Erik Nygren <erik@nygren.org>
To: Martin Thomson <martin.thomson@gmail.com>
Cc: Stefan Eissing <stefan.eissing@greenbytes.de>, Ilari Liusvaara <ilari.liusvaara@elisanet.fi>, HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="089e011609fcc7038c051a7dfada"
Received-SPF: pass client-ip=209.85.213.169; envelope-from=nygren@gmail.com; helo=mail-ig0-f169.google.com
X-W3C-Hub-Spam-Status: No, score=-5.3
X-W3C-Hub-Spam-Report: AWL=-0.668, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: maggie.w3.org 1ZDQ7u-0006dQ-8h 1f22a877a5dbd1ece21b1465dd6bd588
X-Original-To: ietf-http-wg@w3.org
Subject: Re: http/1 opportunistic encryption
Archived-At: <http://www.w3.org/mid/CAKC-DJgkhebYsDSyj-ZWcTH0j6jW-iwMiPJyxJX1UnkiHEPq6g@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/29914
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

Out of curiosity, how have current demuxer implementations been handling
and passing the :scheme along?  It may be that many implementations
are ending up in the same situation as http/1.1 here...

For example, how many:

1) Pass :scheme along in a proxyline or similar (eg, OOB channel), with
downstream app handling it properly
2) Pass :scheme along as a "Scheme" request header  (but in a way that is
spoofable and indistinguishable from a client request header)
3) Pass :scheme along as a ":scheme" request header (or some other invalid
HTTP/1.1 header)
4) Fail if :scheme is not "https"
5) Pass :scheme along in a proxyline or similar (eg, OOB channel), with
downstream app ignoring it
6) Drop :scheme entirely

Unfortunately, of these only #1 is actually safe.

As sad as it makes me (due to making interception easier),
I keep coming back to wondering if a separate alpn token would
be safer for h/2 oppsec.

       Erik




On Thu, Jun 18, 2015 at 1:06 PM, Martin Thomson <martin.thomson@gmail.com>
wrote:

> On 18 June 2015 at 01:26, Stefan Eissing <stefan.eissing@greenbytes.de>
> wrote:
> > I think, as a consequence, I need to disable the Alt-Svc support for
> http: in mod_h2, since scheme information is not available to others living
> inside Apache httpd and the described http/1.1 exploit will work exactly
> the same with h2 involved.
>
> It depends on how Apache reports things as being "https" or not.  If
> you can avoid generating those signals or suppress them, then it
> should be OK.
>
> We can certainly improve the text.  Here's what I have:
>
> Some HTTP/1.1 implementations use ambient signals to determine if a
> request is for an `https`
> resource.  For example, implementations might look for TLS on the
> stack or a port number of 443.
> An implementation that supports opportunistically secured requests
> SHOULD suppress these signals if
> there is any potential for confusion.
>
>