Re: [DNSOP] I-D Action: draft-ietf-dnsop-edns-tcp-keepalive-02.txt

"Wessels, Duane" <dwessels@verisign.com> Mon, 03 August 2015 21:14 UTC

Return-Path: <dwessels@verisign.com>
X-Original-To: dnsop@ietfa.amsl.com
Delivered-To: dnsop@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 31EFE1ACD0D for <dnsop@ietfa.amsl.com>; Mon, 3 Aug 2015 14:14:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.701
X-Spam-Level:
X-Spam-Status: No, score=-0.701 tagged_above=-999 required=5 tests=[BAYES_20=-0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 Ux8NF-oYr9kN for <dnsop@ietfa.amsl.com>; Mon, 3 Aug 2015 14:14:40 -0700 (PDT)
Received: from mail-qg0-f97.google.com (mail-qg0-f97.google.com [209.85.192.97]) (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 B9C921A1A2D for <dnsop@ietf.org>; Mon, 3 Aug 2015 14:14:39 -0700 (PDT)
Received: by qgal74 with SMTP id l74so7331212qga.2 for <dnsop@ietf.org>; Mon, 03 Aug 2015 14:14:39 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:thread-topic:thread-index :date:message-id:references:in-reply-to:accept-language :content-language:content-type:mime-version; bh=iz5nkPNyRIw6Sp1+geNIFpi1jWpoLl4TJctl9EXT9+I=; b=ZZgEUKr0amjoGD868TDJnFsYr4BI5D+M8GeoHp8KGL3TxrDY1ZlAdjRDaTiit+AiFz 7HK6ECqBJpYm4AN0GZq6E4X9kr1/6/wAuPpDTf7gGo8CP9OhmEmGCNzfk2GP7YgCGHU4 5IIZF2bMAXPDFjjeIOLulbccY0sDPkfBo1QCXVCuwPqk4M1ggttA4o59LDok3kOiKWCL ciPlGXKgRxCOw4xoIw1+CFMv8a4vHl6Adz8ArZC5Md5BS8U1pZMSPBBIVim8++qwyZww QjU7G7Q2W9IOctVQ/Jr0NHbnWYf8pC8pdz6veHy5sVcCWqzBfZtRRAaR04qlJUq904Vk XnRQ==
X-Gm-Message-State: ALoCoQn6QeCVpOisR2tzNO/xQ3d5bP5epWk8ezl3TN+ghzOTmNYKl2C+qbT9eAQpzl739bkFSur0tzOdvb5uHw2Xzn0ZQBU4XQ==
X-Received: by 10.55.26.151 with SMTP id l23mr233291qkh.10.1438636478914; Mon, 03 Aug 2015 14:14:38 -0700 (PDT)
Received: from brn1lxmailout01.verisign.com (brn1lxmailout01.verisign.com. [72.13.63.41]) by smtp-relay.gmail.com with ESMTPS id a64sm1559941qka.4.2015.08.03.14.14.38 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 03 Aug 2015 14:14:38 -0700 (PDT)
X-Relaying-Domain: verisign.com
Received: from BRN1WNEXCHM01.vcorp.ad.vrsn.com (brn1wnexchm01 [10.173.152.255]) by brn1lxmailout01.verisign.com (8.13.8/8.13.8) with ESMTP id t73LEaxU032620 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Mon, 3 Aug 2015 17:14:36 -0400
Received: from BRN1WNEXMBX01.vcorp.ad.vrsn.com ([::1]) by BRN1WNEXCHM01.vcorp.ad.vrsn.com ([::1]) with mapi id 14.03.0174.001; Mon, 3 Aug 2015 17:14:36 -0400
From: "Wessels, Duane" <dwessels@verisign.com>
To: IETF DNSOP WG <dnsop@ietf.org>
Thread-Topic: [DNSOP] I-D Action: draft-ietf-dnsop-edns-tcp-keepalive-02.txt
Thread-Index: AQHQzjFmMkIsxTnTT0CpudspjUFf9A==
Date: Mon, 03 Aug 2015 21:14:35 +0000
Message-ID: <465081EE-2A2E-40EF-B74F-12A85006660B@verisign.com>
References: <20150703140645.10082.67901.idtracker@ietfa.amsl.com>
In-Reply-To: <20150703140645.10082.67901.idtracker@ietfa.amsl.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
x-originating-ip: [10.173.152.4]
Content-Type: multipart/signed; boundary="Apple-Mail=_BD145333-2D51-41BD-A38E-146E720B7437"; protocol="application/pkcs7-signature"; micalg="sha1"
MIME-Version: 1.0
Archived-At: <http://mailarchive.ietf.org/arch/msg/dnsop/drgvdW5pANrUgd9CAuBvOJYHfss>
Cc: "draft-ietf-dnsop-edns-tcp-keepalive@tools.ietf.org" <draft-ietf-dnsop-edns-tcp-keepalive@tools.ietf.org>
Subject: Re: [DNSOP] I-D Action: draft-ietf-dnsop-edns-tcp-keepalive-02.txt
X-BeenThere: dnsop@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: IETF DNSOP WG mailing list <dnsop.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dnsop>, <mailto:dnsop-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dnsop/>
List-Post: <mailto:dnsop@ietf.org>
List-Help: <mailto:dnsop-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dnsop>, <mailto:dnsop-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 03 Aug 2015 21:14:42 -0000

I offered to review this document during the WG meeting in Prague...


>    Mitigation
>    of such attacks on authoritative-only servers is possible using an
>    approach known as Response Rate-Limiting [RRL], an approach designed
>    to minimise the frequency at which legitimate responses are discarded
>    by truncating responses that appear to be motivated by an attacker,
>    forcing legitimate clients to re-query using TCP transport.

proposed rewrite:

Response Rate Limiting [RRL] is designed to help mitigate such attacks
against authoritative-only servers.  One feature of RRL is to let some
amount of responses "slip" through the rate limiter.  These are returned
with the TC (truncation) bit set, which causes legitimate clients to re-query
using TCP transport.


>   Fragmentation is known to be problematic
>    in general, and has also been implicated in increasing the risk of
>    cache poisoning attacks.

Citation for above:

[fragmentation-considered-poisonous]
              Herzberg, A. and H. Shulman, "Fragmentation Considered
              Poisonous", May 2012, <http://arxiv.org/abs/1205.4011>.

> 
>    The use of TCP transport does not suffer from the risks of
>    fragmentation nor reflection attacks.

I'm not sure there is general agreement on such an absolute statement.  Perhaps
TCP is "less susceptible" to fragmentation and reflection?


> 
>    (It should perhaps be noted that the overhead for a DNS transaction
>    over UDP truncated due to RRL is 3x RTT, higher than the overhead
>    imposed on the same transaction initiated over TCP.)
> 
>    With increased deployment of DNSSEC and new RRtypes containing
>    application specific cryptographic material, there is an increase in
>    the prevalence of truncated responses received over UDP with fallback
>    to TCP.


I'd suggest swapping the order of the two paragraphs above.  I think large
DNSSEC responses is the normal case and perhaps a better reason to
care about (long lived) TCP than is the attack case.  Both are "3x RTT" 
(worst case) due to UDP truncation.


> 
>    The use of TCP transport requires considerably more state to be

Earlier it was said that UDP is stateless, so one could argue that TCP requires infinitely more state.  :-)

But I think the sentence should just say "...TCP transport requires state to be retained..."



>    well-used, and those that remain idle for long periods are closed
>    promptly.

suggested rewrite:

   ... and idle connections are closed after an appropriate amount of time.


> 
>    This document proposes a signalling mechanism between DNS clients and
>    servers that provides a means to better balance the use of UDP and
>    TCP transport, reducing the impact of problems associated with UDP

I'm not sure its fair to say that this document reduces the impact of UDP problems.


> 
>    The reduced overhead of this extension adds up significantly when
>    combined with other edns extensions,

edns -> EDNS0


>    [STARTTLS].  For example, the combination of these EDNS extensions

EDNS -> EDNS0 ?

>    make it possible for hosts on high-latency mobile networks to
>    natively perform DNSSEC validation and encrypt queries.

perhaps "...natively and efficiently perform..."?

> 
> 3.1.  Option Format
> 
>    The edns-tcp-keepalive option is encoded as follows:
> 
>                         1                   2                   3
>     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
>    +-------------------------------+-------------------------------+
>    !         OPTION-CODE           !         OPTION-LENGTH         !
>    +-------------------------------+-------------------------------+
>    |                            TIMEOUT                            |
>    +---------------------------------------------------------------+
> 
>    where:
> 
>    OPTION-CODE:   the EDNS0 option code assigned to edns-tcp-keepalive,
>       [TBD]
> 
>    OPTION-LENGTH:   the value 0 if the TIMEOUT is omitted, the value 2
>       if it is present;

> 
>    TIMEOUT:   an idle timeout value for the TCP connection, specified in
>       units of 100 milliseconds, encoded in network byte order.


The diagram above indicates TIMEOUT is a 32-bit value, which would make
OPTION-LENGTH 4.

I suspect it was really intended as a 16-bit value (OPTION-LENGTH 2), which
means the max TIMEOUT is around 109 minutes?


> 
>    Clients MUST specify a OPTION-LENGTH of 0 and omit the TIMEOUT value.

an OPTION-LENGTH


>    The
>    DNS server SHOULD send a edns-tcp-keepalive option with a timeout of
>    0 if it deems its local resources are too low to service more TCP
>    keepalive sessions.

Or if it wants clients to close currently open connections.


>    imposed by the operating system.  Servers that implement keepalive

suggest  "...that implement edns-tcp-keepalive..."


> 
>    It is RECOMMENDED that DNS intermediaries which terminate TCP
>    connections implement keepalive.  

suggest "... implement edns-tcp-keepalive."


> Should a non-keepalive-aware
>    intermediary sit between a client and server that both support
>    keepalive a potential side effect will be an increased frequency of
>    the proxy closing idle client connections.

suggest changing proxy to intermediary


>  When a Nameserver
>    detects abusive behaviour, it SHOULD immediately close the TCP
>    connection and free all buffers used.

The "free all buffers used" sounds strange to my ear.  I'd think it is sufficient
to say that the TCP connections should be closed.

> 
>    [STARTTLS]
>               Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D.,
>               and P. Hoffman, "TLS for DNS: Initiation and Performance
>               Considerations", draft-ietf-dprive-start-tls-for-dns-02
>               (work in progress), May 2015.


Since we're dropping the STARTTLS upgrade technique from that draft the
anchor text should probably be changed to something like "TLSforDNS".

DW