Re: [rtcweb] Security implications of host candidates

Justin Uberti <juberti@google.com> Mon, 09 July 2018 21:38 UTC

Return-Path: <juberti@google.com>
X-Original-To: rtcweb@ietfa.amsl.com
Delivered-To: rtcweb@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 768801310BC for <rtcweb@ietfa.amsl.com>; Mon, 9 Jul 2018 14:38:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -17.51
X-Spam-Level:
X-Spam-Status: No, score=-17.51 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.com
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 8qUjpANRRULK for <rtcweb@ietfa.amsl.com>; Mon, 9 Jul 2018 14:38:08 -0700 (PDT)
Received: from mail-it0-x22b.google.com (mail-it0-x22b.google.com [IPv6:2607:f8b0:4001:c0b::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A8987131023 for <rtcweb@ietf.org>; Mon, 9 Jul 2018 14:38:05 -0700 (PDT)
Received: by mail-it0-x22b.google.com with SMTP id 188-v6so28459176ita.5 for <rtcweb@ietf.org>; Mon, 09 Jul 2018 14:38:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jrT2qxPln4fqfvB7Vt/+0gk/blceRPUA4ZVLvdDAgmQ=; b=bgdHmgjP/cyvCnPcvppZXuBUMHEgl1LYh0JvPGbT9I8SBGZM/1MzTPAjwVh8N0BSAx a/nNqK4u7wRLqgQ4b86pU62iA0v8MjGNjPfI8j3m578DRW/Rv5yQbHKYFXuJ88oVD5Sa NFJ4Qdc1XVaapZTdBE0I5jp/855hpGcy2WHDGBttQMR7OYMf+FnMNHjWzRJmEwDZBeBn QBX37/XyRYDkA0uazbeJignzY8y/oYLsHd6rBIEa4e7LSG503zxH09P6K+ycB77z3OcH 7HaYEt1IPU3ssDMSjTGYmSlePWJXg6ubY7QKF9nIkgaUGlVOBI/Yxj9Vx0RgAjLFAW0x SItg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jrT2qxPln4fqfvB7Vt/+0gk/blceRPUA4ZVLvdDAgmQ=; b=AjEG2NWkYzcJ2JBxI5inNka6fL4x94NDwkb02iMix2CjmStBJ9dTpQogb9mGYxffZZ aP3oNl/V27oVEwJt8iPTwHVd1c8Rx3zuMbPViGMnVWPqXP+ZKXyjxe5KBSOH5xVqxiHf A1nssumkAW9Mr0JK3qG9w9hboI2cyLonPvMYqfeVdSN5yae17LA4Txd/uRvWrUOzqxs7 anjhE344HnqsX6vnkbT5d3LfrXP7at0XQNrn1ahNONRv8k3+XFUYxgldk6GYZ8vCPTC/ FCm6g3iZfvD/au/qfeTLLZTytj3yLcDdK0xfrf60LzW8KLTbSB0ThsK8tPArU4v/H584 JcjA==
X-Gm-Message-State: APt69E2k/UpbG6HciRJdJDbvTJNCABNg4mKJU+htTWv/0VNHSsvGlbcK OUZUNFsJZf0/UHPVh+OM7YD1+5jaMURubWY/IjRIWQ==
X-Google-Smtp-Source: AAOMgpcumwsFsaxFv0WrrbpduEMXmSATIUxKJXNDJZQzlXWHjkRTLgoev3yEVdpJo2sr9uxunDokG40mSEHl4JGMSHI=
X-Received: by 2002:a24:1049:: with SMTP id 70-v6mr17032693ity.115.1531172284372; Mon, 09 Jul 2018 14:38:04 -0700 (PDT)
MIME-Version: 1.0
References: <CAOJ7v-1t_BDEEHmA4eqiS9ksYOOyHUz9LFLhQxs8FhjTdswP5w@mail.gmail.com> <CANN+akZLRdZdexjU44zPCA6vdQR0hVYT17_4P8DefC0JbRL5mA@mail.gmail.com> <CAOJ7v-2JdiMJ9iWE_cL8G7xDM6iekexJL8KLEbz0jD=p7hiGZg@mail.gmail.com> <CANN+akbv2mpyhgV5vxDHKcsA8UPsSEr0bEjJK4xYxtvbkXNA7w@mail.gmail.com> <CAOJ7v-3gHMCxHU02YG3NoqvWHtXgOSWSm+y88GNDW0qc=Sqq=A@mail.gmail.com> <CAOJ7v-3moUqwgxkz1Fek4vy-XV+WpDaO-PsQZEw4ougoCHjLww@mail.gmail.com> <CANN+akZ=Ebw41mA2wEX7-4u6q5WcZbFtM=VMLX4nDK39S=QGOQ@mail.gmail.com> <CAOJ7v-3X2Sj8Yid+i0=xadyH_Hmf4pMOF_iuOV+56Ty8HNnJuw@mail.gmail.com> <0ED74BE5-AC02-44C5-80E1-18532BD3D1FF@westhawk.co.uk> <CAOJ7v-0TGqvp=MUmeEUjYZTcvV37qbYSTV0pFMoi1J0CJQ7Q4A@mail.gmail.com> <CABkgnnXBTC5TERquJPO4dgiAKz037Cm0Omw4YrobtCW=wmGPyQ@mail.gmail.com>
In-Reply-To: <CABkgnnXBTC5TERquJPO4dgiAKz037Cm0Omw4YrobtCW=wmGPyQ@mail.gmail.com>
From: Justin Uberti <juberti@google.com>
Date: Mon, 09 Jul 2018 14:37:51 -0700
Message-ID: <CAOJ7v-0yzvu9POvR4Auokykqc63eju6_CveAzyVpcSd1kkK6Nw@mail.gmail.com>
To: Martin Thomson <martin.thomson@gmail.com>
Cc: Tim Panton <thp@westhawk.co.uk>, RTCWeb IETF <rtcweb@ietf.org>, youenn fablet <yfablet@apple.com>
Content-Type: multipart/alternative; boundary="0000000000001a2b72057097d494"
Archived-At: <https://mailarchive.ietf.org/arch/msg/rtcweb/Mvtj4RdrMdAkd5NJbBbqXTDctRA>
Subject: Re: [rtcweb] Security implications of host candidates
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.27
Precedence: list
List-Id: Real-Time Communication in WEB-browsers working group list <rtcweb.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/rtcweb/>
List-Post: <mailto:rtcweb@ietf.org>
List-Help: <mailto:rtcweb-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 09 Jul 2018 21:38:18 -0000

On Sun, Jul 8, 2018 at 11:35 PM Martin Thomson <martin.thomson@gmail.com>
wrote:

> On Sat, Jul 7, 2018 at 5:36 AM Justin Uberti
> <juberti=40google.com@dmarc.ietf.org> wrote:
> > The issue is that two pages (probably of the same origin) can determine
> that they are on the same host even when running in different browsing
> contexts (e.g., one being in private browsing mode), by establishing a p2p
> connection and measuring latency.
> >
> > The key questions are a) whether this gives up information that is not
> already present (e.g., by looking at your own IPv6 address), and b) what
> mitigations might exist.
>
> This seems like a fair analysis.  I read the draft and thought a
> little about this angle, and I think that it's worth doing something
> about, even if I'm not 100% sure of what that would look like.
>
> Other signals, like sharing an address, don't seem to be as reliable
> as this.  For instance, having to go to a NAT hairpin might add enough
> additional latency that it looks like you are on the same network, but
> not necessarily the same machine.  That might be enough information
> for a tracker, anyway, so that's a big caveat on any mitigation we
> come up with.
>

I did some more testing in http://jsfiddle.net/juberti/8n9p5jxk/ (hairpin
tester) and NAT hairpin doesn't always add significant latency. Obviously
it depends a lot on your wifi, but I was able to get 2-3 ms RTT for hairpin
on Ethernet and 6-8 ms RTT for wifi.

Basically, the site can try to connect two contexts via:
a) [existing] public IPv4 (indicates "same network")
b) [existing] IPv6 (indicates "same endpoint")
c) [existing] user-agent (indicates "same OS, same browser, same version")
d) [existing] fonts, gpu, display resolution, etc
e) [new] RTT < 5ms (indicates "probably same machine")

As such, e) doesn't add a lot, and as noted above, has false positives and
likely false negatives.

I'm not sure that what is proposed (limiting to a top-level browsing
> context that isn't also private browsing) is the best way to achieve
> the stated policy goals in the draft.  And more fundamentally, there
> are probably several policies that browsers might reasonably adopt
> along those lines.
>
> For instance, we might reasonably be similarly concerned about
> different unrelated top-level browsing contexts using this to link
> each other.  I know that Tor Browser would be concerned about this
> sort of isolation as much as it would worry about iframes on different
> pages.
>
> The best idea I have there is to fail resolution for .local names that
> the browser itself has minted for other origins[1].  That way,
> connections that are cross-origin and same-host would always at least
> hit a hairpin or relay.  Of course, failing resolution so quickly
> might leak information, so additional caution might be necessary (I
> don't think that it does, provided that a candidate is not entered
> into a checklist before resolution occurs, but I'm not sure how that
> would be implemented).
>

If we decide to take action here, this seems like a reasonable approach.
You'd still be able to link cross-browser usage, but not cross-context
(intra-browser) usage.

>
> This suggests that you could share mDNS names for frames under the
> same top-level browsing context without leaking more information,
> which could be very useful.
>
> (The data channels thing isn't relevant here, because measuring
> connection setup should be enough to link two browsing contexts.  RTP
> likely works as well, but it's less easy to use.)
>
> [1] The draft uses the term "execution context" here, which is
> probably the right phrase, but it's not really defined.
>