idnits 2.17.1 draft-ietf-dprive-dnsodtls-04.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (January 21, 2016) is 3019 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'ChangeCipherSpec' is mentioned on line 238, but not defined ** Obsolete normative reference: RFC 5077 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 6347 (Obsoleted by RFC 9147) ** Obsolete normative reference: RFC 7525 (Obsoleted by RFC 9325) == Outdated reference: A later version (-09) exists of draft-ietf-dprive-dns-over-tls-04 == Outdated reference: A later version (-23) exists of draft-ietf-tls-cached-info-21 -- Obsolete informational reference (is this intentional?): RFC 7626 (Obsoleted by RFC 9076) Summary: 3 errors (**), 0 flaws (~~), 4 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 DPRIVE T. Reddy 3 Internet-Draft D. Wing 4 Intended status: Standards Track P. Patil 5 Expires: July 24, 2016 Cisco 6 January 21, 2016 8 DNS over DTLS (DNSoD) 9 draft-ietf-dprive-dnsodtls-04 11 Abstract 13 DNS queries and responses are visible to network elements on the path 14 between the DNS client and its server. These queries and responses 15 can contain privacy-sensitive information which is valuable to 16 protect. An active attacker can send bogus responses causing 17 misdirection of the subsequent connection. 19 To counter passive listening and active attacks, this document 20 proposes the use of Datagram Transport Layer Security (DTLS) for DNS, 21 to protect against passive listeners and certain active attacks. As 22 DNS needs to remain fast, this proposal also discusses mechanisms to 23 reduce DTLS round trips and reduce DTLS handshake size. The proposed 24 mechanism runs over port 853. 26 Status of This Memo 28 This Internet-Draft is submitted in full conformance with the 29 provisions of BCP 78 and BCP 79. 31 Internet-Drafts are working documents of the Internet Engineering 32 Task Force (IETF). Note that other groups may also distribute 33 working documents as Internet-Drafts. The list of current Internet- 34 Drafts is at http://datatracker.ietf.org/drafts/current/. 36 Internet-Drafts are draft documents valid for a maximum of six months 37 and may be updated, replaced, or obsoleted by other documents at any 38 time. It is inappropriate to use Internet-Drafts as reference 39 material or to cite them other than as "work in progress." 41 This Internet-Draft will expire on July 24, 2016. 43 Copyright Notice 45 Copyright (c) 2016 IETF Trust and the persons identified as the 46 document authors. All rights reserved. 48 This document is subject to BCP 78 and the IETF Trust's Legal 49 Provisions Relating to IETF Documents 50 (http://trustee.ietf.org/license-info) in effect on the date of 51 publication of this document. Please review these documents 52 carefully, as they describe your rights and restrictions with respect 53 to this document. Code Components extracted from this document must 54 include Simplified BSD License text as described in Section 4.e of 55 the Trust Legal Provisions and are provided without warranty as 56 described in the Simplified BSD License. 58 Table of Contents 60 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 61 1.1. Relationship to TCP Queries and to DNSSEC . . . . . . . . 3 62 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 63 3. DTLS session initiation, Polling and Discovery . . . . . . . 3 64 4. Performance Considerations . . . . . . . . . . . . . . . . . 4 65 5. Established sessions . . . . . . . . . . . . . . . . . . . . 5 66 6. Anycast . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 67 7. Downgrade attacks . . . . . . . . . . . . . . . . . . . . . . 7 68 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 69 9. Security Considerations . . . . . . . . . . . . . . . . . . . 8 70 9.1. Authenticating a DNS Privacy Server . . . . . . . . . . . 8 71 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8 72 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 73 11.1. Normative References . . . . . . . . . . . . . . . . . . 9 74 11.2. Informative References . . . . . . . . . . . . . . . . . 10 75 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 11 77 1. Introduction 79 The Domain Name System is specified in [RFC1034] and [RFC1035]. DNS 80 queries and responses are normally exchanged unencrypted and are thus 81 vulnerable to eavesdropping. Such eavesdropping can result in an 82 undesired entity learning domains that a host wishes to access, thus 83 resulting in privacy leakage. DNS privacy problem is further 84 discussed in [RFC7626]. 86 Active attackers have long been successful at injecting bogus 87 responses, causing cache poisoning and causing misdirection of the 88 subsequent connection (if attacking A or AAAA records). A popular 89 mitigation against that attack is to use ephemeral and random source 90 ports for DNS queries [RFC5452]. 92 This document defines DNS over DTLS (DNSoD, pronounced "dee-enn-sod") 93 which provides confidential DNS communication between stub resolvers 94 and recursive resolvers, stub resolvers and forwarders, forwarders 95 and recursive resolvers. 97 The motivations for proposing DNSoD are that 99 o TCP suffers from network head-of-line blocking, where the loss of 100 a packet causes all other TCP segments to not be delivered to the 101 application until the lost packet is re-transmitted. DNSoD, 102 because it uses UDP, does not suffer from network head-of-line 103 blocking. 105 o DTLS session resumption consumes 1 round trip whereas TLS session 106 resumption can start only after TCP handshake is complete. 107 Although TCP Fast Open [RFC7413] can reduce that handshake, TCP 108 Fast Open is not yet available in commercially-popular operating 109 systems. 111 1.1. Relationship to TCP Queries and to DNSSEC 113 DNS queries can be sent over UDP or TCP. The scope of this document, 114 however, is only UDP. DNS over TCP could be protected with TLS, as 115 described in [I-D.ietf-dprive-dns-over-tls]. 117 DNS Security Extensions (DNSSEC [RFC4033]) provides object integrity 118 of DNS resource records, allowing end-users (or their resolver) to 119 verify legitimacy of responses. However, DNSSEC does not protect 120 privacy of DNS requests or responses. DNSoD works in conjunction 121 with DNSSEC, but DNSoD does not replace the need or value of DNSSEC. 123 2. Terminology 125 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 126 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 127 "OPTIONAL" in this document are to be interpreted as described in 128 [RFC2119]. 130 3. DTLS session initiation, Polling and Discovery 132 DNSoD MUST run over standard UDP port 853 as defined in Section 8. A 133 DNS server that supports DNSoD MUST listen for and accept DTLS 134 packets on a designated port 853. 136 The host should determine if the DNS server supports DNSoD by sending 137 a DTLS ClientHello message. A DNS server that does not support DNSoD 138 will not respond to ClientHello messages sent by the client. The 139 client MUST use timer values defined in Section 4.2.4.1 of [RFC6347] 140 for retransmission of ClientHello message and if no response is 141 received from the DNS server. After 15 seconds, it MUST cease 142 attempts to re-transmit its ClientHello. If the DNS client receives 143 a hard ICMP error [RFC1122], it MUST immediately cease attempts to 144 re-transmit its ClientHello. Thereafter, the client MAY repeat that 145 procedure in the event the DNS server has been upgraded to support 146 DNSoD, but such probing SHOULD NOT be done more frequently than every 147 24 hours and MUST NOT be done more frequently than every 15 minutes. 148 This mechanism requires no additional signaling between the client 149 and server. 151 4. Performance Considerations 153 To reduce number of octets of the DTLS handshake, especially the size 154 of the certificate in the ServerHello (which can be several 155 kilobytes), DNS client and server can use raw public keys [RFC7250] 156 or Cached Information Extension [I-D.ietf-tls-cached-info]. Cached 157 Information Extension avoids transmitting the server's certificate 158 and certificate chain if the client has cached that information from 159 a previous TLS handshake. 161 Multiple DNS queries can be sent over a single DTLS session and the 162 DNSoD client need not wait for an outstanding reply before sending 163 the next query. The existing Query ID allows multiple requests and 164 responses to be interleaved in whatever order they can be fulfilled 165 by the DNS server. This means DNSoD reduces the consumption of UDP 166 port numbers, and because DTLS protects the communication between a 167 DNS client and its server, the resolver SHOULD NOT use random 168 ephemeral source ports (Section 9.2 of [RFC5452]) because such source 169 port use would incur additional, unnecessary DTLS load on the DNSoD 170 server. When sending multiple queries over a single DTLS session, 171 clients MUST take care to avoid Message ID collisions. In other 172 words, they MUST NOT re-use the DNS Message ID of an in-flight query. 174 It is highly advantageous to avoid server-side DTLS state and reduce 175 the number of new DTLS sessions on the server which can be done with 176 [RFC5077]. This also eliminates a round-trip for subsequent DNSoD 177 queries, because with [RFC5077] the DTLS session does not need to be 178 re-established. 180 Compared to normal DNS, DTLS adds at least 13 octets of header, plus 181 cipher and authentication overhead to every query and every response. 182 This reduces the size of the DNS payload that can be carried. DNS 183 client and server MUST support the EDNS0 option defined in [RFC6891] 184 so that the DNS client can indicate to the DNS server the maximum DNS 185 response size it can handle without IP fragmentation. If the DNS 186 server's response exceeds the EDNS0 value, the DNS server sets the TC 187 (truncated) bit. On receiving a response with the TC bit set, the 188 client establishes a DNS-over-TLS connection to the same server, and 189 sends a new DNS request for the same resource record 191 DNSoD puts an additional computational load on servers. The largest 192 gain for privacy is to protect the communication between the DNS 193 client (the end user's machine) and its caching resolver. 194 Implementing DNSoD on root servers is outside the scope of this 195 document. 197 5. Established sessions 199 In DTLS, all data is protected using the same record encoding and 200 mechanisms. When the mechanism described in this document is in 201 effect, DNS messages are encrypted using the standard DTLS record 202 encoding. When a user of DTLS wishes to send an DNS message, it 203 delivers it to the DTLS implementation as an ordinary application 204 data write (e.g., SSL_write()). To reduce client and server 205 workload, clients SHOULD re-use the DTLS session. A single DTLS 206 session can be used to send multiple DNS requests and receive 207 multiple DNS responses. 209 DNSoD client and server can use DTLS heartbeat [RFC6520] to verify 210 that the peer still has DTLS state. DTLS session is terminated by 211 the receipt of an authenticated message that closes the connection 212 (e.g., a DTLS fatal alert). 214 Client Server 215 ------ ------ 217 ClientHello --------> 219 <------- HelloVerifyRequest 220 (contains cookie) 222 ClientHello --------> 223 (contains cookie) 224 (empty SessionTicket extension) 225 ServerHello 226 (empty SessionTicket extension) 227 Certificate* 228 ServerKeyExchange* 229 CertificateRequest* 230 <-------- ServerHelloDone 232 Certificate* 233 ClientKeyExchange 234 CertificateVerify* 235 [ChangeCipherSpec] 236 Finished --------> 237 NewSessionTicket 238 [ChangeCipherSpec] 239 <-------- Finished 241 DNS Request ---------> 243 <--------- DNS Response 245 Message Flow for Full Handshake Issuing New Session Ticket 247 6. Anycast 249 DNS servers are often configured with anycast addresses. While the 250 network is stable, packets transmitted from a particular source to an 251 anycast address will reach the same server that has the cryptographic 252 context from the DNS over DTLS handshake. But when the network 253 configuration changes, a DNS over DTLS packet can be received by a 254 server that does not have the necessary cryptographic context. To 255 encourage the client to initiate a new DTLS handshake, DNS servers 256 SHOULD generate a DTLS Alert message in response to receiving a DTLS 257 packet for which the server does not have any cryptographic context. 258 Upon receipt of an un-authenicated DTLS alert, the DTLS client 259 validates the Alert is within the replay window, as usual 260 (Section 4.1.2.6 of [RFC6347]). It is difficult for the DTLS client 261 to validate the DTLS alert was generated by the DTLS server in 262 response to a request or was generated by an on- or off-path 263 attacker. Thus, upon receipt of an in-window DTLS Alert, the client 264 SHOULD continue re-transmitting the DTLS packet (in the event the 265 Alert was spoofed), and at the same time it SHOULD initiate DTLS 266 session resumption. 268 7. Downgrade attacks 270 Using DNS privacy with an authenticated server is most preferred, DNS 271 privacy with an unauthenticated server is next preferred, and plain 272 DNS is least preferred. This section gives a non-normative 273 discussion on common behaviors and choices. 275 An implementation MAY attempt to obtain DNS privacy by contacting DNS 276 servers on the local network (provided by DHCP) and on the Internet, 277 and make those attempts in parallel to reduce user impact. If DNS 278 privacy cannot be successfully negotiated for whatever reason, the 279 client can do three things: 281 1. refuse to send DNS queries on this network, which means the 282 client cannot make effective use of this network, as modern 283 networks require DNS; or, 285 2. use opportunistic security, as described in [RFC7435]. or, 287 3. send plain DNS queries on this network, which means no DNS 288 privacy is provided. 290 Heuristics can improve this situation, but only to a degree (e.g., 291 previous success of DNS privacy on this network may be reason to 292 alert the user about failure to establish DNS privacy on this network 293 now). Still, the client (in cooperation with the end user) has to 294 decide to use the network without the protection of DNS privacy. 296 8. IANA Considerations 298 IANA is requested to add the following value to the "Service Name and 299 Transport Protocol Port Number Registry" registry in the System 300 Range. The registry for that range requires IETF Review or IESG 301 Approval [RFC6335] and such a review has been requested using the 302 Early Allocation process [RFC7120] for the well-known UDP port in 303 this document. 305 Service Name domain-s 306 Transport Protocol(s) UDP/TCP 307 Port 853 308 Assignee IESG 309 Contact dwing@cisco.com 310 Description DNS query-response protocol runs over 311 DTLS and TLS 312 Reference This document 314 9. Security Considerations 316 The interaction between a DNS client and DNS server requires Datagram 317 Transport Layer Security (DTLS) with a ciphersuite offering 318 confidentiality protection and guidance given in [RFC7525] must be 319 followed to avoid attacks on DTLS. Once a DNSoD client has 320 established a security association with a particular DNS server, and 321 outstanding normal DNS queries with that server (if any) have been 322 received, the DNSoD client MUST ignore any subsequent normal DNS 323 responses from that server, as all subsequent responses should be 324 encrypted. This behavior mitigates all possible attacks described in 325 Measures for Making DNS More Resilient against Forged Answers 326 [RFC5452]. 328 A malicious client might attempt to perform a high number of DTLS 329 handshakes with a server. As the clients are not uniquely identified 330 by the protocol and can be obfuscated with IPv4 address sharing and 331 with IPv6 temporary addresses, a server needs to mitigate the impact 332 of such an attack. Such mitigation might involve rate limiting 333 handshakes from a certain subnet or more advanced DoS/DDoS techniques 334 beyond the scope of this paper. 336 9.1. Authenticating a DNS Privacy Server 338 DNS privacy requires encrypting the query (and response) from passive 339 attacks. Such encryption typically provides integrity protection as 340 a side-effect, which means on-path attackers cannot simply inject 341 bogus DNS responses. However, to provide stronger protection from 342 active attackers pretending to be the server, the server itself needs 343 to be authenticated. To authenticate the server providing DNS 344 privacy, DNS client can use the authenication mechanisms discussed in 345 [I-D.dgr-dprive-dtls-and-tls-profiles]. 347 10. Acknowledgements 349 Thanks to Phil Hedrick for his review comments on TCP and to Josh 350 Littlefield for pointing out DNSoD load on busy servers (most notably 351 root servers). The authors would like to thank Simon Josefsson, 352 Daniel Kahn Gillmor, Bob Harold, Ilari Liusvaara, Sara Dickinson and 353 Christian Huitema for discussions and comments on the design of 354 DNSoD. 356 11. References 358 11.1. Normative References 360 [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", 361 STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987, 362 . 364 [RFC1035] Mockapetris, P., "Domain names - implementation and 365 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 366 November 1987, . 368 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 369 Requirement Levels", BCP 14, RFC 2119, 370 DOI 10.17487/RFC2119, March 1997, 371 . 373 [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S. 374 Rose, "DNS Security Introduction and Requirements", 375 RFC 4033, DOI 10.17487/RFC4033, March 2005, 376 . 378 [RFC5077] Salowey, J., Zhou, H., Eronen, P., and H. Tschofenig, 379 "Transport Layer Security (TLS) Session Resumption without 380 Server-Side State", RFC 5077, DOI 10.17487/RFC5077, 381 January 2008, . 383 [RFC5452] Hubert, A. and R. van Mook, "Measures for Making DNS More 384 Resilient against Forged Answers", RFC 5452, 385 DOI 10.17487/RFC5452, January 2009, 386 . 388 [RFC6335] Cotton, M., Eggert, L., Touch, J., Westerlund, M., and S. 389 Cheshire, "Internet Assigned Numbers Authority (IANA) 390 Procedures for the Management of the Service Name and 391 Transport Protocol Port Number Registry", BCP 165, 392 RFC 6335, DOI 10.17487/RFC6335, August 2011, 393 . 395 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 396 Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, 397 January 2012, . 399 [RFC6520] Seggelmann, R., Tuexen, M., and M. Williams, "Transport 400 Layer Security (TLS) and Datagram Transport Layer Security 401 (DTLS) Heartbeat Extension", RFC 6520, 402 DOI 10.17487/RFC6520, February 2012, 403 . 405 [RFC6891] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms 406 for DNS (EDNS(0))", STD 75, RFC 6891, 407 DOI 10.17487/RFC6891, April 2013, 408 . 410 [RFC7120] Cotton, M., "Early IANA Allocation of Standards Track Code 411 Points", BCP 100, RFC 7120, DOI 10.17487/RFC7120, January 412 2014, . 414 [RFC7525] Sheffer, Y., Holz, R., and P. Saint-Andre, 415 "Recommendations for Secure Use of Transport Layer 416 Security (TLS) and Datagram Transport Layer Security 417 (DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, May 418 2015, . 420 11.2. Informative References 422 [I-D.dgr-dprive-dtls-and-tls-profiles] 423 Dickinson, S., Gillmor, D., and T. Reddy, "Authentication 424 and (D)TLS Profile for DNS-over-TLS and DNS-over-DTLS", 425 draft-dgr-dprive-dtls-and-tls-profiles-00 (work in 426 progress), December 2015. 428 [I-D.ietf-dprive-dns-over-tls] 429 Zi, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., 430 and P. Hoffman, "DNS over TLS: Initiation and Performance 431 Considerations", draft-ietf-dprive-dns-over-tls-04 (work 432 in progress), January 2016. 434 [I-D.ietf-tls-cached-info] 435 Santesson, S. and H. Tschofenig, "Transport Layer Security 436 (TLS) Cached Information Extension", draft-ietf-tls- 437 cached-info-21 (work in progress), December 2015. 439 [RFC1122] Braden, R., Ed., "Requirements for Internet Hosts - 440 Communication Layers", STD 3, RFC 1122, 441 DOI 10.17487/RFC1122, October 1989, 442 . 444 [RFC7250] Wouters, P., Ed., Tschofenig, H., Ed., Gilmore, J., 445 Weiler, S., and T. Kivinen, "Using Raw Public Keys in 446 Transport Layer Security (TLS) and Datagram Transport 447 Layer Security (DTLS)", RFC 7250, DOI 10.17487/RFC7250, 448 June 2014, . 450 [RFC7413] Cheng, Y., Chu, J., Radhakrishnan, S., and A. Jain, "TCP 451 Fast Open", RFC 7413, DOI 10.17487/RFC7413, December 2014, 452 . 454 [RFC7435] Dukhovni, V., "Opportunistic Security: Some Protection 455 Most of the Time", RFC 7435, DOI 10.17487/RFC7435, 456 December 2014, . 458 [RFC7626] Bortzmeyer, S., "DNS Privacy Considerations", RFC 7626, 459 DOI 10.17487/RFC7626, August 2015, 460 . 462 Authors' Addresses 464 Tirumaleswar Reddy 465 Cisco Systems, Inc. 466 Cessna Business Park, Varthur Hobli 467 Sarjapur Marathalli Outer Ring Road 468 Bangalore, Karnataka 560103 469 India 471 Email: tireddy@cisco.com 473 Dan Wing 474 Cisco Systems, Inc. 475 170 West Tasman Drive 476 San Jose, California 95134 477 USA 479 Email: dwing@cisco.com 481 Prashanth Patil 482 Cisco Systems, Inc. 483 Bangalore 484 India 486 Email: praspati@cisco.com