Re: [rtcweb] Security implications of host candidates

Harald Alvestrand <harald@alvestrand.no> Thu, 12 July 2018 12:52 UTC

Return-Path: <harald@alvestrand.no>
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 20E9E130E3A for <rtcweb@ietfa.amsl.com>; Thu, 12 Jul 2018 05:52:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.199
X-Spam-Level:
X-Spam-Status: No, score=-4.199 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 4F_XlpBGqoHX for <rtcweb@ietfa.amsl.com>; Thu, 12 Jul 2018 05:52:36 -0700 (PDT)
Received: from mork.alvestrand.no (mork.alvestrand.no [158.38.152.117]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D6951130DDE for <rtcweb@ietf.org>; Thu, 12 Jul 2018 05:52:35 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by mork.alvestrand.no (Postfix) with ESMTP id 508887C0C4C for <rtcweb@ietf.org>; Thu, 12 Jul 2018 14:52:34 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at alvestrand.no
Received: from mork.alvestrand.no ([127.0.0.1]) by localhost (mork.alvestrand.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HmPNP8QYaHJc for <rtcweb@ietf.org>; Thu, 12 Jul 2018 14:52:32 +0200 (CEST)
Received: from [192.168.3.17] (unknown [188.113.75.166]) by mork.alvestrand.no (Postfix) with ESMTPSA id 783CB7C0C40 for <rtcweb@ietf.org>; Thu, 12 Jul 2018 14:52:32 +0200 (CEST)
To: rtcweb@ietf.org
References: <CAOJ7v-1t_BDEEHmA4eqiS9ksYOOyHUz9LFLhQxs8FhjTdswP5w@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> <CAOJ7v-0yzvu9POvR4Auokykqc63eju6_CveAzyVpcSd1kkK6Nw@mail.gmail.com> <CABkgnnXL6sdCDt=hjX+7KbP+xYm9jCmgjJNy4CvPPna_0oin=g@mail.gmail.com> <CAOJ7v-33ODGTsmbHEp_U7UdROvuKR7O7bne2_0tX6ivVf-+C5A@mail.gmail.com> <CABkgnnWJM4CE2ZLHYOOd=VYUj7kn5wFMAbeGB1HRyp++nvbPoQ@mail.gmail.com> <CAOJ7v-2WGyHSbSJwgbVVHLs-GO71rMLS2+OTetNyMhb0TM3ZcA@mail.gmail.com> <54EB6378-5DA2-4125-A4F4-84151D0E4F04@apple.com> <CAOJ7v-2dw1coDTpovTrKa__Oak7Jjn5EYgvWtByaRYmxfDDtXw@mail.gmail.com> <1d60feec-3a36-2deb-e4a7-703fb7144ed1@alvestrand.no> <68bb5744-d9f2-462c-446d-ae47f2f27e5e@gmail.com> <CAOJ7v-3CF5hXxOGkufzdP6VqrvjHW6BhnB1mjVnHjwv8pcP7KA@mail.gmail.com>
From: Harald Alvestrand <harald@alvestrand.no>
Openpgp: preference=signencrypt
Autocrypt: addr=harald@alvestrand.no; prefer-encrypt=mutual; keydata= xsFNBFRpbhYBEADXu8uE7LDQgrEB/zclYiwWRb50FnuJjIdK5Q7t68tSxx+LU8HTfxwOgHo9 vMyQvntoRBOHQZDJzvdAnZj/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DEA 332dABEBAAHCwWUEGAECAA8FAlRpbhYCGwwFCQlmAYAACgkQawFW3omifDRKhg//eHcjvxcA ENNe66f5R3ULi5pMbrHGLMGirVX9pHTRf5+5OFaGr8bwXeYkCHpptpxr2Kk/PUzpUWOL2uvL lh7QhPw3+GoEWubXOAgHiQW5iIzkA9wYw/nctZ+5veHN7InVqJ7djhtTN7K9Luj4nDR1T7Vf 61zpCKLlEW6W5MAp4slRVzRiFfaMfMYkxLm6MBxC961j8Lrqx2XNMGugaYh1QzcFYTbFmGKX 5SY4EQsETiB0PeE3IBVtXfiabrk8YX2IuL9BrEgD6GngXTd78hUMnZeqjvnS772bjRgwLCz7 Hab6hQESrFCNXfxzb39y5DLHwXtB/HruYqVD48XvPnNV0UNsWcS+7rtPFMmkd3MTvoAOWjkV zeQHpvF71IlwWginXbkf9aR/QsAbMIQDZWhsd+ma67V6g6KH41r6mNXAgK2JlA1CqgblM7iB hl01vL0V5bkbInZq2sB505Hn1DSc4NoP2WHlwe8Bm8vVG5oyfyPw9ReS9WLVY9w7fK4EKOgk VnOsIQuE0WIPT0Ak+hJ0UigOduuCX7s7NIVaOgWQe1q4Xytgj1RHjg9qlA6eQiTUrAx7Mu7s eliWCFuWsQXoaktVEDjoWVbP9dgozanL5kwWh/sJNtHVQbgu3IG4w8D3QvvOE83+jAdzgOzv pqHJkrqlWu+R9ZqBucZLqjQvQZk=
Message-ID: <c5ec2bed-b3f6-ece6-e5f1-698690f2d115@alvestrand.no>
Date: Thu, 12 Jul 2018 14:52:32 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0
MIME-Version: 1.0
In-Reply-To: <CAOJ7v-3CF5hXxOGkufzdP6VqrvjHW6BhnB1mjVnHjwv8pcP7KA@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/rtcweb/Eruur1J2v8sDBbfnv1VELHbEJVY>
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: Thu, 12 Jul 2018 12:52:39 -0000

Den 12. juli 2018 01:01, skrev Justin Uberti:
> Thanks for the suggestions on intermediate modes. I think we're
> converging on the following potential replacements for Mode 2:
> 2b) IPv4 mDNS + RFC 4941 IPv6
> 2d) mDNS of any private IPv4/IPv6  + any public v4/v6 (as determined via
> STUN query)
> 
> 2d) is basically your 2c), but exposing any IPs that would already be
> visible to the server. This would basically give all the privacy
> benefits of Mode 3 (although, unlike Mode 3, it does allow host-host
> connections).
> 
> Your 2a) probably makes more sense to consider as a derivative of Mode
> 1, essentially a 1b), since it exposes all interfaces. I don't know if
> that provides a lot of value, since Mode 1 already requires trust, but
> I'd be open to arguments for this.
> 
> I think the main outstanding question is what we want the final Mode 2
> to be (2b vs 2d), and the key sub-question is whether we think there's
> enough benefit in hiding private RFC 4941 addresses. However, we may
> need experimental data to properly consider the tradeoffs.
> 

I must be missing something - if both endpoints hide public v4/v6
addresses using mdns (whether they are host addresses or learned via
STUN), we preclude communication outside the local mDNS domain.

Either there's an use case I haven't thought about, or this means that
only local-to-local connections can be set up.

If one endpoint reveals its public IP and the other doesn't,
communication outside the local domain will only happen if initial
packets can make it from the one who's hiding its IP to the one who isn't.

That's a *severe* restriction.

> 
> 
> On Wed, Jul 11, 2018 at 7:22 AM Lennart Grahl <lennart.grahl@gmail.com
> <mailto:lennart.grahl@gmail.com>> wrote:
> 
>     On 10.07.2018 09:56, Harald Alvestrand wrote:
>     > Thoughts:
>     >
>     > - If I want to find out that I'm on the same host as another context
>     > that I can communicate with in *any* fashion, I've got lots of games I
>     > can play.
>     >
>     > Example: Measure memory pressure, allocate 1 Gbyte in one context,
>     > measure memory pressure again. This works for any measurement that's
>     > available to both contexts and relates to the whole system.
>     > Example: Measure the local clock's skew compared to some reference
>     clock
>     > (NTP-fashion). If the skew is the same down to the nanosecond,
>     same host
>     > is likely.
>     > Example: Allocate any resource that can only be accessed from one
>     > context at a time. Loop, asking for it, in the other context.
>     Release it
>     > in the first context, and check the timing on when the other one
>     gets it.
>     >
>     > In general, anything that can potentially be used as a covert channel
>     > can be used more easily to figure out if we're on the same host.
>     >
>     > My conclusion: Defending against this attack isn't worth the trouble.
>     > We've already lost.
>     >
>     > - Nevertheless, we're finding that the MDNS mode has implications that
>     > we don't perceive fully yet.
>     >
>     > My conclusion: This is an additional mode, not a replacement for
>     one of
>     > the other modes. We should continue to specify both.
> 
>     I'm treating this thread as a follow-up to the "IP handling: Using mDNS
>     names for host candidates" thread, so this refers to both drafts and the
>     PR for ip-handling (https://github.com/juberti/draughts/pull/103).
> 
>     Harald, I second your conclusions. Regarding mDNS, I see potential for
>     the following three "intermediate" modes:
> 
>     - Mode 2.a: Enumerates all addresses but only the default route's
>     interface addresses are exposed as host candidates. All other addresses
>     are hidden via mDNS.
>     - Mode 2.b: The mode 2 as described in ip-handling-09.
>     - Mode 2.c: Only expose the default route's interface addresses hidden
>     via mDNS.
> 
>     2.a is a minor improvement but will fix issues for users who would be
>     able to establish a direct connection over a different route but the
>     default one.
> 
>     2.c is a major restriction over 2.b and 2.a. since it will break the
>     ability to establish direct connections in a corporate network.
> 
>     Regarding the ip-handling document: It's probably okay to restrict the
>     default mode further from ip-handling-09's mode 2. FWIW, it might even
>     be okay to give implementations the freedom to choose any of the
>     available modes as their default (let's be honest, many browser vendors
>     have already done so anyway). But only if all use cases have access to
>     an adequate way to request consent to achieve mode 1 or at least 2.a.
>     Specifically, this should be a MUST in the ip-handling document. Because
>     if that is not guaranteed, some less obvious already existing use cases
>     (think of sharedrop.io <http://sharedrop.io> for example) will be
>     further discriminated and
>     without a TURN server can be completely broken. Not to mention the
>     impact on delay and throughput caused by hairpinning or even relaying.
> 
>     Cheers
>     Lennart
> 
>     _______________________________________________
>     rtcweb mailing list
>     rtcweb@ietf.org <mailto:rtcweb@ietf.org>
>     https://www.ietf.org/mailman/listinfo/rtcweb
> 
> 
> 
> _______________________________________________
> rtcweb mailing list
> rtcweb@ietf.org
> https://www.ietf.org/mailman/listinfo/rtcweb
>