idnits 2.17.1 draft-ietf-dprive-dnsodtls-05.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 (March 15, 2016) is 2964 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 235, but not defined == Unused Reference: 'RFC1122' is defined on line 440, but no explicit reference was found in the text ** 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-07 == Outdated reference: A later version (-23) exists of draft-ietf-tls-cached-info-22 -- Obsolete informational reference (is this intentional?): RFC 7626 (Obsoleted by RFC 9076) Summary: 3 errors (**), 0 flaws (~~), 5 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: September 16, 2016 Cisco 6 March 15, 2016 8 DNS over DTLS (DNSoD) 9 draft-ietf-dprive-dnsodtls-05 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 September 16, 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 . . . . . . . . . . . . . . . . . . . . . . 9 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. The client MAY repeat that 143 procedure in the event the DNS server has been upgraded to support 144 DNSoD, but such probing SHOULD NOT be done more frequently than every 145 24 hours and MUST NOT be done more frequently than every 15 minutes. 146 This mechanism requires no additional signaling between the client 147 and server. 149 4. Performance Considerations 151 To reduce number of octets of the DTLS handshake, especially the size 152 of the certificate in the ServerHello (which can be several 153 kilobytes), DNS client and server can use raw public keys [RFC7250] 154 or Cached Information Extension [I-D.ietf-tls-cached-info]. Cached 155 Information Extension avoids transmitting the server's certificate 156 and certificate chain if the client has cached that information from 157 a previous TLS handshake. 159 Multiple DNS queries can be sent over a single DTLS session and the 160 DNSoD client need not wait for an outstanding reply before sending 161 the next query. The existing Query ID, Query type and Query class 162 allows multiple requests and responses to be interleaved in whatever 163 order they can be fulfilled by the DNS server. This means DNSoD 164 reduces the consumption of UDP port numbers, and because DTLS 165 protects the communication between a DNS client and its server, the 166 resolver SHOULD NOT use random ephemeral source ports (Section 9.2 of 167 [RFC5452]) because such source port use would incur additional, 168 unnecessary DTLS load on the DNSoD server. When sending multiple 169 queries over a single DTLS session, clients MUST take care to avoid 170 Message ID collisions. In other words, they MUST NOT re-use the DNS 171 Message ID of an in-flight query. 173 It is highly advantageous to avoid server-side DTLS state and reduce 174 the number of new DTLS sessions on the server which can be done with 175 [RFC5077]. This also eliminates a round-trip for subsequent DNSoD 176 queries, because with [RFC5077] the DTLS session does not need to be 177 re-established. 179 Compared to normal DNS, DTLS adds at least 13 octets of header, plus 180 cipher and authentication overhead to every query and every response. 181 This reduces the size of the DNS payload that can be carried. DNS 182 client and server MUST support the EDNS0 option defined in [RFC6891] 183 so that the DNS client can indicate to the DNS server the maximum DNS 184 response size it can handle without IP fragmentation. If the DNS 185 server's response exceeds the EDNS0 value, the DNS server sets the TC 186 (truncated) bit. On receiving a response with the TC bit set, the 187 client establishes a DNS-over-TLS connection to the same server, and 188 sends a new DNS request for the same resource record 190 DNSoD puts an additional computational load on servers. The largest 191 gain for privacy is to protect the communication between the DNS 192 client (the end user's machine) and its caching resolver. 194 5. Established sessions 196 In DTLS, all data is protected using the same record encoding and 197 mechanisms. When the mechanism described in this document is in 198 effect, DNS messages are encrypted using the standard DTLS record 199 encoding. When a user of DTLS wishes to send an DNS message, it 200 delivers it to the DTLS implementation as an ordinary application 201 data write (e.g., SSL_write()). To reduce client and server 202 workload, clients SHOULD re-use the DTLS session. A single DTLS 203 session can be used to send multiple DNS requests and receive 204 multiple DNS responses. 206 DNSoD client and server can use DTLS heartbeat [RFC6520] to verify 207 that the peer still has DTLS state. DTLS session is terminated by 208 the receipt of an authenticated message that closes the connection 209 (e.g., a DTLS fatal alert). 211 Client Server 212 ------ ------ 214 ClientHello --------> 216 <------- HelloVerifyRequest 217 (contains cookie) 219 ClientHello --------> 220 (contains cookie) 221 (empty SessionTicket extension) 222 ServerHello 223 (empty SessionTicket extension) 224 Certificate* 225 ServerKeyExchange* 226 CertificateRequest* 227 <-------- ServerHelloDone 229 Certificate* 230 ClientKeyExchange 231 CertificateVerify* 232 [ChangeCipherSpec] 233 Finished --------> 234 NewSessionTicket 235 [ChangeCipherSpec] 236 <-------- Finished 238 DNS Request ---------> 240 <--------- DNS Response 242 Message Flow for Full Handshake Issuing New Session Ticket 244 6. Anycast 246 DNS servers are often configured with anycast addresses. While the 247 network is stable, packets transmitted from a particular source to an 248 anycast address will reach the same server that has the cryptographic 249 context from the DNS over DTLS handshake. But when the network 250 configuration changes, a DNS over DTLS packet can be received by a 251 server that does not have the necessary cryptographic context. To 252 encourage the client to initiate a new DTLS handshake, DNS servers 253 SHOULD generate a DTLS Alert message in response to receiving a DTLS 254 packet for which the server does not have any cryptographic context. 255 Upon receipt of an un-authenicated DTLS alert, the DTLS client 256 validates the Alert is within the replay window (Section 4.1.2.6 of 257 [RFC6347]). It is difficult for the DTLS client to validate the DTLS 258 alert was generated by the DTLS server in response to a request or 259 was generated by an on- or off-path attacker. Thus, upon receipt of 260 an in-window DTLS Alert, the client SHOULD continue re-transmitting 261 the DTLS packet (in the event the Alert was spoofed), and at the same 262 time it SHOULD initiate DTLS session resumption. 264 7. Downgrade attacks 266 Using DNS privacy with an authenticated server is most preferred, DNS 267 privacy with an unauthenticated server is next preferred, and plain 268 DNS is least preferred. This section gives a non-normative 269 discussion on common behaviors and choices. 271 An implementation MAY attempt to obtain DNS privacy by contacting DNS 272 servers on the local network (provided by DHCP) and on the Internet, 273 and make those attempts in parallel to reduce user impact. If DNS 274 privacy cannot be successfully negotiated for whatever reason, the 275 client can do three things: 277 1. refuse to send DNS queries on this network, which means the 278 client cannot make effective use of this network, as modern 279 networks require DNS; or, 281 2. use opportunistic security, as described in [RFC7435]. or, 283 3. send plain DNS queries on this network, which means no DNS 284 privacy is provided. 286 Heuristics can improve this situation, but only to a degree (e.g., 287 previous success of DNS privacy on this network may be reason to 288 alert the user about failure to establish DNS privacy on this network 289 now). Still, the client (in cooperation with the end user) has to 290 decide to use the network without the protection of DNS privacy. 292 8. IANA Considerations 294 IANA is requested to add the following value to the "Service Name and 295 Transport Protocol Port Number Registry" registry in the System 296 Range. The registry for that range requires IETF Review or IESG 297 Approval [RFC6335] and such a review has been requested using the 298 Early Allocation process [RFC7120] for the well-known UDP port in 299 this document. 301 Service Name domain-s 302 Transport Protocol(s) UDP/TCP 303 Port 853 304 Assignee IESG 305 Contact dwing@cisco.com 306 Description DNS query-response protocol runs over 307 DTLS and TLS 308 Reference This document 310 9. Security Considerations 312 The interaction between a DNS client and DNS server requires Datagram 313 Transport Layer Security (DTLS) with a ciphersuite offering 314 confidentiality protection and guidance given in [RFC7525] must be 315 followed to avoid attacks on DTLS. DNS clients keeping track of 316 servers known to support DTLS enables clients to detect downgrade 317 attacks. For servers with no connection history and no apparent 318 support for DTLS, depending on their Privacy Profile and privacy 319 requirements, clients may choose to (a) try another server when 320 available, (b) continue without DTLS, or (c) refuse to forward the 321 query. Once a DNSoD client has established a security association 322 with a particular DNS server, and outstanding normal DNS queries with 323 that server (if any) have been received, the DNSoD client MUST ignore 324 any subsequent normal DNS responses from that server, as all 325 subsequent responses should be encrypted. This behavior mitigates 326 all possible attacks described in Measures for Making DNS More 327 Resilient against Forged Answers [RFC5452]. 329 A malicious client might attempt to perform a high number of DTLS 330 handshakes with a server. As the clients are not uniquely identified 331 by the protocol and can be obfuscated with IPv4 address sharing and 332 with IPv6 temporary addresses, a server needs to mitigate the impact 333 of such an attack. Such mitigation might involve rate limiting 334 handshakes from a certain subnet or more advanced DoS/DDoS techniques 335 beyond the scope of this paper. 337 9.1. Authenticating a DNS Privacy Server 339 DNS privacy requires encrypting the query (and response) from passive 340 attacks. Such encryption typically provides integrity protection as 341 a side-effect, which means on-path attackers cannot simply inject 342 bogus DNS responses. However, to provide stronger protection from 343 active attackers pretending to be the server, the server itself needs 344 to be authenticated. To authenticate the server providing DNS 345 privacy, DNS client can use the authenication mechanisms discussed in 346 [I-D.dgr-dprive-dtls-and-tls-profiles]. 348 10. Acknowledgements 350 Thanks to Phil Hedrick for his review comments on TCP and to Josh 351 Littlefield for pointing out DNSoD load on busy servers (most notably 352 root servers). The authors would like to thank Simon Josefsson, 353 Daniel Kahn Gillmor, Bob Harold, Ilari Liusvaara, Sara Dickinson, 354 Christian Huitema and Stephane Bortzmeyer for discussions and 355 comments on the design of DNSoD. 357 11. References 359 11.1. Normative References 361 [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", 362 STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987, 363 . 365 [RFC1035] Mockapetris, P., "Domain names - implementation and 366 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 367 November 1987, . 369 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 370 Requirement Levels", BCP 14, RFC 2119, 371 DOI 10.17487/RFC2119, March 1997, 372 . 374 [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S. 375 Rose, "DNS Security Introduction and Requirements", 376 RFC 4033, DOI 10.17487/RFC4033, March 2005, 377 . 379 [RFC5077] Salowey, J., Zhou, H., Eronen, P., and H. Tschofenig, 380 "Transport Layer Security (TLS) Session Resumption without 381 Server-Side State", RFC 5077, DOI 10.17487/RFC5077, 382 January 2008, . 384 [RFC5452] Hubert, A. and R. van Mook, "Measures for Making DNS More 385 Resilient against Forged Answers", RFC 5452, 386 DOI 10.17487/RFC5452, January 2009, 387 . 389 [RFC6335] Cotton, M., Eggert, L., Touch, J., Westerlund, M., and S. 390 Cheshire, "Internet Assigned Numbers Authority (IANA) 391 Procedures for the Management of the Service Name and 392 Transport Protocol Port Number Registry", BCP 165, 393 RFC 6335, DOI 10.17487/RFC6335, August 2011, 394 . 396 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 397 Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, 398 January 2012, . 400 [RFC6520] Seggelmann, R., Tuexen, M., and M. Williams, "Transport 401 Layer Security (TLS) and Datagram Transport Layer Security 402 (DTLS) Heartbeat Extension", RFC 6520, 403 DOI 10.17487/RFC6520, February 2012, 404 . 406 [RFC6891] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms 407 for DNS (EDNS(0))", STD 75, RFC 6891, 408 DOI 10.17487/RFC6891, April 2013, 409 . 411 [RFC7120] Cotton, M., "Early IANA Allocation of Standards Track Code 412 Points", BCP 100, RFC 7120, DOI 10.17487/RFC7120, January 413 2014, . 415 [RFC7525] Sheffer, Y., Holz, R., and P. Saint-Andre, 416 "Recommendations for Secure Use of Transport Layer 417 Security (TLS) and Datagram Transport Layer Security 418 (DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, May 419 2015, . 421 11.2. Informative References 423 [I-D.dgr-dprive-dtls-and-tls-profiles] 424 Dickinson, S., Gillmor, D., and T. Reddy, "Authentication 425 and (D)TLS Profile for DNS-over-TLS and DNS-over-DTLS", 426 draft-dgr-dprive-dtls-and-tls-profiles-00 (work in 427 progress), December 2015. 429 [I-D.ietf-dprive-dns-over-tls] 430 Zi, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., 431 and P. Hoffman, "Specification for DNS over TLS", draft- 432 ietf-dprive-dns-over-tls-07 (work in progress), March 433 2016. 435 [I-D.ietf-tls-cached-info] 436 Santesson, S. and H. Tschofenig, "Transport Layer Security 437 (TLS) Cached Information Extension", draft-ietf-tls- 438 cached-info-22 (work in progress), January 2016. 440 [RFC1122] Braden, R., Ed., "Requirements for Internet Hosts - 441 Communication Layers", STD 3, RFC 1122, 442 DOI 10.17487/RFC1122, October 1989, 443 . 445 [RFC7250] Wouters, P., Ed., Tschofenig, H., Ed., Gilmore, J., 446 Weiler, S., and T. Kivinen, "Using Raw Public Keys in 447 Transport Layer Security (TLS) and Datagram Transport 448 Layer Security (DTLS)", RFC 7250, DOI 10.17487/RFC7250, 449 June 2014, . 451 [RFC7413] Cheng, Y., Chu, J., Radhakrishnan, S., and A. Jain, "TCP 452 Fast Open", RFC 7413, DOI 10.17487/RFC7413, December 2014, 453 . 455 [RFC7435] Dukhovni, V., "Opportunistic Security: Some Protection 456 Most of the Time", RFC 7435, DOI 10.17487/RFC7435, 457 December 2014, . 459 [RFC7626] Bortzmeyer, S., "DNS Privacy Considerations", RFC 7626, 460 DOI 10.17487/RFC7626, August 2015, 461 . 463 Authors' Addresses 465 Tirumaleswar Reddy 466 Cisco Systems, Inc. 467 Cessna Business Park, Varthur Hobli 468 Sarjapur Marathalli Outer Ring Road 469 Bangalore, Karnataka 560103 470 India 472 Email: tireddy@cisco.com 474 Dan Wing 475 Cisco Systems, Inc. 476 170 West Tasman Drive 477 San Jose, California 95134 478 USA 480 Email: dwing@cisco.com 482 Prashanth Patil 483 Cisco Systems, Inc. 484 Bangalore 485 India 487 Email: praspati@cisco.com