Re: [rtcweb] Security implications of host candidates

Lennart Grahl <lennart.grahl@gmail.com> Wed, 11 July 2018 14:22 UTC

Return-Path: <lennart.grahl@gmail.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 77B3F130E8D for <rtcweb@ietfa.amsl.com>; Wed, 11 Jul 2018 07:22:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 d8Hil-090RR7 for <rtcweb@ietfa.amsl.com>; Wed, 11 Jul 2018 07:22:38 -0700 (PDT)
Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) (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 347DF130E0D for <rtcweb@ietf.org>; Wed, 11 Jul 2018 07:22:38 -0700 (PDT)
Received: by mail-ed1-x52c.google.com with SMTP id s24-v6so3138010edr.8 for <rtcweb@ietf.org>; Wed, 11 Jul 2018 07:22:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:openpgp:autocrypt:cc:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=22QZFRxqPVrprlSGoum6LaqIyWypeOz+JoqI28j0vfI=; b=k5IBnea5kxJGKMp0gWnNr5P3jhb6OYs5BAvlZRO2UoOIOnq/E49LGUkUThQ44qr8rq tl7yCGqmP6Am+rDDzpxxgbzL4nNy4I5vh53TlvKVwuc9PmknnZFIvnxpwyEkcdwWJMKs gzMkJRoesox9edEkFSiL8IftGRytfFWi4vYuv3n8cmQs7u93v8CYE3rXuEalxCvEPTnQ wUkCuPVBvXeinM5KBOhz5kAZQCK/jLkt9+XjpPv+8EfvO8z5aVbVGLPr0CnNYwCUhV8b WGP7BdFoZ/NBLpsRIs3064Csn1JvHZXrxrraI5YKCIE9H1xNxgUYu6o3wjoE76S5UTvW AASA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:autocrypt:cc :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=22QZFRxqPVrprlSGoum6LaqIyWypeOz+JoqI28j0vfI=; b=tgb84NEEgK2JnSjC1ZX85n3sCdb7U9Cx9TYP1THedkYkdjIJcTIint9JMJvb6T0MT9 M2gMk7i/zlBUJOM4zisQAViq3QnDUFUDw7SN8P3wdjKSH73ns7qnjV4QgaxMbIebOtBw I9NzUQ2W++1cfeCRa5LvCTly+5iGOUqNyPvYRB4C6JIZikXUuwwCv3S+TKhiBVudJ0g3 1lqtch1P7jF8+DWJh5KGMsD2RQHhr6dnUB/6h7HEdKG7lxJ99dxK1krwzmthQIrCGKVp q9jhMJZJobvgVpKLbLhIT5HBxsqvM7p+MMmFLLubaohxBIRalI9FKxFITuBNFiq1fdrq j95A==
X-Gm-Message-State: APt69E0dPOhEZ8CQhf1VxUUB/lncZwqfdvuCjAyeCUgt1yOOgIkmOnmL GYo8+YIsXFXDpsg3hKdc1hXm5Q==
X-Google-Smtp-Source: AAOMgpdIgrSH2/78X9DCoZDsLkgLcoy7pT/kFYs9+/SnmVJZdU5pom9RcNxpjljq3BP3nQsRgRCs4w==
X-Received: by 2002:a50:9182:: with SMTP id g2-v6mr32167003eda.24.1531318956780; Wed, 11 Jul 2018 07:22:36 -0700 (PDT)
Received: from [192.168.11.149] ([185.41.76.142]) by smtp.gmail.com with ESMTPSA id h4-v6sm5242787edq.89.2018.07.11.07.22.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jul 2018 07:22:36 -0700 (PDT)
To: rtcweb@ietf.org
References: <CAOJ7v-1t_BDEEHmA4eqiS9ksYOOyHUz9LFLhQxs8FhjTdswP5w@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> <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>
From: Lennart Grahl <lennart.grahl@gmail.com>
Openpgp: preference=signencrypt
Autocrypt: addr=lennart.grahl@gmail.com; keydata= xsBNBFMHjy4BCADZR/nHk6jzDsEA2+dPG13NiXyBl34TtChDsZekZyO5jBgwslLgHVksQxlS 79n1lvVH0MxcI8SFifwLAAIjMfukNLGPAjEyJEQhQVpfXxkJXyZgncM2Wq+nlVCDZTiZLg/E 6jJP1zx9vB7sf5dWaB/Dt0YDHLM86EcDChQur9lrJk9K0Jiwt27Oo3B4FFfIOaVNUXgnRPbr Vw1/+O2jLg87Fsib9LP7Ghyv0Z2/VV7wJ4NLsLmIu60vcZVDYDOvcQRH4FZ76VBvlmlO+2TL 5L6yZLGgXS9GZyF3QXKAwhYqu5ouWEOUgXHch5deryjbENanimj4ntZQmF1nkxSZayk9ABEB AAHNJ0xlbm5hcnQgR3JhaGwgPGxlbm5hcnQuZ3JhaGxAZ21haWwuY29tPsLAfwQTAQIAKQUC UwePLgIbIwUJCWYBgAcLCQgHAwIBBhUIAgkKCwQWAgMBAh4BAheAAAoJEPmPvtEEgqumkk0H /2dMGPa9VmgR0kmr2inGODWuCy4WXNUxeEMfY/Hob/8Ou50os6iK35TQI9WtvvlAq23aIvoJ +1OjnqekgKmavPoQ0Uf1h2LegiQNKpDGC6/S33SLitQoQyELyJCU5Ato9lIL0AzpLvr+8UaF plWbPB4Z0GfZGBQSyp0Dmdeb00sld378m9qXHByJfHjPGiDFY+el1talbCuxS87+SvwIvM05 5m1/ceJbZDjx3trvgzbSQOHMT82/Hva7cSyVAch7mJc/lIq2Q0hjoZlD9nqS6gVJ9PQnEW8z dAXXVvBoy9DtomH18jimq+xUxeBwiFRB64gZx3Yyo1CKgULzeWaQ/qfOwE0EUwePLgEIAKP+ Dw5Ow5QuITKcI+ooXZAOBCBOitdsAGrGAEORjv1VyYU1jvjNb07UlRWmpjtaZsQoC2DwfEJy OaBphhErkOVEHCvetfBq8aJ718on4A49XwyQZeyh521BvLQUj0VY5D1iTYzgNVr4Ic39duH/ 00b489Wf9sM7TwzONJOCR5pSKUzYfGUIfQIJRc4tbzOM+bzSknLwbYAWRraOstbRjf2+V3pf 46mzv8tteLnsMm91qshFUwiBfeMNZiKAM3eid80ghlEbQo5J07FOrqK1GxqMi8LQT/oA5lpu +BB6UzGP5nQ5fip95zAq3vu+Iasz1DWj6F1HkHDEHfdtVpTAN70AEQEAAcLAZQQYAQIADwUC UwePLgIbDAUJCWYBgAAKCRD5j77RBIKrpihiCACQq7ARCPSzDrtUcq3uTdP+fMHp8YCYD4UD fdt3vcw4a5JESaknUcWi7CbQrdcLT7iIFYa3pk5I8w4n2lH29uUTWwt9boDtdYkBY5a4Rg+m Z9ndsLh0fHdZM6BXv/6gWMMdGbV5+xcV0FDcXZIlHLZIriDgeZQR3cDEa9lFWUYrI9KKmdoq ngaND7jPZaMCyvn9VDOAGBWxg49gQV/x1d+DiIyMbF9J+ya4YqaSZtu2y/H03eVCawmI6SMH UzdOo+Yqen3Udcdur0KnWMUOP3FIdjgxaPoIEKfFTBy7n8rlzrrTzyrv5Gouusxj0JHMwvuh ixK1bmVy/XYqoG0TVwBt
Message-ID: <68bb5744-d9f2-462c-446d-ae47f2f27e5e@gmail.com>
Date: Wed, 11 Jul 2018 16:22:34 +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: <1d60feec-3a36-2deb-e4a7-703fb7144ed1@alvestrand.no>
Content-Type: text/plain; charset="utf-8"
Content-Language: en-GB
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/rtcweb/3yz-oafmN39yMb2GcMySsxkAed8>
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: Wed, 11 Jul 2018 14:22:41 -0000

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 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