Re: [tcpm] Privacy problems of TCP Fast Open

Praveen Balasubramanian <pravb@microsoft.com> Tue, 21 May 2019 18:14 UTC

Return-Path: <pravb@microsoft.com>
X-Original-To: tcpm@ietfa.amsl.com
Delivered-To: tcpm@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 395631201DD for <tcpm@ietfa.amsl.com>; Tue, 21 May 2019 11:14:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.011
X-Spam-Level:
X-Spam-Status: No, score=-2.011 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=microsoft.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 cCE4MLLZcdhE for <tcpm@ietfa.amsl.com>; Tue, 21 May 2019 11:14:10 -0700 (PDT)
Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-eopbgr770131.outbound.protection.outlook.com [40.107.77.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A1EE2120223 for <tcpm@ietf.org>; Tue, 21 May 2019 11:14:09 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=testarcselector01; d=microsoft.com; cv=none; b=woZx7UuaC0sUc6OHwzZ0FL2ysPHQFiujV5QKEyyn5Kix0QrNpX2kyZm/q0sQtpydyKYB3JPXfq1e0ZvHHGOFLzqmR1xX5/Itxye4jjPh0zFtt315zcprm4aGjtu9zub6m2if24ng8UFFLAJD5yRiSjAePArTcHb0SVfPdsarzxA=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=testarcselector01; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=g6eA1rDAXjw89vZmVakHn7PNevAGOhdOexBqdBv7KI4=; b=dMA4kmUhZfzWUFdi+o3TDKkPxS2JBUjG/ge2EIq2KWqYsg3hQMzUQPw9gH1Jp3Qq1n8ln7VOebsJ7lBtaDpJoaNKc1XXGxUo6N4vVmsyEr/WtYgzhTmQ7YwY00Om/geeVBl3K7kMSMRMu1e8zyX08QkUv3KBtQAl+Bx22HpcMCE=
ARC-Authentication-Results: i=1; test.office365.com 1;spf=none;dmarc=none;dkim=none;arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=g6eA1rDAXjw89vZmVakHn7PNevAGOhdOexBqdBv7KI4=; b=gb+u40MZgDumC+DRtjmj4fmkojxI5fOyAq8cNkTvHOCki0NS/H2pf19Qt07bEc+JulncjkkSqWpKuvReZycqLYe/0IqcFes6fDJjC7uKFbJAAr/t72r+Ms95kTAssdos8Rdedg4M1uSojVkYdE4JSaqNlNW4VbewpvFRaLf9n+E=
Received: from MW2PR2101MB1049.namprd21.prod.outlook.com (2603:10b6:302:a::13) by MW2PR2101MB1019.namprd21.prod.outlook.com (2603:10b6:302:5::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1943.6; Tue, 21 May 2019 18:14:07 +0000
Received: from MW2PR2101MB1049.namprd21.prod.outlook.com ([fe80::1486:9c49:385b:f1a2]) by MW2PR2101MB1049.namprd21.prod.outlook.com ([fe80::1486:9c49:385b:f1a2%4]) with mapi id 15.20.1943.006; Tue, 21 May 2019 18:14:07 +0000
From: Praveen Balasubramanian <pravb@microsoft.com>
To: Brian Trammell <ietf@trammell.ch>, Michael Welzl <michawe@ifi.uio.no>
CC: Michael Tuexen <michael.tuexen@lurchi.franken.de>, tcpm IETF list <tcpm@ietf.org>
Thread-Topic: [tcpm] Privacy problems of TCP Fast Open
Thread-Index: AQHVByn/aakJ4ZD9PEmuWaFrgWjVpKZ0lRMAgACl5ICAAArjgIAAHh2AgABWEQCAADks4A==
Date: Tue, 21 May 2019 18:14:07 +0000
Message-ID: <MW2PR2101MB104947CF1DF2DF1D06161ECAB6070@MW2PR2101MB1049.namprd21.prod.outlook.com>
References: <ba3887b6-1554-9a67-8834-4bb598cf18f0@informatik.uni-hamburg.de> <fd9f22b0-03ee-a1ef-ee97-02a93bf2648b@informatik.uni-hamburg.de> <4194EE28-DCDF-46A3-8D26-5920E55040FD@lurchi.franken.de> <4e151b52-cd6d-7145-4e0f-94c6f94eb20b@informatik.uni-hamburg.de> <7B148CBB-3D8A-4D29-BCA7-0B241E548D4E@ifi.uio.no> <491A06E5-1D3C-46BF-B682-FBFB9B752906@trammell.ch>
In-Reply-To: <491A06E5-1D3C-46BF-B682-FBFB9B752906@trammell.ch>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Owner=pravb@ntdev.microsoft.com; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2019-05-21T18:14:06.0570732Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Application=Microsoft Azure Information Protection; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=25a8cf3a-91d5-457c-bb90-89e82f4c9b47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Extended_MSFT_Method=Automatic
authentication-results: spf=none (sender IP is ) smtp.mailfrom=pravb@microsoft.com;
x-originating-ip: [2001:4898:80e8:2:9b7:a73:7c65:990e]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: ef63c7e3-95b9-4803-3353-08d6de181d5c
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:MW2PR2101MB1019;
x-ms-traffictypediagnostic: MW2PR2101MB1019:
x-ms-exchange-purlcount: 5
x-microsoft-antispam-prvs: <MW2PR2101MB101968BCAD3B56BADEA21DE0B6070@MW2PR2101MB1019.namprd21.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-forefront-prvs: 0044C17179
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(136003)(376002)(346002)(396003)(366004)(199004)(189003)(53754006)(13464003)(486006)(74316002)(476003)(478600001)(446003)(5660300002)(76116006)(55016002)(11346002)(68736007)(52396003)(15974865002)(66946007)(73956011)(25786009)(102836004)(8936002)(66476007)(66556008)(64756008)(6436002)(6506007)(10290500003)(76176011)(316002)(66446008)(7696005)(53546011)(8990500004)(186003)(966005)(33656002)(7736002)(46003)(305945005)(9686003)(99286004)(6306002)(22452003)(110136005)(561944003)(54906003)(66574012)(71200400001)(53936002)(10090500001)(71190400001)(52536014)(6246003)(4326008)(86362001)(2906002)(14454004)(81156014)(256004)(14444005)(8676002)(6116002)(86612001)(229853002)(81166006); DIR:OUT; SFP:1102; SCL:1; SRVR:MW2PR2101MB1019; H:MW2PR2101MB1049.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam-message-info: oQJ8Da0QA3eU+me8OnreUMIZ/dJe4p/bZsP0CwZtj1ne0rk2WeSwt/CFQ15EVvIsEZl67nIm+3cOAs6KJM0U9lVPW56fCYPLp00RKNL/FPzriakC6Tk6ljiSWaOfMrdQbQEV4rJpa+5dgzCH7ZgxahELWqehFTO4bfdTESkRAmenMIDgp/Ma9LAY+flHzNaYFNMxurXPjrmm5J3CdZXUL+0pEbQLbFdErgPcfU4nc0gqh6BULef52XTDEge4FJXlCncXLLOk0nO5C0GTilf3MmrDwrXHioVnQI3LcfMGLot3FCxQoI1IXbKDeaeDkRWpw3z7ILa0tWqfb3wal13b7uUqPego2cN+8HMXTfo6COXJ8VjiqxQprxSP4oeNQKtpljPqIHe5G8yx9BRKRoyNO+J3Z1mjxh1BgjEt+jLhpjw=
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-Network-Message-Id: ef63c7e3-95b9-4803-3353-08d6de181d5c
X-MS-Exchange-CrossTenant-originalarrivaltime: 21 May 2019 18:14:07.1657 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: pravb@ntdev.microsoft.com
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR2101MB1019
Archived-At: <https://mailarchive.ietf.org/arch/msg/tcpm/oMxEWAxlrdo-F3y8M6yfPCYObC0>
Subject: Re: [tcpm] Privacy problems of TCP Fast Open
X-BeenThere: tcpm@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: TCP Maintenance and Minor Extensions Working Group <tcpm.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tcpm>, <mailto:tcpm-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tcpm/>
List-Post: <mailto:tcpm@ietf.org>
List-Help: <mailto:tcpm-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tcpm>, <mailto:tcpm-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 21 May 2019 18:14:20 -0000

We are removing support for TFO only in the InPrivate (incognito) mode of the Edge browser. 

IPv6 privacy addresses mitigate this somewhat. Also, TFO servers will expire the cookies periodically as well. 

I wouldn't be opposed to some expiration scheme on client as well. And I am fine with adding some guidance around this. If TFO is to become a standards track RFC, then I agree that these concerns should be addressed. 

Let's not overreact and deprecate the only path we have for low latency setup on TCP. Also, TFO could also be used on non-public Internet.

Brian a lot of major servers now support TFO. Client support is the problem.

-----Original Message-----
From: tcpm <tcpm-bounces@ietf.org>; On Behalf Of Brian Trammell
Sent: Tuesday, May 21, 2019 7:48 AM
To: Michael Welzl <michawe@ifi.uio.no>;
Cc: Michael Tuexen <michael.tuexen@lurchi.franken.de>;; tcpm IETF list <tcpm@ietf.org>;
Subject: Re: [tcpm] Privacy problems of TCP Fast Open

hi Michael,

Further foolishness inside ;)

> On 21 May 2019, at 09:39, Michael Welzl <michawe@ifi.uio.no>; wrote:
> 
> Hi all,
> 
> I'm about to make a fool of myself because I'm quite certain that I'm missing something.
> But, I guess this is worth the risk - somehow I'm not risking much, as most people on this list already know me well enough to not be surprised by another foolish idea coming from me   :)
> 
> 
> So...
> 
> 
> Actually, couldn't we just remove the cookie from TFO?
> 
> 
> As far as I understand, the main point of the cookie is to protect the server against clients that might spoof their IP addresses and just send tons of requests to the server - which could potentially be much heavier to handle than just the SYN state without TFO.
> To some degree, this is an OS problem, not a network problem: methods could be in place to limit the time an application spends answering requests that are carried on SYNs. My question is: wouldn't that be enough?

All simple cookie based-approaches have a pretty simple tradeoff: use a cookie which references some previous visible exchange between client and server, trading off load reduction on the server (and flexibility in deployment of DoS protection in front of the server) for traceability (which, in this case, is a requirement, not something to be avoided). The design of TFO (and SYN cookies before it). 

More advanced 0RTT tokens have a different tradeoff; since the token is established between client and server without being observable on the path, here we gain traceability protection and retain server load reduction, but give up the ability to have front-ends that can reject attack traffic without some form of coordination with the server.

> A few years ago, I'm sure that such a proposal would have been shot by people saying that data carried by TCP is general and TCP must serve all applications, and that we can't have that kind of special treatment for data arriving via SYNs.
> However, TFO has already departed from this generality, in several ways: applications using it must be able to handle incoming duplicate requests; they need to use special API calls to access the data; importantly (for the point I'm making), rate limits should already be in place when using TFO (RFC 7413, section 5.1).
> 
> So what I'm proposing is: couldn't we re-write TFO to just remove the Cookie from it, and say: "it's allowed for applications to accept data that comes with a SYN right away, but this must be done in a special way (as already described in RFC 7413), and in particular, the time an application spends processing TFO requests must be limited to avoid being DDoSed?"

You're correct to point out that 0RTT resumption is and will always remain special, not only due to the special requirements it places on applications but also for cryptographic reasons (0RTT cannot be made forward-secret, so data sent in 0RTT for TLS1.3 or QUIC has different cryptographic properties than the rest of the session). 

ISTM there are the following possibilities:

(1) Do nothing.

(1a) Do nothing, but issue guidance in an informational RFC notinf that TFO cookies are traceable, and should be avoided in the open Internet when 

(2) Deprecate TFO (and hope people who want 0RTT migrate to QUIC); explain the privacy reason behind the deprecation in the deprecated document.

(3) Update TFO to make TFO cookies optional, and explain the tradeoffs.

I would expect pushback on 2 or 3 from people running TFO on the Internet, because it requires coordinated implementation effort and changes the operational environment (which always carries risk).

There is the caveat that I'm not sure how many are running TFO on the Internet. (I do know Google was the biggest one, at least a couple of years ago, from research I did before joining).

Cheers,

Brian

> If a server is overloaded and can't process any more TFO data, the result could be that it just doesn't answer at all, and the client would then retransmit the SYN, just as if the SYN had been dropped.
> 
> 
> Cheers,
> Michael
> 
> 
> 
>> On 21 May 2019, at 09:52, Erik Sy <sy@informatik.uni-hamburg.de>; wrote:
>> 
>> Hi Michael,
>> 
>> thanks for this question!
>> 
>> Yes, TFO cookies are bound to the clients (local) IP address. 
>> However, a client with a static local IP address in a home network 
>> will use the same TFO cookie independently of it's publicly visible 
>> IP address. As a result, TFO cookies present an independent tracking 
>> mechanism, which does not necessarily rely on the client's publicly visible IP address.
>> 
>> Returning to your example, onion routing does not necessarily protect 
>> you against tracking via TFO cookies.
>> 
>> Best regards,
>> Erik
>> 
>> On 5/21/19 09:13, Michael Tuexen wrote:
>>>> On 20. May 2019, at 23:19, Erik Sy <sy@informatik.uni-hamburg.de>; wrote:
>>>> 
>>>> I think it is important to warn users about the privacy risks of 
>>>> RFC 7413. For example, Mozilla reacted to the privacy problems of 
>>>> TCP Fast Open by deprecating this protocol on all it's Firefox 
>>>> branches. In total, TCP Fast Open has significant issues with 
>>>> respect to user privacy, performance and deployment on the 
>>>> real-world Internet. From my point of view, it is about time to deprecate RFC 7413.
>>> Hi Eric,
>>> 
>>> my understanding is that a cookie is specific to a client address, a 
>>> server address and a server port. So it would make sense for a 
>>> client to remove entries from the cookie cache on an address change. 
>>> Assuming that, how does your described host based attacks relate to 
>>> the server just using the client IP address for tracking? If you are 
>>> trying to hide you IP-address (like using a TOR browser) you don't 
>>> want to use TFO, but you are not optimising for small RTTs in that case, so it makes no sense in that case.
>>> 
>>> Best regards
>>> Michael
>>>> Regards,
>>>> Erik
>>>> 
>>>> On 5/10/19 14:14, Erik Sy wrote:
>>>> 
>>>>> Hi everyone,
>>>>> 
>>>>> TCP Fast Open has significant privacy problems which are not 
>>>>> considered in RFC 7413.
>>>>> For example, this protocol allows a passive network observer to 
>>>>> correlate connections established by the same client, which 
>>>>> protocols such as TLS 1.3 and QUIC actively protect against. 
>>>>> Furthermore, Fast Open cookies present a kernel-based tracking 
>>>>> mechanism which is quite persistent. Amongst others, they can be 
>>>>> used to conduct cross-browser tracking on the same operating system.
>>>>> For further details please refer to this article:
>>>>> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2F
>>>>> arxiv.org%2Fpdf%2F1905.03518.pdf&amp;data=02%7C01%7Cpravb%40micros
>>>>> oft.com%7Cc8f0e624868541da87c808d6ddfb5d71%7C72f988bf86f141af91ab2
>>>>> d7cd011db47%7C1%7C1%7C636940469018140114&amp;sdata=dkgWLSFZYKENl7l
>>>>> scesJExW6SbZCGfOUXEN8oPHWh2k%3D&amp;reserved=0
>>>>> 
>>>>> I suggest, that the working group takes steps to highlight these 
>>>>> privacy problems of RFC 7413.
>>>>> 
>>>>> Regards,
>>>>> Erik
>>>>> 
>>>>> _______________________________________________
>>>>> tcpm mailing list
>>>>> tcpm@ietf.org
>>>>> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2F
>>>>> www.ietf.org%2Fmailman%2Flistinfo%2Ftcpm&amp;data=02%7C01%7Cpravb%
>>>>> 40microsoft.com%7Cc8f0e624868541da87c808d6ddfb5d71%7C72f988bf86f14
>>>>> 1af91ab2d7cd011db47%7C1%7C1%7C636940469018140114&amp;sdata=05KZ4W%
>>>>> 2BrEPGOmzC0zUf4KGYQWicR%2BS7%2F3VKYXvlizj4%3D&amp;reserved=0
>>>> _______________________________________________
>>>> tcpm mailing list
>>>> tcpm@ietf.org
>>>> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fw
>>>> ww.ietf.org%2Fmailman%2Flistinfo%2Ftcpm&amp;data=02%7C01%7Cpravb%40
>>>> microsoft.com%7Cc8f0e624868541da87c808d6ddfb5d71%7C72f988bf86f141af
>>>> 91ab2d7cd011db47%7C1%7C1%7C636940469018140114&amp;sdata=05KZ4W%2BrE
>>>> PGOmzC0zUf4KGYQWicR%2BS7%2F3VKYXvlizj4%3D&amp;reserved=0
>> 
>> _______________________________________________
>> tcpm mailing list
>> tcpm@ietf.org
>> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww
>> .ietf.org%2Fmailman%2Flistinfo%2Ftcpm&amp;data=02%7C01%7Cpravb%40micr
>> osoft.com%7Cc8f0e624868541da87c808d6ddfb5d71%7C72f988bf86f141af91ab2d
>> 7cd011db47%7C1%7C1%7C636940469018140114&amp;sdata=05KZ4W%2BrEPGOmzC0z
>> Uf4KGYQWicR%2BS7%2F3VKYXvlizj4%3D&amp;reserved=0
> 
> _______________________________________________
> tcpm mailing list
> tcpm@ietf.org
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.
> ietf.org%2Fmailman%2Flistinfo%2Ftcpm&amp;data=02%7C01%7Cpravb%40micros
> oft.com%7Cc8f0e624868541da87c808d6ddfb5d71%7C72f988bf86f141af91ab2d7cd
> 011db47%7C1%7C1%7C636940469018140114&amp;sdata=05KZ4W%2BrEPGOmzC0zUf4K
> GYQWicR%2BS7%2F3VKYXvlizj4%3D&amp;reserved=0

_______________________________________________
tcpm mailing list
tcpm@ietf.org
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ietf.org%2Fmailman%2Flistinfo%2Ftcpm&amp;data=02%7C01%7Cpravb%40microsoft.com%7Cc8f0e624868541da87c808d6ddfb5d71%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C1%7C636940469018140114&amp;sdata=05KZ4W%2BrEPGOmzC0zUf4KGYQWicR%2BS7%2F3VKYXvlizj4%3D&amp;reserved=0