Re: [rtcweb] Review of draft-ietf-rtcweb-stun-consent-freshness

Bernard Aboba <bernard.aboba@gmail.com> Thu, 21 May 2015 21:13 UTC

Return-Path: <bernard.aboba@gmail.com>
X-Original-To: rtcweb@ietfa.amsl.com
Delivered-To: rtcweb@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 50F6D1A9064; Thu, 21 May 2015 14:13:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 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, HTML_MESSAGE=0.001, SPF_PASS=-0.001] autolearn=ham
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 7hvz5t_4e9vz; Thu, 21 May 2015 14:13:30 -0700 (PDT)
Received: from mail-wg0-x22e.google.com (mail-wg0-x22e.google.com [IPv6:2a00:1450:400c:c00::22e]) (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 A1F0A1A9061; Thu, 21 May 2015 14:13:29 -0700 (PDT)
Received: by wgbgq6 with SMTP id gq6so98001495wgb.3; Thu, 21 May 2015 14:13:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=RDogaSd7479udWww3IwVtVd0PPeXLoI+dtAzfSZ/BFA=; b=tesebUsOHuU90+Tnc2vL53bWnR5uqZjnPax/A5eRkfgU4xf++zdfrAS+d0aRUKSHn0 46qmaK+0oBsMAgXfJ5qMwNShtvuCY7oCWt3UwWYq8dh9HLR3k7a+f89X8X9qdeUh9LNv u308TY/37MU4f1iRFLCHsqgp7uaQP5CXLWFb+hX5XyRNbJAXsFnLGmXCNrXUzuk32BlH 8SMoVaUkNpCgZZf2W6fbv0FV3APCZwlf3/BL/kpWDxM5MdAQSyU9/eZ2OzbzREECPyCH SjokTGjvN+aUQIqgPDEZMJkvPU0M8zQZ9E05uE9jb3lvRqwc7LBPwX8/mpCkUMIoEQkz +Cug==
X-Received: by 10.181.13.165 with SMTP id ez5mr1116682wid.77.1432242808389; Thu, 21 May 2015 14:13:28 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.27.54.16 with HTTP; Thu, 21 May 2015 14:13:08 -0700 (PDT)
In-Reply-To: <555E3991.9010809@jitsi.org>
References: <CAOW+2dsv8CVpaKoBsUvc5MGh2s3xD2J5NiXPAnFUMOhYqSmjzQ@mail.gmail.com> <555E3991.9010809@jitsi.org>
From: Bernard Aboba <bernard.aboba@gmail.com>
Date: Thu, 21 May 2015 14:13:08 -0700
Message-ID: <CAOW+2duSbFeRyo4M984X-4HVGaD6ZgXjTSH7N--D_ga0JY2qUA@mail.gmail.com>
To: Emil Ivov <emcho@jitsi.org>
Content-Type: multipart/alternative; boundary="f46d043c80d0d3868605169e03d5"
Archived-At: <http://mailarchive.ietf.org/arch/msg/rtcweb/3YGRiSYd4dpBH33atMWB4sOmIIM>
Cc: "rtcweb@ietf.org" <rtcweb@ietf.org>, The IESG <iesg@ietf.org>
Subject: Re: [rtcweb] Review of draft-ietf-rtcweb-stun-consent-freshness
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.15
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: <http://www.ietf.org/mail-archive/web/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, 21 May 2015 21:13:32 -0000

Emil said:

   "Each STUN transaction MUST use a new cryptographically strong
   [RFC4086] STUN transaction ID.  Each STUN transaction for consent
   is transmitted once only. Hence, the sender cannot assume that it
   will receive a response for each consent transaction, and a response
   might be for a previous transaction (rather than for the most
   recently sent request).

[BA] Within a STUN transaction you can have retransmissions, so not sure
about the "transmitted once only" part.  But I generally agree with your
point - reusing the RF 5389 STUN transaction and RTT/RTO mechanism would
fix the problems.

 The fact that this entire paragraphs becomes redundant after the change is
probably good indication that we were basically defining STUN transactions
...

[BA] I agree - and the mechanism specified in this document is not as good
as the one in RFC 5389 (which is already widely deployed).

 Obviously using transactions for every consent check would leave us with a
couple of potential issues, like, what if you already have an ongoing STUN
transaction and randomization tells you to start a new one. Those could be
easily fixed however. For example, by simply starting the random timer
after a STUN transaction has completed (as opposed to after sending the
request)."

[BA] Exactly.  So you end up with a series of STUN transactions spaced
randomly apart.  Except now you get adaptation to network characteristics,
backoff (which reduces the ability to use freshness to mount denial of
service attacks), RTT/RTO estimation, etc.  Plus you get to reuse RFC 5389
code (which many of us were going to do anyway, since it will work better
than what is specified in this draft).

On Thu, May 21, 2015 at 1:01 PM, Emil Ivov <emcho@jitsi.org> wrote:

> On 21.05.15 1:48, Bernard Aboba wrote:
>
>> This is a review of draft-ietf-rtcweb-stun-consent-freshness.
>>
>> Overall, I believe that this document is not yet ready for publication
>> as a proposed standard,
>> due to transport-related issues.  Rather than building upon the RFC 5389
>> transport model
>> (including the transaction structure and RTT/RTO estimator), the
>> specification proposes a
>> new (and poorly specified) transport model that does not adapt properly
>> to networks with differing transport characteristics.
>>
>
> I think we can easily fix this if we replace semantic usage of "STUN
> request" throughout the specification with "STUN transaction".
>
> For example, in page 4 in the following paragraph:
>
>    Each STUN binding request for consent MUST use a new
>    cryptographically strong [RFC4086] STUN transaction ID.  Each STUN
>    binding requests for consent is transmitted once only.  Hence, the
>    sender cannot assume that it will receive a response for each consent
>    request, and a response might be for a previous request (rather than
>    for the most recently sent request).
>
> replacing request with transaction we would get:
>
>    Each STUN transaction MUST use a new cryptographically strong
>    [RFC4086] STUN transaction ID.  Each STUN transaction for consent
>    is transmitted once only. Hence, the sender cannot assume that it
>    will receive a response for each consent transaction, and a response
>    might be for a previous transaction (rather than for the most
>    recently sent request).
>
> The fact that this entire paragraphs becomes redundant after the change is
> probably good indication that we were basically defining STUN transactions
> ...
>
> Obviously using transactions for every consent check would leave us with a
> couple of potential issues, like, what if you already have an ongoing STUN
> transaction and randomization tells you to start a new one. Those could be
> easily fixed however. For example, by simply starting the random timer
> after a STUN transaction has completed (as opposed to after sending the
> request).
>
> Emil
>
> --
> https://jitsi.org
>