Re: [dns-privacy] New draft on encrypting the stub-to-resolver link: draft-hoffman-dns-tls-stub-00.txt

Jacob Appelbaum <jacob@appelbaum.net> Wed, 20 August 2014 13:30 UTC

Return-Path: <jacob@appelbaum.net>
X-Original-To: dns-privacy@ietfa.amsl.com
Delivered-To: dns-privacy@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 964651A038B for <dns-privacy@ietfa.amsl.com>; Wed, 20 Aug 2014 06:30:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.722
X-Spam-Level:
X-Spam-Status: No, score=0.722 tagged_above=-999 required=5 tests=[BAYES_50=0.8, FM_FORGED_GMAIL=0.622, 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 ChVY2OirfC97 for <dns-privacy@ietfa.amsl.com>; Wed, 20 Aug 2014 06:30:05 -0700 (PDT)
Received: from mail-qa0-f50.google.com (mail-qa0-f50.google.com [209.85.216.50]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 558ED1A038A for <dns-privacy@ietf.org>; Wed, 20 Aug 2014 06:30:05 -0700 (PDT)
Received: by mail-qa0-f50.google.com with SMTP id s7so6792911qap.23 for <dns-privacy@ietf.org>; Wed, 20 Aug 2014 06:30:04 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=eOUPxe1jLkc4BJXUtWIAktRRnEQZbd72wwDYHM1B1yA=; b=HXmUCjgKKe0D7p3BzS77qpE41JGJhrqkA3a4K+m9vSybIwrPGBLAExvTuWc2EaimO5 a5qA2QincLbSM3l7ma1dFhyJBLtHlzb+rd6dOEQT5dQ7RnRmg+wmn3C1R+aiPK2GrU/A XYY4AKxzWpY8sMG3FdkY8xSnC4yhBrwPJFgNgnmty90O4yIYdWhf3FIj09ozH1OeN6Lp fVm3fDjxbFv/tT1JA1ekLWjKqdFpX8oAELgyMwmGIRU/uOxX6k/eIgvIPTOkFoaLWQN2 fEm0dd7lt9rOyWWwgrXK8ADZkNzP6uvu69ETqGwIJEpn/4OLv0fHzzHjAa7zb5hZiNQh QWgw==
X-Gm-Message-State: ALoCoQlaoIgwGW7iUs4mZ2cL3uIhTL1hsHZF2N0KyJ9It5Msn6IsRL+SxUlm26qpNChZ1I/Qr4CM
MIME-Version: 1.0
X-Received: by 10.140.24.140 with SMTP id 12mr72978747qgr.11.1408541403864; Wed, 20 Aug 2014 06:30:03 -0700 (PDT)
Received: by 10.140.91.50 with HTTP; Wed, 20 Aug 2014 06:30:03 -0700 (PDT)
X-Originating-IP: [46.165.221.166]
In-Reply-To: <EFBD7F1F-EB4B-4EC4-BE08-C7C92EC471FF@vpnc.org>
References: <20140818175701.12317.96810.idtracker@ietfa.amsl.com> <FF99C324-2959-48EB-A187-18007F7AA364@vpnc.org> <CAJE_bqeoUx2gFsnVgZYfoWASkHaMgKW4tR552YRmQ4ZNzH1M=g@mail.gmail.com> <361D96E3-CD31-4E2B-88E3-46E44D6F8C3D@vpnc.org> <alpine.LFD.2.10.1408191650420.22835@bofh.nohats.ca> <EFBD7F1F-EB4B-4EC4-BE08-C7C92EC471FF@vpnc.org>
Date: Wed, 20 Aug 2014 13:30:03 +0000
Message-ID: <CAFggDF2tdiUzGmEi9u68mubR6F+Lp7U4dy0N6R7PQVAQ_nNw=g@mail.gmail.com>
From: Jacob Appelbaum <jacob@appelbaum.net>
To: Paul Hoffman <paul.hoffman@vpnc.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: http://mailarchive.ietf.org/arch/msg/dns-privacy/uvW90Ix6hlJAsMnU0Xf8rCiad58
Cc: dns-privacy@ietf.org
Subject: Re: [dns-privacy] New draft on encrypting the stub-to-resolver link: draft-hoffman-dns-tls-stub-00.txt
X-BeenThere: dns-privacy@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <dns-privacy.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dns-privacy>, <mailto:dns-privacy-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/dns-privacy/>
List-Post: <mailto:dns-privacy@ietf.org>
List-Help: <mailto:dns-privacy-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dns-privacy>, <mailto:dns-privacy-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Aug 2014 13:30:12 -0000

On 8/19/14, Paul Hoffman <paul.hoffman@vpnc.org> wrote:
> [[ Combined PaulW's and Jacob's responses ]]
>
> On Aug 19, 2014, at 2:01 PM, Paul Wouters <paul@nohats.ca> wrote:
>
>> On Tue, 19 Aug 2014, Paul Hoffman wrote:
>>
>>>> I wonder this 'MUST' may be too strong (or I don't fully understand
>>>> the sense of this MUST).  Since the upstream recursive resolver may or
>>>> may not support the TLS extension, the DNS forwarder may end up giving
>>>> up the resolution altogether.  But depending on the stub clients'
>>>> policy it may be still better to provide encryption between the stub
>>>> and the forwarder.
>>>
>>> Good catch. Proposed replacement to handle the case where the recursive
>>> resolver doesn't do TLS:
>>>
>>> A stub resolver cannot tell whether it is sending queries to a
>>> recursive resolver or to a DNS forwarder.  Therefore, a DNS forwarder
>>> that acts as a TLS server for DNS requests MUST also attempt to act as a
>>> TLS
>>> client for queries to its upstream recursive resolvers, but MAY
>>> use the normal DNS protocol on port 53 if an upstream recursive
>>> resolver does set up a TLS session.
>>
>> A resolver at a coffee shop is mostly concerned about protecting the DNS
>> in the public wifi, and might not worry at all about its DSL uplink,
>> especially when it has no real reason to trust its own uplink. So I
>> would just make it very generic:
>>
>>  a DNS forwarder that acts as a TLS server for DNS requests SHOULD
>>  attempt to use TLS with its upstream resolver(s) to maximize the
>>  anonymity of its stub clients.
>
> I'm fine with that as a replacement for my suggestion above.

I'd switch this to say 'confidentiality' rather than anonymity.
Anonymity is a much stronger claim which I adore but it seems out of
place here.

>
>>
>>> Sure, let's be explicit. Proposed addition to the policy section:
>>>
>>> If a recursive resolver does not respond on port 443 or set up a TLS
>>> session, the stub resolver MAY use the normal DNS protocol on port 53.
>>
>> MAY sounds a little odd here. If there is no preconfiguration for
>> authenticating this resolver, I don't think we should advise
>> stubs to refuse to do DNS completely, which is what the MAY is
>> suggesting as a valid option. (this is breaking the "opportunistic
>> security design pattern recommendation advise" :)
>>
>> How about:
>>
>> 	If a recursive resolver for which an authentication method is
>> 	available does not respond on port 443 or fails to set up a TLS
>> 	session, the stub resolver SHOULD NOT use that resolver over
>> 	unencrypted DNS using port 53. If no authentication method is
>> 	available for the recusive resolver, the stub resolver SHOULD
>> 	fallback to using cleartext DNS on port 53.
>
> That seems mixed up. I think the policies we want to list are:
>
> a) Must have authenticated TLS, otherwise don't get any DNS responses
>
> b) Try to do authenticated TLS, but use unauthenticated TLS if possible,
> otherwise don't get any DNS responses
>
> c) Try to do authenticated TLS, but use unauthenticated TLS if possible, but
> allow cleartext on port 53 if TLS cannot be established
>
> Does this seem like the whole list?

d) Don't do TLS at all, only try cleartext on port 53 (the sad default
state of the internet today)

e) All the other DNS privacy stuff - eg: OpenDNS's encrypted DNS
stuff, djb's other work, etc.


>
> On Aug 19, 2014, at 1:02 PM, Jacob Appelbaum <jacob@appelbaum.net> wrote:
>
>>>> I'm not a fan of making it possible for an attacker to downgrade with
>>>> a single (non-cryptographically protected) TCP RST packet. If I
>>>> configure a resolver and declare it to be secure (and use it as such),
>>>> why not fail closed?
>>>
>>> Because then hosts that use stub resolvers will not be able to use the
>>> DNS
>>> at all.
>>
>> That is correct and that is exactly what I expect when my network is
>> attacking me. Rather than leaking that I'm being visited an ad name
>> that implies I've visited a gay dating site, I want it to fail closed.
>> If I declare it as secure, I want it to remain secure - where the
>> security here is all about *confidentiality* and DNSSEC does the rest
>> with regard to integrity, etc.
>
> I think that would policy (a) listed above. Does that work for you?

Yes. It is perfectly fine. If it was the default policy when
configuring a TLS aware resolver unless configured to be *less secure*
explicitly, certainly so.

>
>>>> Why not detect that as an attack or as outright
>>>> network censorship?
>>>
>>> We could add such detection, but only if the value outweighs the
>>> complexity
>>> and possible failure modes.
>>
>> If the TLS connection fails to complete (authenicated or not), it
>> should be as simple as returning something like E_CENSORSHIP_DETECTED.
>
> It is reasonable for the policy to suggest that a later API might be able to
> detect which level of protection, if any, the user has gotten.

I like the idea of a notice but I prefer the idea of explicitly
ensuring that one has configured a privacy DNS resolver - thus - it
seems the API needs to consider this from the start.

>
>> An error like "Unable to connect securely to resolver, please contact
>> your ISP" would be fine.
>
> And you might want to only use applications that use that later API.
>
>> Most OSes don't do anything remotely helpful when DNS fails. It might
>> be nice if that failure mode was privacy preserving...
>
> It might be, yes.
>
>>>> This seems to fail if there is an active attacker that blocks TLS
>>>> traffic - is there a way for the resolver to somehow learn in-band on
>>>> port 53 that this attack is happening?
>>>
>>> Probably, but you still haven't said what value there is in knowing that.
>>> A
>>> stub resolver has no log and no way of alerting anyone that it
>>> discovered
>>> something important.
>>
>> If my resolver allows upgrading to a secure method of communication,
>> I'd like to know. Furthermore, I'd like to automatically upgrade to
>> that secure communications path if it was available. An OS could probe
>> for a specific record type - similar to say, version.txt.
>>
>> e.g.: nslookup -q=txt -class=CHAOS query.privacy.bind.
>>
>> It could even learn the likely fingerprint of the server ala DANE, for
>> example.
>
> Once we have privacy for all types of stub resolvers, it could certainly be
> useful for a few people who have security-aware validating stub resolvers to
> have that information. It is an easy follow-on for those who care about it.
>

I think a key thing is that we need a way to discover that an already
configured stub resolver supports this kind of confidentiality. When
the stub software updates, the resolver that is already configured
could be upgraded to use the privacy preserving path, for example.

All the best,
Jacob