draft-ietf-dprive-dnsodtls-07.txt   draft-ietf-dprive-dnsodtls-08.txt 
DPRIVE T. Reddy DPRIVE T. Reddy
Internet-Draft D. Wing Internet-Draft D. Wing
Intended status: Standards Track P. Patil Intended status: Standards Track P. Patil
Expires: January 7, 2017 Cisco Expires: January 29, 2017 Cisco
July 6, 2016 July 28, 2016
DNS over DTLS (DNSoD) DNS over DTLS (DNSoD)
draft-ietf-dprive-dnsodtls-07 draft-ietf-dprive-dnsodtls-08
Abstract Abstract
DNS queries and responses are visible to network elements on the path DNS queries and responses are visible to network elements on the path
between the DNS client and its server. These queries and responses between the DNS client and its server. These queries and responses
can contain privacy-sensitive information which is valuable to can contain privacy-sensitive information which is valuable to
protect. An active attacker can send bogus responses causing protect. An active attacker can send bogus responses causing
misdirection of the subsequent connection. misdirection of the subsequent connection.
To counter passive listening and active attacks, this document To counter passive listening and active attacks, this document
skipping to change at page 1, line 42 skipping to change at page 1, line 42
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on January 7, 2017. This Internet-Draft will expire on January 29, 2017.
Copyright Notice Copyright Notice
Copyright (c) 2016 IETF Trust and the persons identified as the Copyright (c) 2016 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 21 skipping to change at page 2, line 21
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Relationship to TCP Queries and to DNSSEC . . . . . . . . 3 1.1. Relationship to TCP Queries and to DNSSEC . . . . . . . . 3
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3
3. Establishing and Managing DNS-over-DTLS Sessions . . . . . . 3 3. Establishing and Managing DNS-over-DTLS Sessions . . . . . . 3
3.1. Session Initiation . . . . . . . . . . . . . . . . . . . 3 3.1. Session Initiation . . . . . . . . . . . . . . . . . . . 4
3.2. DTLS Handshake and Authentication . . . . . . . . . . . . 4 3.2. DTLS Handshake and Authentication . . . . . . . . . . . . 4
3.3. Established Sessions . . . . . . . . . . . . . . . . . . 4 3.3. Established Sessions . . . . . . . . . . . . . . . . . . 4
4. Performance Considerations . . . . . . . . . . . . . . . . . 5 4. Performance Considerations . . . . . . . . . . . . . . . . . 6
5. Anycast . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 5. Anycast . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
6. Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 6. Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8
8. Security Considerations . . . . . . . . . . . . . . . . . . . 8 8. Security Considerations . . . . . . . . . . . . . . . . . . . 8
9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8
10. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 9
10.1. Normative References . . . . . . . . . . . . . . . . . . 8 10.1. Normative References . . . . . . . . . . . . . . . . . . 9
10.2. Informative References . . . . . . . . . . . . . . . . . 10 10.2. Informative References . . . . . . . . . . . . . . . . . 10
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 11 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 11
1. Introduction 1. Introduction
The Domain Name System is specified in [RFC1034] and [RFC1035] . DNS The Domain Name System is specified in [RFC1034] and [RFC1035] . DNS
queries and responses are normally exchanged unencrypted and are thus queries and responses are normally exchanged unencrypted and are thus
vulnerable to eavesdropping. Such eavesdropping can result in an vulnerable to eavesdropping. Such eavesdropping can result in an
undesired entity learning domains that a host wishes to access, thus undesired entity learning domains that a host wishes to access, thus
resulting in privacy leakage. DNS privacy problem is further resulting in privacy leakage. DNS privacy problem is further
skipping to change at page 3, line 5 skipping to change at page 3, line 4
Active attackers have long been successful at injecting bogus Active attackers have long been successful at injecting bogus
responses, causing cache poisoning and causing misdirection of the responses, causing cache poisoning and causing misdirection of the
subsequent connection (if attacking A or AAAA records). A popular subsequent connection (if attacking A or AAAA records). A popular
mitigation against that attack is to use ephemeral and random source mitigation against that attack is to use ephemeral and random source
ports for DNS queries [RFC5452] . ports for DNS queries [RFC5452] .
This document defines DNS over DTLS (DNSoD, pronounced "dee-enn-sod") This document defines DNS over DTLS (DNSoD, pronounced "dee-enn-sod")
which provides confidential DNS communication between stub resolvers which provides confidential DNS communication between stub resolvers
and recursive resolvers, stub resolvers and forwarders, forwarders and recursive resolvers, stub resolvers and forwarders, forwarders
and recursive resolvers. and recursive resolvers. DNSoD puts an additional computational load
on servers. The largest gain for privacy is to protect the
communication between the DNS client (the end user's machine) and its
caching resolver. DNSoD might work equally between recursive clients
and authoritative servers, but this application of the protocol is
out of scope for the DNS PRIVate Exchange (DPRIVE) Working Group per
its current charter. This document does not change the format of DNS
messages.
The motivations for proposing DNSoD are that The motivations for proposing DNSoD are that
o TCP suffers from network head-of-line blocking, where the loss of o TCP suffers from network head-of-line blocking, where the loss of
a packet causes all other TCP segments to not be delivered to the a packet causes all other TCP segments to not be delivered to the
application until the lost packet is re-transmitted. DNSoD, application until the lost packet is re-transmitted. DNSoD,
because it uses UDP, does not suffer from network head-of-line because it uses UDP, does not suffer from network head-of-line
blocking. blocking.
o DTLS session resumption consumes 1 round trip whereas TLS session o DTLS session resumption consumes 1 round trip whereas TLS session
skipping to change at page 4, line 26 skipping to change at page 4, line 35
server via UDP on the well-known port for DNS over DTLS, it proceeds server via UDP on the well-known port for DNS over DTLS, it proceeds
with DTLS handshake as described in [RFC6347], following the best with DTLS handshake as described in [RFC6347], following the best
practices specified in [RFC7525]. practices specified in [RFC7525].
DNS privacy requires encrypting the query (and response) from passive DNS privacy requires encrypting the query (and response) from passive
attacks. Such encryption typically provides integrity protection as attacks. Such encryption typically provides integrity protection as
a side-effect, which means on-path attackers cannot simply inject a side-effect, which means on-path attackers cannot simply inject
bogus DNS responses. However, to provide stronger protection from bogus DNS responses. However, to provide stronger protection from
active attackers pretending to be the server, the server itself needs active attackers pretending to be the server, the server itself needs
to be authenticated. To authenticate the server providing DNS to be authenticated. To authenticate the server providing DNS
privacy, DNS client can use the authenication mechanisms discussed in privacy, DNS client MUST use the authenication mechanisms discussed
[I-D.ietf-dprive-dtls-and-tls-profiles]. This document does not in [I-D.ietf-dprive-dtls-and-tls-profiles]. This document does not
propose new ideas for authentication. propose new ideas for authentication.
After DTLS negotiation completes, the connection will be encrypted After DTLS negotiation completes, the connection will be encrypted
and is now protected from eavesdropping. and is now protected from eavesdropping.
3.3. Established Sessions 3.3. Established Sessions
In DTLS, all data is protected using the same record encoding and In DTLS, all data is protected using the same record encoding and
mechanisms. When the mechanism described in this document is in mechanisms. When the mechanism described in this document is in
effect, DNS messages are encrypted using the standard DTLS record effect, DNS messages are encrypted using the standard DTLS record
encoding. When a user of DTLS wishes to send an DNS message, it encoding. When a user of DTLS wishes to send an DNS message, it
delivers it to the DTLS implementation as an ordinary application delivers it to the DTLS implementation as an ordinary application
data write (e.g., SSL_write()). To reduce client and server data write (e.g., SSL_write()). To reduce client and server
workload, clients SHOULD re-use the DTLS session. A single DTLS workload, clients SHOULD re-use the DTLS session. A single DTLS
session can be used to send multiple DNS requests and receive session can be used to send multiple DNS requests and receive
multiple DNS responses. multiple DNS responses.
DNSoD client and server can use DTLS heartbeat [RFC6520] to verify DNSoD client and server MUST use DTLS heartbeat [RFC6520] to verify
that the peer still has DTLS state. DTLS session is terminated by that the peer still has DTLS state. DTLS session is terminated by
the receipt of an authenticated message that closes the connection the receipt of an authenticated message that closes the connection
(e.g., a DTLS fatal alert). (e.g., a DTLS fatal alert).
Client Server Client Server
------ ------ ------ ------
ClientHello --------> ClientHello -------->
<------- HelloVerifyRequest <------- HelloVerifyRequest
skipping to change at page 5, line 43 skipping to change at page 6, line 10
<--------- DNS Response <--------- DNS Response
Message Flow for Full Handshake Issuing New Session Ticket Message Flow for Full Handshake Issuing New Session Ticket
4. Performance Considerations 4. Performance Considerations
To reduce number of octets of the DTLS handshake, especially the size To reduce number of octets of the DTLS handshake, especially the size
of the certificate in the ServerHello (which can be several of the certificate in the ServerHello (which can be several
kilobytes), DNS client and server can use raw public keys [RFC7250] kilobytes), DNS client and server can use raw public keys [RFC7250]
or Cached Information Extension [I-D.ietf-tls-cached-info] . Cached or Cached Information Extension [I-D.ietf-tls-cached-info] . Cached
Information Extension avoids transmitting the server's certificate Information Extension avoids transmitting the server's certificate
and certificate chain if the client has cached that information from and certificate chain if the client has cached that information from
a previous TLS handshake. a previous TLS handshake.
Since pipelined responses can arrive out of order, clients MUST match Since pipelined responses can arrive out of order, clients MUST match
responses to outstanding queries on the same DTLS connection using responses to outstanding queries on the same DTLS connection using
the Message ID. If the response contains a question section, the the Message ID. If the response contains a question section, the
client MUST match the QNAME, QCLASS, and QTYPE fields. Failure by client MUST match the QNAME, QCLASS, and QTYPE fields. Failure by
clients to properly match responses to outstanding queries can have clients to properly match responses to outstanding queries can have
serious consequences for interoperability ( [RFC7766] , Section 7). serious consequences for interoperability ( [RFC7766] , Section 7).
It is highly advantageous to avoid server-side DTLS state and reduce It is highly advantageous to avoid server-side DTLS state and reduce
the number of new DTLS sessions on the server which can be done with the number of new DTLS sessions on the server which can be done with
[RFC5077] . This also eliminates a round-trip for subsequent DNSoD TLS Session Resumption without server state [RFC5077] . This also
queries, because with [RFC5077] the DTLS session does not need to be eliminates a round-trip for subsequent DNSoD queries, because with
re-established. [RFC5077] the DTLS session does not need to be re-established.
Compared to normal DNS, DTLS adds at least 13 octets of header, plus Compared to normal DNS, DTLS adds at least 13 octets of header, plus
cipher and authentication overhead to every query and every response. cipher and authentication overhead to every query and every response.
This reduces the size of the DNS payload that can be carried. DNS This reduces the size of the DNS payload that can be carried. DNS
client and server MUST support the EDNS0 option defined in [RFC6891] client and server MUST support the EDNS0 option defined in [RFC6891]
so that the DNS client can indicate to the DNS server the maximum DNS so that the DNS client can indicate to the DNS server the maximum DNS
response size it can reassemble and deliver in the DNS client's response size it can reassemble and deliver in the DNS client's
network stack. The client sets its EDNS0 value as if DTLS is not network stack. The client sets its EDNS0 value as if DTLS is not
being used. The DNS server must ensure that the DNS response size being used. The DNS server must ensure that the DNS response size
does not exceed the Path MTU. The DNS server must consider the does not exceed the Path MTU i.e. each DTLS record MUST fit within a
amount of record expansion expected by the DTLS processing when single datagram, as required by [RFC6347]. The DNS server must
calculating the size of DNS response that fits within the path MTU. consider the amount of record expansion expected by the DTLS
Path MTU MUST be greater than equal to [DNS response size + DTLS processing when calculating the size of DNS response that fits within
overhead of 13 octets + padding size ([RFC7830]) + authentication the path MTU. Path MTU MUST be greater than equal to [DNS response
overhead of the negotiated DTLS cipher suite + block padding size + DTLS overhead of 13 octets + padding size ([RFC7830]) +
(Section 4.1.1.1 of [RFC6347]]. If the DNS server's response were to authentication overhead of the negotiated DTLS cipher suite + block
exceed that calculated value, the server sends a response that does padding (Section 4.1.1.1 of [RFC6347]]. If the DNS server's response
fit within that value and sets the TC (truncated) bit. The client, were to exceed that calculated value, the server sends a response
upon receiving a response with the TC bit set and wanting to receive that does fit within that value and sets the TC (truncated) bit. The
the entire response, establishes a DNS-over-TLS [RFC7858] connection client, upon receiving a response with the TC bit set and wanting to
to the same server, and sends a new DNS request for the same resource receive the entire response, establishes a DNS-over-TLS [RFC7858]
record. connection to the same server, and sends a new DNS request for the
same resource record.
DNSoD puts an additional computational load on servers. The largest
gain for privacy is to protect the communication between the DNS
client (the end user's machine) and its caching resolver.
5. Anycast 5. Anycast
DNS servers are often configured with anycast addresses. While the DNS servers are often configured with anycast addresses. While the
network is stable, packets transmitted from a particular source to an network is stable, packets transmitted from a particular source to an
anycast address will reach the same server that has the cryptographic anycast address will reach the same server that has the cryptographic
context from the DNS over DTLS handshake. But when the network context from the DNS over DTLS handshake. But when the network
configuration changes, a DNS over DTLS packet can be received by a configuration changes, a DNS over DTLS packet can be received by a
server that does not have the necessary cryptographic context. To server that does not have the necessary cryptographic context. To
encourage the client to initiate a new DTLS handshake, DNS servers encourage the client to initiate a new DTLS handshake, DNS servers
skipping to change at page 7, line 20 skipping to change at page 7, line 31
receipt of an in-window DTLS Alert, the client SHOULD continue re- receipt of an in-window DTLS Alert, the client SHOULD continue re-
transmitting the DTLS packet (in the event the Alert was spoofed), transmitting the DTLS packet (in the event the Alert was spoofed),
and at the same time it SHOULD initiate DTLS session resumption. and at the same time it SHOULD initiate DTLS session resumption.
When the DTLS client receives authenticated DNS response from one of When the DTLS client receives authenticated DNS response from one of
those DTLS sessions, the other DTLS session should be terminated. those DTLS sessions, the other DTLS session should be terminated.
6. Usage 6. Usage
Using DNS privacy with an authenticated server is most preferred, DNS Using DNS privacy with an authenticated server is most preferred, DNS
privacy with an unauthenticated server is next preferred, and plain privacy with an unauthenticated server is next preferred, and plain
DNS is least preferred. This section gives a non-normative text DNS is least preferred. This section gives a non-normative
discussion on common behaviors and choices. discussion on common behaviors and choices.
An implementation MAY attempt to obtain DNS privacy by contacting DNS An implementation MAY attempt to obtain DNS privacy by contacting DNS
servers on the local network (provided by DHCP) and on the Internet, servers on the local network (provided by DHCP) and on the Internet,
and make those attempts in parallel to reduce user impact. If DNS and make those attempts in parallel to reduce user impact. If DNS
privacy cannot be successfully negotiated for whatever reason, the privacy cannot be successfully negotiated for whatever reason, the
client can do three things, in order from best to worst for privacy: client can do three things, in order from best to worst for privacy:
1. refuse to send DNS queries on this network, which means the 1. refuse to send DNS queries on this network, which means the
client cannot make effective use of this network, as modern client cannot make effective use of this network, as modern
networks require DNS; or, applications typically require DNS; or,
2. use opportunistic security, as described in [RFC7435] or, 2. use opportunistic security, as described in [RFC7435] or,
3. send plain DNS queries on this network, which means no DNS 3. send plain DNS queries on this network, which means no DNS
privacy is provided. privacy is provided.
Heuristics can improve this situation, but only to a degree (e.g., Heuristics can improve this situation, but only to a degree (e.g.,
previous success of DNS privacy on this network may be reason to previous success of DNS privacy on this network may be reason to
alert the user about failure to establish DNS privacy on this network alert the user about failure to establish DNS privacy on this network
now). Still, the client (in cooperation with the end user) has to now). Still, the client (in cooperation with the end user) has to
skipping to change at page 8, line 9 skipping to change at page 8, line 16
7. IANA Considerations 7. IANA Considerations
This specification uses port 853 already allocated in the IANA port This specification uses port 853 already allocated in the IANA port
number registry as defined in Section 6 of [RFC7858]. number registry as defined in Section 6 of [RFC7858].
8. Security Considerations 8. Security Considerations
The interaction between a DNS client and DNS server requires Datagram The interaction between a DNS client and DNS server requires Datagram
Transport Layer Security (DTLS) with a ciphersuite offering Transport Layer Security (DTLS) with a ciphersuite offering
confidentiality protection and guidance given in [RFC7525] must be confidentiality protection. The guidance given in [RFC7525] must be
followed to avoid attacks on DTLS. DNS clients keeping track of followed to avoid attacks on DTLS. DNS clients keeping track of
servers known to support DTLS enables clients to detect downgrade servers known to support DTLS enables clients to detect downgrade
attacks. To interfere with DNS over DTLS, an on- or off-path attacks. To interfere with DNS over DTLS, an on- or off-path
attacker might send an ICMP message towards the DTLS client or DTLS attacker might send an ICMP message towards the DTLS client or DTLS
server. As these ICMP messages cannot be authenticated, all ICMP server. As these ICMP messages cannot be authenticated, all ICMP
errors should be treated as soft errors [RFC1122] . For servers with errors should be treated as soft errors [RFC1122] . For servers with
no connection history and no apparent support for DTLS, depending on no connection history and no apparent support for DTLS, depending on
their Privacy Profile and privacy requirements, clients may choose to their Privacy Profile and privacy requirements, clients may choose to
(a) try another server when available, (b) continue without DTLS, or (a) try another server when available, (b) continue without DTLS, or
(c) refuse to forward the query. Once a DNSoD client has established (c) refuse to forward the query. Once a DNSoD client has established
skipping to change at page 8, line 41 skipping to change at page 8, line 48
of such an attack. Such mitigation might involve rate limiting of such an attack. Such mitigation might involve rate limiting
handshakes from a certain subnet or more advanced DoS/DDoS techniques handshakes from a certain subnet or more advanced DoS/DDoS techniques
beyond the scope of this paper. beyond the scope of this paper.
9. Acknowledgements 9. Acknowledgements
Thanks to Phil Hedrick for his review comments on TCP and to Josh Thanks to Phil Hedrick for his review comments on TCP and to Josh
Littlefield for pointing out DNSoD load on busy servers (most notably Littlefield for pointing out DNSoD load on busy servers (most notably
root servers). The authors would like to thank Simon Josefsson, root servers). The authors would like to thank Simon Josefsson,
Daniel Kahn Gillmor, Bob Harold, Ilari Liusvaara, Sara Dickinson, Daniel Kahn Gillmor, Bob Harold, Ilari Liusvaara, Sara Dickinson,
Christian Huitema, Stephane Bortzmeyer and Geoff Huston for Christian Huitema, Stephane Bortzmeyer, Alexander Mayrhofer and Geoff
discussions and comments on the design of DNSoD. Huston for discussions and comments on the design of DNSoD.
10. References 10. References
10.1. Normative References 10.1. Normative References
[RFC1034] Mockapetris, P., "Domain names - concepts and facilities", [RFC1034] Mockapetris, P., "Domain names - concepts and facilities",
STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987, STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987,
<http://www.rfc-editor.org/info/rfc1034>. <http://www.rfc-editor.org/info/rfc1034>.
[RFC1035] Mockapetris, P., "Domain names - implementation and [RFC1035] Mockapetris, P., "Domain names - implementation and
skipping to change at page 10, line 10 skipping to change at page 10, line 20
[RFC7830] Mayrhofer, A., "The EDNS(0) Padding Option", RFC 7830, [RFC7830] Mayrhofer, A., "The EDNS(0) Padding Option", RFC 7830,
DOI 10.17487/RFC7830, May 2016, DOI 10.17487/RFC7830, May 2016,
<http://www.rfc-editor.org/info/rfc7830>. <http://www.rfc-editor.org/info/rfc7830>.
10.2. Informative References 10.2. Informative References
[I-D.ietf-dprive-dtls-and-tls-profiles] [I-D.ietf-dprive-dtls-and-tls-profiles]
Dickinson, S., Gillmor, D., and T. Reddy, "Authentication Dickinson, S., Gillmor, D., and T. Reddy, "Authentication
and (D)TLS Profile for DNS-over-(D)TLS", draft-ietf- and (D)TLS Profile for DNS-over-(D)TLS", draft-ietf-
dprive-dtls-and-tls-profiles-02 (work in progress), June dprive-dtls-and-tls-profiles-03 (work in progress), July
2016. 2016.
[I-D.ietf-tls-cached-info] [I-D.ietf-tls-cached-info]
Santesson, S. and H. Tschofenig, "Transport Layer Security Santesson, S. and H. Tschofenig, "Transport Layer Security
(TLS) Cached Information Extension", draft-ietf-tls- (TLS) Cached Information Extension", draft-ietf-tls-
cached-info-23 (work in progress), May 2016. cached-info-23 (work in progress), May 2016.
[RFC1122] Braden, R., Ed., "Requirements for Internet Hosts - [RFC1122] Braden, R., Ed., "Requirements for Internet Hosts -
Communication Layers", STD 3, RFC 1122, Communication Layers", STD 3, RFC 1122,
DOI 10.17487/RFC1122, October 1989, DOI 10.17487/RFC1122, October 1989,
 End of changes. 18 change blocks. 
41 lines changed or deleted 45 lines changed or added

This html diff was produced by rfcdiff 1.45. The latest version is available from http://tools.ietf.org/tools/rfcdiff/