idnits 2.17.00 (12 Aug 2021) /tmp/idnits36343/draft-ietf-dprive-dnsodtls-06.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 (April 4, 2016) is 2237 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 228, but not defined ** Obsolete normative reference: RFC 5077 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 6347 (Obsoleted by RFC 9147) == Outdated reference: draft-ietf-dprive-dns-over-tls has been published as RFC 7858 == Outdated reference: draft-ietf-tls-cached-info has been published as RFC 7924 -- Obsolete informational reference (is this intentional?): RFC 7626 (Obsoleted by RFC 9076) Summary: 2 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: October 6, 2016 Cisco 6 April 4, 2016 8 DNS over DTLS (DNSoD) 9 draft-ietf-dprive-dnsodtls-06 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 October 6, 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 . . . . . . . . . . . . . . . . . . . . 4 66 6. Anycast . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 67 7. Downgrade attacks . . . . . . . . . . . . . . . . . . . . . . 6 68 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 69 9. Security Considerations . . . . . . . . . . . . . . . . . . . 7 70 9.1. Authenticating a DNS Privacy Server . . . . . . . . . . . 8 71 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8 72 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 73 11.1. Normative References . . . . . . . . . . . . . . . . . . 8 74 11.2. Informative References . . . . . . . . . . . . . . . . . 9 75 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 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 Since pipelined responses can arrive out of order, clients MUST match 160 responses to outstanding queries on the same DTLS connection using 161 the Message ID. If the response contains a question section, the 162 client MUST match the QNAME, QCLASS, and QTYPE fields. Failure by 163 clients to properly match responses to outstanding queries can have 164 serious consequences for interoperability ([RFC7766], Section 7). 166 It is highly advantageous to avoid server-side DTLS state and reduce 167 the number of new DTLS sessions on the server which can be done with 168 [RFC5077]. This also eliminates a round-trip for subsequent DNSoD 169 queries, because with [RFC5077] the DTLS session does not need to be 170 re-established. 172 Compared to normal DNS, DTLS adds at least 13 octets of header, plus 173 cipher and authentication overhead to every query and every response. 174 This reduces the size of the DNS payload that can be carried. DNS 175 client and server MUST support the EDNS0 option defined in [RFC6891] 176 so that the DNS client can indicate to the DNS server the maximum DNS 177 response size it can handle without IP fragmentation. If the DNS 178 server's response exceeds the EDNS0 value, the DNS server sets the TC 179 (truncated) bit. On receiving a response with the TC bit set, the 180 client establishes a DNS-over-TLS connection to the same server, and 181 sends a new DNS request for the same resource record 183 DNSoD puts an additional computational load on servers. The largest 184 gain for privacy is to protect the communication between the DNS 185 client (the end user's machine) and its caching resolver. 187 5. Established sessions 189 In DTLS, all data is protected using the same record encoding and 190 mechanisms. When the mechanism described in this document is in 191 effect, DNS messages are encrypted using the standard DTLS record 192 encoding. When a user of DTLS wishes to send an DNS message, it 193 delivers it to the DTLS implementation as an ordinary application 194 data write (e.g., SSL_write()). To reduce client and server 195 workload, clients SHOULD re-use the DTLS session. A single DTLS 196 session can be used to send multiple DNS requests and receive 197 multiple DNS responses. 199 DNSoD client and server can use DTLS heartbeat [RFC6520] to verify 200 that the peer still has DTLS state. DTLS session is terminated by 201 the receipt of an authenticated message that closes the connection 202 (e.g., a DTLS fatal alert). 204 Client Server 205 ------ ------ 207 ClientHello --------> 209 <------- HelloVerifyRequest 210 (contains cookie) 212 ClientHello --------> 213 (contains cookie) 214 (empty SessionTicket extension) 215 ServerHello 216 (empty SessionTicket extension) 217 Certificate* 218 ServerKeyExchange* 219 CertificateRequest* 220 <-------- ServerHelloDone 222 Certificate* 223 ClientKeyExchange 224 CertificateVerify* 225 [ChangeCipherSpec] 226 Finished --------> 227 NewSessionTicket 228 [ChangeCipherSpec] 229 <-------- Finished 231 DNS Request ---------> 233 <--------- DNS Response 235 Message Flow for Full Handshake Issuing New Session Ticket 237 6. Anycast 239 DNS servers are often configured with anycast addresses. While the 240 network is stable, packets transmitted from a particular source to an 241 anycast address will reach the same server that has the cryptographic 242 context from the DNS over DTLS handshake. But when the network 243 configuration changes, a DNS over DTLS packet can be received by a 244 server that does not have the necessary cryptographic context. To 245 encourage the client to initiate a new DTLS handshake, DNS servers 246 SHOULD generate a DTLS Alert message in response to receiving a DTLS 247 packet for which the server does not have any cryptographic context. 248 Upon receipt of an un-authenicated DTLS alert, the DTLS client 249 validates the Alert is within the replay window (Section 4.1.2.6 of 250 [RFC6347]). It is difficult for the DTLS client to validate the DTLS 251 alert was generated by the DTLS server in response to a request or 252 was generated by an on- or off-path attacker. Thus, upon receipt of 253 an in-window DTLS Alert, the client SHOULD continue re-transmitting 254 the DTLS packet (in the event the Alert was spoofed), and at the same 255 time it SHOULD initiate DTLS session resumption. 257 7. Downgrade attacks 259 Using DNS privacy with an authenticated server is most preferred, DNS 260 privacy with an unauthenticated server is next preferred, and plain 261 DNS is least preferred. This section gives a non-normative 262 discussion on common behaviors and choices. 264 An implementation MAY attempt to obtain DNS privacy by contacting DNS 265 servers on the local network (provided by DHCP) and on the Internet, 266 and make those attempts in parallel to reduce user impact. If DNS 267 privacy cannot be successfully negotiated for whatever reason, the 268 client can do three things: 270 1. refuse to send DNS queries on this network, which means the 271 client cannot make effective use of this network, as modern 272 networks require DNS; or, 274 2. use opportunistic security, as described in [RFC7435]. or, 276 3. send plain DNS queries on this network, which means no DNS 277 privacy is provided. 279 Heuristics can improve this situation, but only to a degree (e.g., 280 previous success of DNS privacy on this network may be reason to 281 alert the user about failure to establish DNS privacy on this network 282 now). Still, the client (in cooperation with the end user) has to 283 decide to use the network without the protection of DNS privacy. 285 8. IANA Considerations 287 IANA is requested to add the following value to the "Service Name and 288 Transport Protocol Port Number Registry" registry in the System 289 Range. The registry for that range requires IETF Review or IESG 290 Approval [RFC6335] and such a review has been requested using the 291 Early Allocation process [RFC7120] for the well-known UDP port in 292 this document. 294 Service Name domain-s 295 Transport Protocol(s) UDP/TCP 296 Port 853 297 Assignee IESG 298 Contact dwing@cisco.com 299 Description DNS query-response protocol runs over 300 DTLS and TLS 301 Reference This document 303 9. Security Considerations 305 The interaction between a DNS client and DNS server requires Datagram 306 Transport Layer Security (DTLS) with a ciphersuite offering 307 confidentiality protection and guidance given in [RFC7525] must be 308 followed to avoid attacks on DTLS. DNS clients keeping track of 309 servers known to support DTLS enables clients to detect downgrade 310 attacks. To interfere with DNS over DTLS, an on- or off-path 311 attacker might send an ICMP message towards the DTLS client or DTLS 312 server. As these ICMP messages cannot be authenticated, all ICMP 313 errors should be treated as soft errors [RFC1122]. For servers with 314 no connection history and no apparent support for DTLS, depending on 315 their Privacy Profile and privacy requirements, clients may choose to 316 (a) try another server when available, (b) continue without DTLS, or 317 (c) refuse to forward the query. Once a DNSoD client has established 318 a security association with a particular DNS server, and outstanding 319 normal DNS queries with that server (if any) have been received, the 320 DNSoD client MUST ignore any subsequent normal DNS responses from 321 that server, as all subsequent responses should be encrypted. This 322 behavior mitigates all possible attacks described in Measures for 323 Making DNS More Resilient against Forged Answers [RFC5452]. 325 A malicious client might attempt to perform a high number of DTLS 326 handshakes with a server. As the clients are not uniquely identified 327 by the protocol and can be obfuscated with IPv4 address sharing and 328 with IPv6 temporary addresses, a server needs to mitigate the impact 329 of such an attack. Such mitigation might involve rate limiting 330 handshakes from a certain subnet or more advanced DoS/DDoS techniques 331 beyond the scope of this paper. 333 9.1. Authenticating a DNS Privacy Server 335 DNS privacy requires encrypting the query (and response) from passive 336 attacks. Such encryption typically provides integrity protection as 337 a side-effect, which means on-path attackers cannot simply inject 338 bogus DNS responses. However, to provide stronger protection from 339 active attackers pretending to be the server, the server itself needs 340 to be authenticated. To authenticate the server providing DNS 341 privacy, DNS client can use the authenication mechanisms discussed in 342 [I-D.dgr-dprive-dtls-and-tls-profiles]. 344 10. Acknowledgements 346 Thanks to Phil Hedrick for his review comments on TCP and to Josh 347 Littlefield for pointing out DNSoD load on busy servers (most notably 348 root servers). The authors would like to thank Simon Josefsson, 349 Daniel Kahn Gillmor, Bob Harold, Ilari Liusvaara, Sara Dickinson, 350 Christian Huitema and Stephane Bortzmeyer for discussions and 351 comments on the design of DNSoD. 353 11. References 355 11.1. Normative References 357 [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", 358 STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987, 359 . 361 [RFC1035] Mockapetris, P., "Domain names - implementation and 362 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 363 November 1987, . 365 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 366 Requirement Levels", BCP 14, RFC 2119, 367 DOI 10.17487/RFC2119, March 1997, 368 . 370 [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S. 371 Rose, "DNS Security Introduction and Requirements", 372 RFC 4033, DOI 10.17487/RFC4033, March 2005, 373 . 375 [RFC5077] Salowey, J., Zhou, H., Eronen, P., and H. Tschofenig, 376 "Transport Layer Security (TLS) Session Resumption without 377 Server-Side State", RFC 5077, DOI 10.17487/RFC5077, 378 January 2008, . 380 [RFC5452] Hubert, A. and R. van Mook, "Measures for Making DNS More 381 Resilient against Forged Answers", RFC 5452, 382 DOI 10.17487/RFC5452, January 2009, 383 . 385 [RFC6335] Cotton, M., Eggert, L., Touch, J., Westerlund, M., and S. 386 Cheshire, "Internet Assigned Numbers Authority (IANA) 387 Procedures for the Management of the Service Name and 388 Transport Protocol Port Number Registry", BCP 165, 389 RFC 6335, DOI 10.17487/RFC6335, August 2011, 390 . 392 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 393 Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, 394 January 2012, . 396 [RFC6520] Seggelmann, R., Tuexen, M., and M. Williams, "Transport 397 Layer Security (TLS) and Datagram Transport Layer Security 398 (DTLS) Heartbeat Extension", RFC 6520, 399 DOI 10.17487/RFC6520, February 2012, 400 . 402 [RFC6891] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms 403 for DNS (EDNS(0))", STD 75, RFC 6891, 404 DOI 10.17487/RFC6891, April 2013, 405 . 407 [RFC7120] Cotton, M., "Early IANA Allocation of Standards Track Code 408 Points", BCP 100, RFC 7120, DOI 10.17487/RFC7120, January 409 2014, . 411 [RFC7525] Sheffer, Y., Holz, R., and P. Saint-Andre, 412 "Recommendations for Secure Use of Transport Layer 413 Security (TLS) and Datagram Transport Layer Security 414 (DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, May 415 2015, . 417 11.2. Informative References 419 [I-D.dgr-dprive-dtls-and-tls-profiles] 420 Dickinson, S., Gillmor, D., and T. Reddy, "Authentication 421 and (D)TLS Profile for DNS-over-TLS and DNS-over-DTLS", 422 draft-dgr-dprive-dtls-and-tls-profiles-00 (work in 423 progress), December 2015. 425 [I-D.ietf-dprive-dns-over-tls] 426 Zi, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., 427 and P. Hoffman, "Specification for DNS over TLS", draft- 428 ietf-dprive-dns-over-tls-09 (work in progress), March 429 2016. 431 [I-D.ietf-tls-cached-info] 432 Santesson, S. and H. Tschofenig, "Transport Layer Security 433 (TLS) Cached Information Extension", draft-ietf-tls- 434 cached-info-22 (work in progress), January 2016. 436 [RFC1122] Braden, R., Ed., "Requirements for Internet Hosts - 437 Communication Layers", STD 3, RFC 1122, 438 DOI 10.17487/RFC1122, October 1989, 439 . 441 [RFC7250] Wouters, P., Ed., Tschofenig, H., Ed., Gilmore, J., 442 Weiler, S., and T. Kivinen, "Using Raw Public Keys in 443 Transport Layer Security (TLS) and Datagram Transport 444 Layer Security (DTLS)", RFC 7250, DOI 10.17487/RFC7250, 445 June 2014, . 447 [RFC7413] Cheng, Y., Chu, J., Radhakrishnan, S., and A. Jain, "TCP 448 Fast Open", RFC 7413, DOI 10.17487/RFC7413, December 2014, 449 . 451 [RFC7435] Dukhovni, V., "Opportunistic Security: Some Protection 452 Most of the Time", RFC 7435, DOI 10.17487/RFC7435, 453 December 2014, . 455 [RFC7626] Bortzmeyer, S., "DNS Privacy Considerations", RFC 7626, 456 DOI 10.17487/RFC7626, August 2015, 457 . 459 [RFC7766] Dickinson, J., Dickinson, S., Bellis, R., Mankin, A., and 460 D. Wessels, "DNS Transport over TCP - Implementation 461 Requirements", RFC 7766, DOI 10.17487/RFC7766, March 2016, 462 . 464 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