Re: [tram] Transport of ICMP errors in TURN

Marc Petit-Huguenin <petithug@acm.org> Thu, 27 August 2015 14:45 UTC

Return-Path: <petithug@acm.org>
X-Original-To: tram@ietfa.amsl.com
Delivered-To: tram@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1326C1A894B for <tram@ietfa.amsl.com>; Thu, 27 Aug 2015 07:45:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.236
X-Spam-Level:
X-Spam-Status: No, score=-1.236 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_SOFTFAIL=0.665] autolearn=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 yP5qZwc6sW1l for <tram@ietfa.amsl.com>; Thu, 27 Aug 2015 07:45:11 -0700 (PDT)
Received: from implementers.org (implementers.org [IPv6:2604:3400:dc1:41:216:3eff:fe5b:8240]) by ietfa.amsl.com (Postfix) with ESMTP id 5F00A1A88C5 for <tram@ietf.org>; Thu, 27 Aug 2015 07:45:11 -0700 (PDT)
Received: from [IPv6:2602:61:7515:ec00:6c4a:517e:21cb:6368] (unknown [IPv6:2602:61:7515:ec00:6c4a:517e:21cb:6368]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client CN "Marc Petit-Huguenin", Issuer "implementers.org" (verified OK)) by implementers.org (Postfix) with ESMTPS id 1936020415; Thu, 27 Aug 2015 16:45:09 +0200 (CEST)
To: "Pal Martinsen (palmarti)" <palmarti@cisco.com>
References: <55DD94FF.7080400@acm.org> <55DDB133.6090608@jive.com> <A8F8D0A4-C847-4F3E-B5A3-45DA47CB95D9@cisco.com> <55DEF61F.8070809@acm.org> <82CC0777-152C-4741-9BCF-DF08CF2CC8DA@cisco.com>
From: Marc Petit-Huguenin <petithug@acm.org>
Message-ID: <55DF226E.4020708@acm.org>
Date: Thu, 27 Aug 2015 08:45:02 -0600
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.1.0
MIME-Version: 1.0
In-Reply-To: <82CC0777-152C-4741-9BCF-DF08CF2CC8DA@cisco.com>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Archived-At: <http://mailarchive.ietf.org/arch/msg/tram/dk5PzVhBzzCUSAftYVoSpYQl0o4>
Cc: Simon Perreault <sperreault@jive.com>, "tram@ietf.org" <tram@ietf.org>
Subject: Re: [tram] Transport of ICMP errors in TURN
X-BeenThere: tram@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "Discussing the creation of a Turn Revised And Modernized \(TRAM\) WG, which goal is to consolidate the various initiatives to update TURN and STUN." <tram.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tram>, <mailto:tram-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tram/>
List-Post: <mailto:tram@ietf.org>
List-Help: <mailto:tram-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tram>, <mailto:tram-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 27 Aug 2015 14:45:13 -0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 08/27/2015 07:01 AM, Pal Martinsen (palmarti) wrote:
> 
>> On 27 Aug 2015, at 13:35, Marc Petit-Huguenin <petithug@acm.org> wrote:
>>
> On 08/27/2015 04:29 AM, Pal Martinsen (palmarti) wrote:
>>>>
>>>> On 26 Aug 2015, at 14:29, Simon Perreault
>>>> <sperreault@jive.com<mailto:sperreault@jive.com>> wrote:
>>>>
>>>> Le 2015-08-26 06:29, Marc Petit-Huguenin a écrit : During the
>>>> presentation of the Path MTU Discovery Using STUN draft in Prague,
>>>> there was some discussion on how ICMP can be received by the client
>>>> when the PMTUD probes are sent through a TURN server.  Which reminded
>>>> me that I worked on that problem when I proposed PMTUD over STUN,
>>>> back in 2008.  That was the case, according to my notes, but in fact
>>>> the idea of tunneling the ICMP packets through the TURN server was
>>>> proposed the year before, but for a different reason:
>>>>
>>>> https://mailarchive.ietf.org/arch/msg/behave/76pAtymXlAtF5SoD0rgoFECf2Fg
>>>>
>>>> So my proposal is to add this into turnbis.  I can provide text.
>>>>
>>>> RFC 5766 section 2.6
>>>> <https://tools.ietf.org/html/rfc5766#section-2.6> explains that ICMP
>>>> not being relayed was a design decision to make it possible to run a
>>>> TURN server as an unprivileged user. That conclusion is wrong for two
>>>> reasons:
>>>>
>>>> - With the BSD sockets API, some ICMP errors are translated into
>>>> recv() error codes. This means that it is always possible to relay at
>>>> least some subset of ICMP errors. (Not sure for TCP or IPv6, I’d need
>>>> to check.)
>>>>
>>>>
>>>> It is possible by creating a new listen socket.
>>>>
>>>> See:
>>>> https://tools.ietf.org/html/draft-martinsen-tram-stuntrace-01#appendix-A.2
>>>>
>>>> The code described in that ID works well and we have implemented it
>>>> in most of our hard and soft clients. Not sure about any performance
>>>> issues when doing this on the server side though.
>>>>
>>>> The STUNTrace ID is not a TRAM draft anymore. We will ask for it to
>>>> be AD sponsored, just need to have some more discussion in the
>>>> security section regarding information leakage. This is particular
>>>> hard in the intersection network troubleshooting and end user
>>>> privacy. If you got any concerns or ideas please ping me. (Or maybe
>>>> we can have chair approval to have the discussion on this list? If
>>>> any that is..)
>>>>
>>>>
>>>> - On Linux, which dominates the market of TURN server, one can
>>>> receive all ICMP errors as an unprivileged user with the
>>>> IP(V6)_RECVERR socket option.
>>>>
>>>> So my conclusion is: yes, please. :)
>>>>
>>>> +1
>>>>
>>>> But we need to carefully describe the security pitfalls. Some people
>>>> might already be using a TURN server as mean to hide their “true” IP
>>>> address. Any changes in the TURN spec that introduces a change in the
>>>> server behaviour that affects the privacy aspect might potentially be
>>>> risk to some users.
>>>>
> 
> Can you elaborate on this? The proposed extension is to have the server send to the client an indication message that wraps the information for ICMP packets received by the server with only type 3, and perhaps type 12 for ICMPv4 and 1, 2 and 3 for ICMPv6, and that match a permission and contain an UDP header.
> 
> This indication message will contain a XOR-MAPPED-ADDRESS attribute that contains the same IP address/port that was in the CreatePermission/Send messages sent by the client (or in the CHANNEL-BIND request if channels are used).  There is no additional information leaked here.
> 
> Then the indication message should also contain a new attribute that contains the ICMP error.  That also does not reveal anything about the identity of the sender of the packet that triggered this ICMP packet.
> 
> 
>> If we limit this to deal with host unreachable and related problems I am fine with this. Having the argumentation you just did in the spec is useful. 

OK, I'll propose text for the security consideration section

> 
>> My main concern was if we wanted to turn the TURN server into some sort of ICMP gateway and allow the client to trigger all sort of network weirdness on the public side. 

No.  Only error ICMP are to be translated.  See the patch I just sent.

> 
>> Sorry about wearing the paranoia hat, just wanted to make sure this was understood and discussed.

- -- 
Marc Petit-Huguenin
Email: marc@petit-huguenin.org
Blog: http://blog.marc.petit-huguenin.org
Profile: http://www.linkedin.com/in/petithug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJV3yJtAAoJECnERZXWan7EkecP/3g04DXkXoaYX13uEa670buf
MidwaB6M3ZtfSVLUg8Ogga96ceAPbeJqhmTc9IS7yaYZ1aKwwdJxfvNb4kkVaN9T
K/8GN+gT9qgtRldTOBkuiah1c6CcduKQqY/0NZVlL5Uv8csQE5rDBA+d1MyKYyEc
oIvSHhapnKfHDMJwlRtWMl50HECtAKNrtvbL+jpsi4zErXSYJPTS40GAnBKAyGSn
QhWNaqhcqmAkEWvTrhSkkRVOZFS/VUGsHaIpSSm3MrR/HcgH9V2jIgXy9M4RZwmk
YHHJJ7+oqAKBm/ftij1ZJiJkHRrO+fA+56p3G4wRBtL90jddCgRFv4kv6YNpXmGK
kzAj3jzbvKOwnogAKv+LI3HPyk6fVBQEhF0O3fU8Vy8bJHpB0LaX3ZrsnMZFB5FW
HYPk+DgtlZHg4M4X5smxk6vp7MFQaDTBMmHMxqtPAiiVwypze9OHaAPG6B7EX5oY
BeF0SXedQmZshCSSGvDgYdrmNl1s2Dte+wBiHlA/iXbKkRR3pBLHGWAf+MpbHbAQ
cokI8VdcQZqQ3pPZgrk5FBpMyJHImJT4EM2ozwHo9uiU09ZxbUAm5ebKHrlv/JxH
fmCCdwZkaATvXi64bIwkXEvf3ZLZzE6NIr5jSgsXnoO/Nc7ja6lZkvDOq2Y/mVpd
pHjog+8vP58T1Wa9oE+9
=CbBc
-----END PGP SIGNATURE-----