Re: [DNSOP] draft-hzhwm-start-tls-for-dns-00: Starting TLS over DNS

Tony Finch <dot@dotat.at> Sat, 15 February 2014 15:40 UTC

Return-Path: <fanf2@hermes.cam.ac.uk>
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 CA93B1A0087; Sat, 15 Feb 2014 07:40:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.448
X-Spam-Level:
X-Spam-Status: No, score=-2.448 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RP_MATCHES_RCVD=-0.548] 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 vhQNv8AD6D8v; Sat, 15 Feb 2014 07:40:51 -0800 (PST)
Received: from ppsw-32.csi.cam.ac.uk (ppsw-32.csi.cam.ac.uk [IPv6:2001:630:212:8::e:f32]) by ietfa.amsl.com (Postfix) with ESMTP id B87AF1A0040; Sat, 15 Feb 2014 07:40:50 -0800 (PST)
X-Cam-AntiVirus: no malware found
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from hermes-1.csi.cam.ac.uk ([131.111.8.51]:45868) by ppsw-32.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.156]:25) with esmtpa (EXTERNAL:fanf2) id 1WEhMG-0004k3-0e (Exim 4.82_3-c0e5623) (return-path <fanf2@hermes.cam.ac.uk>); Sat, 15 Feb 2014 15:40:48 +0000
Received: from fanf2 by hermes-1.csi.cam.ac.uk (hermes.cam.ac.uk) with local id 1WEhMG-0000Gp-4U (Exim 4.72) (return-path <fanf2@hermes.cam.ac.uk>); Sat, 15 Feb 2014 15:40:48 +0000
Date: Sat, 15 Feb 2014 15:40:48 +0000
From: Tony Finch <dot@dotat.at>
X-X-Sender: fanf2@hermes-1.csi.cam.ac.uk
To: Zi Hu <zihu@usc.edu>
In-Reply-To: <CAESS1RPh+UK+r=JzZ9nE_DUqcvNtZiS6TNt1CDN-C0uiU7HP=A@mail.gmail.com>
Message-ID: <alpine.LSU.2.00.1402151448290.15381@hermes-1.csi.cam.ac.uk>
References: <CAESS1RPh+UK+r=JzZ9nE_DUqcvNtZiS6TNt1CDN-C0uiU7HP=A@mail.gmail.com>
User-Agent: Alpine 2.00 (LSU 1167 2008-08-23)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset="US-ASCII"
Sender: Tony Finch <fanf2@hermes.cam.ac.uk>
Archived-At: http://mailarchive.ietf.org/arch/msg/dnsop/-xnJ73pAzE5d-ZTgw8-qZHZJrjc
Cc: dnsop@ietf.org, perpass@ietf.org
Subject: Re: [DNSOP] draft-hzhwm-start-tls-for-dns-00: Starting TLS over DNS
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: <http://www.ietf.org/mail-archive/web/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: Sat, 15 Feb 2014 15:40:54 -0000

Zi Hu <zihu@usc.edu> wrote:

> We recently posted draft-hzhwm-start-tls-for-dns-00 ("Starting TLS over
> DNS") to explore one proposal to add standard TLS over standard DNS to
> improve privacy.

I like this. The general approach of the extension looks sensible to me.

Some comments:

   This document defines only the protocol extensions necessary to
   support TLS negotiation.  It does not describe how DNS clients might
   validate server certificates or specify trusted certificate
   authorities.  Solutions for certificate authentication are outside
   the scope of this document.

This absolutely needs to be defined before the protocol is deployed and I
think it is a huge mistake to rule it out of scope.

SMTP made this mistake (RFC 3207) and as a result most certificates
offered by SMTP servers cannot be validated, and SMTP over TLS is
vulnerable to MITM attacks. Fixing this is a huge headache. I don't
want to see it happen again.

But solving this problem is really hard especially in this context :-(

A DANE-like approach might work for authoritative servers.

Dunno about stub <-> recursive connections...

2.1.2.  Receiving Responses

   A DNS client that receives a response using UDP transport that has
   the TO bit set MUST handle that response as usual.  It MAY record the
   server's support for DNS-over-TLS and use that information as part of
   its server selection algorithm in the case where multiple servers are
   available to service a particular query.  [For discussion: UDP is
   subject to spoofing and a client which depends on TO=1 in a UDP
   response may be tricked into never upgrading to TLS.]

This is also true for DNS over TCP. It would be nice to have some stronger
protection against downgrade attacks. Point 3 in the security
considerations needs more thought.

   A DNS client that receives a response to its initial query using TCP
   transport that has the TO bit clear MUST not initiate a TLS handshake
   and SHOULD utilize the existing TCP connection for subsequent
   queries.

I think in this situation it would be better for the client to go back to
using UDP. Existing DNS servers do not handle TCP queries concurrently, so
the client will suffer much worse performance by continuing to use TCP.

2.4.  Middleboxes

   2.  The DNS client sends a TO=1 query and receives a TO=1 response,
       but the TLS handshake fails because the server's certificate
       cannot be authenticated.  In this case the client SHOULD close
       the established connection and fall back to unencrypted DNS for a
       reasonable period (as discussed in Section 2.1.2).

Having said that certificate validation is really important, I still think
that unauthenticated encryption is strictly better than nothing, since it
defeats passive (but not active) eavesdropping. But this kind of soft
failure is a great way to introduce downgrade attacks.

3.  Performance Considerations

This section should require servers to handle DNS queries over TCP and TLS
concurrently. They should be prepared to send responses as soon as they
are available, and out of order when necessary, to avoid head-of-line
blocking. This minimises the performance penalty relative to UDP.

Tony.
-- 
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
Forties, Cromarty: East, veering southeast, 4 or 5, occasionally 6 at first.
Rough, becoming slight or moderate. Showers, rain at first. Moderate or good,
occasionally poor at first.