Re: [tram] Eric Rescorla's Discuss on draft-ietf-tram-stunbis-16: (with DISCUSS and COMMENT)

Marc Petit-Huguenin <> Mon, 23 April 2018 18:17 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 40A3612D887; Mon, 23 Apr 2018 11:17:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -0.442
X-Spam-Status: No, score=-0.442 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RDNS_NONE=0.793, SPF_SOFTFAIL=0.665] autolearn=no autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id qH9NkZOpP8wN; Mon, 23 Apr 2018 11:16:57 -0700 (PDT)
Received: from (unknown []) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id E9BF2126C0F; Mon, 23 Apr 2018 11:16:56 -0700 (PDT)
Received: from [IPv6:2601:648:8301:730f:fdb6:1cc8:478a:5b55] (unknown [IPv6:2601:648:8301:730f:fdb6:1cc8:478a:5b55]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "Marc Petit-Huguenin", Issuer "" (verified OK)) by (Postfix) with ESMTPS id EDFB9AE844; Mon, 23 Apr 2018 20:16:53 +0200 (CEST)
To: Eric Rescorla <>
Cc:,, Gonzalo Camarillo <>,, The IESG <>,
References: <> <> <>
From: Marc Petit-Huguenin <>
Message-ID: <>
Date: Mon, 23 Apr 2018 11:16:52 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0
MIME-Version: 1.0
In-Reply-To: <>
Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="APSC6FpkQJfx6d3dxvkhOX6rwdS1E9YP0"
Archived-At: <>
Subject: Re: [tram] Eric Rescorla's Discuss on draft-ietf-tram-stunbis-16: (with DISCUSS and COMMENT)
X-Mailman-Version: 2.1.22
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." <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Mon, 23 Apr 2018 18:17:01 -0000

On 04/22/2018 05:22 PM, Eric Rescorla wrote:
> On Sun, Apr 22, 2018 at 2:02 PM, Marc Petit-Huguenin <>
> wrote:
>>>>      For a request or indication message, the agent MUST include the
>> attributes
>>>>      in the message unless the agent knows from an external indication
>>>>      which message integrity algorithm is supported by both agents.  In
>>>>      be included in addition to USERNAME.  The HMAC for the MESSAGE-
>>> This text appears to conflict with S 7.3 of 5245-bis, which says:
>> [text missing]
>> Hmm, no, RFC245bis is still referencing RFC5389, so the procedure for
>> stunbis does not apply.
> I hear what you're saying, but publishing two documents at the same time
> which
> make contrary recommendations about the same basic protocol is un-good.

Sure, but wouldn't it be simpler to have rfc5245bis using stunbis and have them updating their text, more than adding some tortuous text in stunbis?

>>>      The STUN usage must specify which transport protocol is used, and
>> how
>>>>      the agent determines the IP address and port of the recipient.
>>>>      Section 8 describes a DNS-based method of determining the IP
>> address
>>>>      and port of a server that a usage may elect to use.  STUN may be
>> used
>>>>      with anycast addresses, but only with UDP and in usages where
>>>>      authentication is not used.
>>> Why this restriction? You should be able to use anycast with long-term
>>> AUTH for (say) TURN.
>> I think that the decision of permitting Anycast should be left to each
>> STUN Usage.  Basic STUN Usage does not use authentication and use only a
>> one round trip for the Binding transaction, so Unicast can be used.
>> OTOH, TURN and ICE should probably say something about that, so I added a
>> new bullet point in Section 13:
>>    o  If Anycast addresses can be used for the server in case TCP or
>>       TLS-over-TCP, or authentication are used.
> Are you leaving this text in? That seems very confusing.

In isolation yes, but I think it makes sense which the text before the bullet points:

   A STUN usage defines how STUN is actually utilized -- when to send
   requests, what to do with the responses, and which optional
   procedures defined here (or in an extension to STUN) are to be used.
   A usage also defines:


   o  If Anycast addresses can be used for the server in case TCP or
      TLS-over-TCP, or authentication are used.

>>>>      transaction over UDP or DTLS-over-UDP is also considered failed if
>>>>      there has been a hard ICMP error [RFC1122].  For example, assuming
>> an
>>>>      RTO of 500ms, requests would be sent at times 0 ms, 500 ms, 1500
>> ms,
>>>>      3500 ms, 7500 ms, 15500 ms, and 31500 ms.  If the client has not
>>>>      received a response after 39500 ms, the client will consider the
>>>>      transaction to have timed out.
>>> I note that these recommendations now seem crazily long. I assume the
>>> WG had consensus on this, but I wanted to note it.
>> Not just the WG, also the IESG that approved RFC 5389 too as, but for the
>> addition of "or DTLS-over-UDP", this is the same text than in RFC 5389.
> Yes, I know. My point is that while they might have bee sensible when
> 5389 was published they *now* seem crazily long. Did the WG explicitly
> decide not to update them?

No, nobody ever suggested that there was an issue there.

>>>>      ALTERNATE-SERVER where authentication of the response is not
>> possible
>>>>      or practical.  If the transaction uses TLS or DTLS and if the
>>>>      transaction is authenticated by a MESSAGE-INTEGRITY-SHA256
>> attribute
>>>>      and if the server wants to redirect to a server that uses a
>> different
>>>>      certificate, then it MUST include an ALTERNATE-DOMAIN attribute
>>>>      containing the subjectAltName of that certificate.
>>> 1. Why is MESSAGE-INTEGRITY-SHA256 relevant here?
>> ALTERNATE-DOMAIN exists only since stunbis, so the
>> MESSAGE-INTEGRITY-SHA256 acts as a flag indicating that 1) the transaction
>> is authenticated and 2) that the client understand that new attribute.
> This would be good to explain.

New text:

   containing the subjectAltName of that certificate.  The test on the
   MESSAGE-INTEGRITY-SHA256 attribute indicates that the transaction is
   authenticated and that the client implements this specification and
   so can process the ALTERNATE-DOMAIN attribute.

>>>>      o  What authentication and message-integrity mechanisms are used.
>>>>      o  The considerations around manual vs. automatic key derivation
>> for
>>>>         the integrity mechanism, as discussed in [RFC4107].
>>>>      o  What mechanisms are used to distinguish STUN messages from other
>>> Why is this required? It seems like that's a generic STUN feature.
>> That text is identical to the text in RFC 5389.  RFC 5764/7983 is one such
>> mechanism, but there is nothing that prevent another protocol stack to use
>> a different mechanism (inference, shim, etc...)
> But ultimately no matter what the other protocol provides for demux, STUN
> has its
> own demux.

In fact I think that the reason for that item was because FINGERPRINT can also be used to demux STUN traffic, but it is optional.  So an STUN Usage needs to tell if FINGERPRINT is mandatory (like in ICE).

>>>      transport protocol uses TLS or DTLS.
>>>>      The value of ALTERNATE-DOMAIN is variable length.  It MUST be a
>> UTF-8
>>>>      [RFC3629] encoded sequence of less than 128 characters (which can
>> be
>>>>      as long as 509 bytes when encoding them and as long as 763 bytes
>> when
>>>>      decoding them).
>>> Is it an A-label or a U-label?
>> I do not know.  What would you suggest?
> I believe Alexey raised this separately, so I would refer to his comments.
>>>>      that is not readily subject to offline dictionary attacks.
>>>>      Protection of the channel itself, using TLS or DTLS, mitigates
>> these
>>>>      attacks.
>>>>      which is subject to bid down attacks by an on-path attacker.
>>> By an on-path attacker who can forge HMAC-SHA1 in real-time? That's a
>>> pretty serious adversary, so you should clarify here
>> New text:
>>    which is subject to bid down attacks by an on-path attacker that
>>    would strip the MESSAGE-INTEGRITY-SHA256 attribute leaving only the
>>    MESSAGE-INTEGRITY attribute and exploiting a potential vulnerability.
>>    Protection of the channel itself, using TLS or DTLS, mitigates these
>>    attacks.  Timely removal of the support of MESSAGE-INTEGRITY in a
>>    future version of STUN is necessary.
> I still don't understand the capabilities you seem to believe the attacker
> has.
> Can you describe the exact attack.

1. Vulnerability is found in HMAC-SHA1
2. Client Alice still supports M-I and M-I-256, does not know what version of STUN server Bob supports and so send both.
3. On-path attacker removes M-I-256.
5. stunbis server Bob thinks that Alice is an RFC 5389 client and continue with that protocol.

Marc Petit-Huguenin