idnits 2.17.1 draft-ietf-dprive-dnsodtls-08.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 (July 28, 2016) is 2828 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) ** 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 (-11) exists of draft-ietf-dprive-dtls-and-tls-profiles-03 -- Obsolete informational reference (is this intentional?): RFC 7626 (Obsoleted by RFC 9076) Summary: 3 errors (**), 0 flaws (~~), 2 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: January 29, 2017 Cisco 6 July 28, 2016 8 DNS over DTLS (DNSoD) 9 draft-ietf-dprive-dnsodtls-08 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 January 29, 2017. 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. Establishing and Managing DNS-over-DTLS Sessions . . . . . . 3 64 3.1. Session Initiation . . . . . . . . . . . . . . . . . . . 4 65 3.2. DTLS Handshake and Authentication . . . . . . . . . . . . 4 66 3.3. Established Sessions . . . . . . . . . . . . . . . . . . 4 67 4. Performance Considerations . . . . . . . . . . . . . . . . . 6 68 5. Anycast . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 69 6. Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 70 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 71 8. Security Considerations . . . . . . . . . . . . . . . . . . . 8 72 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8 73 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 74 10.1. Normative References . . . . . . . . . . . . . . . . . . 9 75 10.2. Informative References . . . . . . . . . . . . . . . . . 10 76 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 11 78 1. Introduction 80 The Domain Name System is specified in [RFC1034] and [RFC1035] . DNS 81 queries and responses are normally exchanged unencrypted and are thus 82 vulnerable to eavesdropping. Such eavesdropping can result in an 83 undesired entity learning domains that a host wishes to access, thus 84 resulting in privacy leakage. DNS privacy problem is further 85 discussed in [RFC7626] . 87 Active attackers have long been successful at injecting bogus 88 responses, causing cache poisoning and causing misdirection of the 89 subsequent connection (if attacking A or AAAA records). A popular 90 mitigation against that attack is to use ephemeral and random source 91 ports for DNS queries [RFC5452] . 93 This document defines DNS over DTLS (DNSoD, pronounced "dee-enn-sod") 94 which provides confidential DNS communication between stub resolvers 95 and recursive resolvers, stub resolvers and forwarders, forwarders 96 and recursive resolvers. DNSoD puts an additional computational load 97 on servers. The largest gain for privacy is to protect the 98 communication between the DNS client (the end user's machine) and its 99 caching resolver. DNSoD might work equally between recursive clients 100 and authoritative servers, but this application of the protocol is 101 out of scope for the DNS PRIVate Exchange (DPRIVE) Working Group per 102 its current charter. This document does not change the format of DNS 103 messages. 105 The motivations for proposing DNSoD are that 107 o TCP suffers from network head-of-line blocking, where the loss of 108 a packet causes all other TCP segments to not be delivered to the 109 application until the lost packet is re-transmitted. DNSoD, 110 because it uses UDP, does not suffer from network head-of-line 111 blocking. 113 o DTLS session resumption consumes 1 round trip whereas TLS session 114 resumption can start only after TCP handshake is complete. 115 Although TCP Fast Open [RFC7413] can reduce that handshake, TCP 116 Fast Open is only available on a few OSs, it is not yet 117 ubiquitous. 119 1.1. Relationship to TCP Queries and to DNSSEC 121 DNS queries can be sent over UDP or TCP. The scope of this document, 122 however, is only UDP. DNS over TCP could be protected with TLS, as 123 described in [RFC7858]. 125 DNS Security Extensions ( DNSSEC [RFC4033] ) provides object 126 integrity of DNS resource records, allowing end-users (or their 127 resolver) to verify legitimacy of responses. However, DNSSEC does 128 not protect privacy of DNS requests or responses. DNSoD works in 129 conjunction with DNSSEC, but DNSoD does not replace the need or value 130 of DNSSEC. 132 2. Terminology 134 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 135 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 136 "OPTIONAL" in this document are to be interpreted as described in 137 [RFC2119] . 139 3. Establishing and Managing DNS-over-DTLS Sessions 140 3.1. Session Initiation 142 DNSoD MUST run over standard UDP port 853 as defined in Section 7. 144 The host should determine if the DNS server supports DNSoD by sending 145 a DTLS ClientHello message. A DNS server that does not support DNSoD 146 will not respond to ClientHello messages sent by the client. If no 147 response is received from that server, and the client has no better 148 round-trip estimate, the client MUST retransmit the DTLS ClientHello 149 according to Section 4.2.4.1 of [RFC6347]. After 15 seconds, it MUST 150 cease attempts to re-transmit its ClientHello. The client MAY repeat 151 that procedure in the event the DNS server upgrades to support DNSoD, 152 but such probing SHOULD NOT be done more frequently than every 24 153 hours and MUST NOT be done more frequently than every 15 minutes. 154 This mechanism requires no additional signaling between the client 155 and server. Behavior for an unsuccessful DTLS connection is 156 discussed in Section 6. 158 3.2. DTLS Handshake and Authentication 160 Once the DNS client succeeds in receiving HelloVerifyRequest from the 161 server via UDP on the well-known port for DNS over DTLS, it proceeds 162 with DTLS handshake as described in [RFC6347], following the best 163 practices specified in [RFC7525]. 165 DNS privacy requires encrypting the query (and response) from passive 166 attacks. Such encryption typically provides integrity protection as 167 a side-effect, which means on-path attackers cannot simply inject 168 bogus DNS responses. However, to provide stronger protection from 169 active attackers pretending to be the server, the server itself needs 170 to be authenticated. To authenticate the server providing DNS 171 privacy, DNS client MUST use the authenication mechanisms discussed 172 in [I-D.ietf-dprive-dtls-and-tls-profiles]. This document does not 173 propose new ideas for authentication. 175 After DTLS negotiation completes, the connection will be encrypted 176 and is now protected from eavesdropping. 178 3.3. Established Sessions 180 In DTLS, all data is protected using the same record encoding and 181 mechanisms. When the mechanism described in this document is in 182 effect, DNS messages are encrypted using the standard DTLS record 183 encoding. When a user of DTLS wishes to send an DNS message, it 184 delivers it to the DTLS implementation as an ordinary application 185 data write (e.g., SSL_write()). To reduce client and server 186 workload, clients SHOULD re-use the DTLS session. A single DTLS 187 session can be used to send multiple DNS requests and receive 188 multiple DNS responses. 190 DNSoD client and server MUST use DTLS heartbeat [RFC6520] to verify 191 that the peer still has DTLS state. DTLS session is terminated by 192 the receipt of an authenticated message that closes the connection 193 (e.g., a DTLS fatal alert). 195 Client Server 196 ------ ------ 198 ClientHello --------> 200 <------- HelloVerifyRequest 201 (contains cookie) 203 ClientHello --------> 204 (contains cookie) 205 (empty SessionTicket extension) 206 ServerHello 207 (empty SessionTicket extension) 208 Certificate* 209 ServerKeyExchange* 210 CertificateRequest* 211 <-------- ServerHelloDone 213 Certificate* 214 ClientKeyExchange 215 CertificateVerify* 216 (ChangeCipherSpec) 217 Finished --------> 218 NewSessionTicket 219 (ChangeCipherSpec) 220 <-------- Finished 222 DNS Request ---------> 224 <--------- DNS Response 226 Message Flow for Full Handshake Issuing New Session Ticket 228 4. Performance Considerations 230 To reduce number of octets of the DTLS handshake, especially the size 231 of the certificate in the ServerHello (which can be several 232 kilobytes), DNS client and server can use raw public keys [RFC7250] 233 or Cached Information Extension [I-D.ietf-tls-cached-info] . Cached 234 Information Extension avoids transmitting the server's certificate 235 and certificate chain if the client has cached that information from 236 a previous TLS handshake. 238 Since pipelined responses can arrive out of order, clients MUST match 239 responses to outstanding queries on the same DTLS connection using 240 the Message ID. If the response contains a question section, the 241 client MUST match the QNAME, QCLASS, and QTYPE fields. Failure by 242 clients to properly match responses to outstanding queries can have 243 serious consequences for interoperability ( [RFC7766] , Section 7). 245 It is highly advantageous to avoid server-side DTLS state and reduce 246 the number of new DTLS sessions on the server which can be done with 247 TLS Session Resumption without server state [RFC5077] . This also 248 eliminates a round-trip for subsequent DNSoD queries, because with 249 [RFC5077] the DTLS session does not need to be re-established. 251 Compared to normal DNS, DTLS adds at least 13 octets of header, plus 252 cipher and authentication overhead to every query and every response. 253 This reduces the size of the DNS payload that can be carried. DNS 254 client and server MUST support the EDNS0 option defined in [RFC6891] 255 so that the DNS client can indicate to the DNS server the maximum DNS 256 response size it can reassemble and deliver in the DNS client's 257 network stack. The client sets its EDNS0 value as if DTLS is not 258 being used. The DNS server must ensure that the DNS response size 259 does not exceed the Path MTU i.e. each DTLS record MUST fit within a 260 single datagram, as required by [RFC6347]. The DNS server must 261 consider the amount of record expansion expected by the DTLS 262 processing when calculating the size of DNS response that fits within 263 the path MTU. Path MTU MUST be greater than equal to [DNS response 264 size + DTLS overhead of 13 octets + padding size ([RFC7830]) + 265 authentication overhead of the negotiated DTLS cipher suite + block 266 padding (Section 4.1.1.1 of [RFC6347]]. If the DNS server's response 267 were to exceed that calculated value, the server sends a response 268 that does fit within that value and sets the TC (truncated) bit. The 269 client, upon receiving a response with the TC bit set and wanting to 270 receive the entire response, establishes a DNS-over-TLS [RFC7858] 271 connection to the same server, and sends a new DNS request for the 272 same resource record. 274 5. Anycast 276 DNS servers are often configured with anycast addresses. While the 277 network is stable, packets transmitted from a particular source to an 278 anycast address will reach the same server that has the cryptographic 279 context from the DNS over DTLS handshake. But when the network 280 configuration changes, a DNS over DTLS packet can be received by a 281 server that does not have the necessary cryptographic context. To 282 encourage the client to initiate a new DTLS handshake, DNS servers 283 SHOULD generate a DTLS Alert message in response to receiving a DTLS 284 packet for which the server does not have any cryptographic context. 285 Upon receipt of an un-authenicated DTLS alert, the DTLS client 286 validates the Alert is within the replay window (Section 4.1.2.6 of 287 [RFC6347] ). It is difficult for the DTLS client to validate that 288 the DTLS alert was generated by the DTLS server in response to a 289 request or was generated by an on- or off-path attacker. Thus, upon 290 receipt of an in-window DTLS Alert, the client SHOULD continue re- 291 transmitting the DTLS packet (in the event the Alert was spoofed), 292 and at the same time it SHOULD initiate DTLS session resumption. 293 When the DTLS client receives authenticated DNS response from one of 294 those DTLS sessions, the other DTLS session should be terminated. 296 6. Usage 298 Using DNS privacy with an authenticated server is most preferred, DNS 299 privacy with an unauthenticated server is next preferred, and plain 300 text DNS is least preferred. This section gives a non-normative 301 discussion on common behaviors and choices. 303 An implementation MAY attempt to obtain DNS privacy by contacting DNS 304 servers on the local network (provided by DHCP) and on the Internet, 305 and make those attempts in parallel to reduce user impact. If DNS 306 privacy cannot be successfully negotiated for whatever reason, the 307 client can do three things, in order from best to worst for privacy: 309 1. refuse to send DNS queries on this network, which means the 310 client cannot make effective use of this network, as modern 311 applications typically require DNS; or, 313 2. use opportunistic security, as described in [RFC7435] or, 315 3. send plain DNS queries on this network, which means no DNS 316 privacy is provided. 318 Heuristics can improve this situation, but only to a degree (e.g., 319 previous success of DNS privacy on this network may be reason to 320 alert the user about failure to establish DNS privacy on this network 321 now). Still, the client (in cooperation with the end user) has to 322 decide to use the network without the protection of DNS privacy. 324 7. IANA Considerations 326 This specification uses port 853 already allocated in the IANA port 327 number registry as defined in Section 6 of [RFC7858]. 329 8. Security Considerations 331 The interaction between a DNS client and DNS server requires Datagram 332 Transport Layer Security (DTLS) with a ciphersuite offering 333 confidentiality protection. The guidance given in [RFC7525] must be 334 followed to avoid attacks on DTLS. DNS clients keeping track of 335 servers known to support DTLS enables clients to detect downgrade 336 attacks. To interfere with DNS over DTLS, an on- or off-path 337 attacker might send an ICMP message towards the DTLS client or DTLS 338 server. As these ICMP messages cannot be authenticated, all ICMP 339 errors should be treated as soft errors [RFC1122] . For servers with 340 no connection history and no apparent support for DTLS, depending on 341 their Privacy Profile and privacy requirements, clients may choose to 342 (a) try another server when available, (b) continue without DTLS, or 343 (c) refuse to forward the query. Once a DNSoD client has established 344 a security association with a particular DNS server, and outstanding 345 normal DNS queries with that server (if any) have been received, the 346 DNSoD client MUST ignore any subsequent normal DNS responses from 347 that server, as all subsequent responses should be encrypted. This 348 behavior mitigates all possible attacks described in Measures for 349 Making DNS More Resilient against Forged Answers [RFC5452] . 351 A malicious client might attempt to perform a high number of DTLS 352 handshakes with a server. As the clients are not uniquely identified 353 by the protocol and can be obfuscated with IPv4 address sharing and 354 with IPv6 temporary addresses, a server needs to mitigate the impact 355 of such an attack. Such mitigation might involve rate limiting 356 handshakes from a certain subnet or more advanced DoS/DDoS techniques 357 beyond the scope of this paper. 359 9. Acknowledgements 361 Thanks to Phil Hedrick for his review comments on TCP and to Josh 362 Littlefield for pointing out DNSoD load on busy servers (most notably 363 root servers). The authors would like to thank Simon Josefsson, 364 Daniel Kahn Gillmor, Bob Harold, Ilari Liusvaara, Sara Dickinson, 365 Christian Huitema, Stephane Bortzmeyer, Alexander Mayrhofer and Geoff 366 Huston for discussions and comments on the design of DNSoD. 368 10. References 370 10.1. Normative References 372 [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", 373 STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987, 374 . 376 [RFC1035] Mockapetris, P., "Domain names - implementation and 377 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 378 November 1987, . 380 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 381 Requirement Levels", BCP 14, RFC 2119, 382 DOI 10.17487/RFC2119, March 1997, 383 . 385 [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S. 386 Rose, "DNS Security Introduction and Requirements", 387 RFC 4033, DOI 10.17487/RFC4033, March 2005, 388 . 390 [RFC5077] Salowey, J., Zhou, H., Eronen, P., and H. Tschofenig, 391 "Transport Layer Security (TLS) Session Resumption without 392 Server-Side State", RFC 5077, DOI 10.17487/RFC5077, 393 January 2008, . 395 [RFC5452] Hubert, A. and R. van Mook, "Measures for Making DNS More 396 Resilient against Forged Answers", RFC 5452, 397 DOI 10.17487/RFC5452, January 2009, 398 . 400 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 401 Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, 402 January 2012, . 404 [RFC6520] Seggelmann, R., Tuexen, M., and M. Williams, "Transport 405 Layer Security (TLS) and Datagram Transport Layer Security 406 (DTLS) Heartbeat Extension", RFC 6520, 407 DOI 10.17487/RFC6520, February 2012, 408 . 410 [RFC6891] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms 411 for DNS (EDNS(0))", STD 75, RFC 6891, 412 DOI 10.17487/RFC6891, April 2013, 413 . 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 [RFC7830] Mayrhofer, A., "The EDNS(0) Padding Option", RFC 7830, 422 DOI 10.17487/RFC7830, May 2016, 423 . 425 10.2. Informative References 427 [I-D.ietf-dprive-dtls-and-tls-profiles] 428 Dickinson, S., Gillmor, D., and T. Reddy, "Authentication 429 and (D)TLS Profile for DNS-over-(D)TLS", draft-ietf- 430 dprive-dtls-and-tls-profiles-03 (work in progress), July 431 2016. 433 [I-D.ietf-tls-cached-info] 434 Santesson, S. and H. Tschofenig, "Transport Layer Security 435 (TLS) Cached Information Extension", draft-ietf-tls- 436 cached-info-23 (work in progress), May 2016. 438 [RFC1122] Braden, R., Ed., "Requirements for Internet Hosts - 439 Communication Layers", STD 3, RFC 1122, 440 DOI 10.17487/RFC1122, October 1989, 441 . 443 [RFC7250] Wouters, P., Ed., Tschofenig, H., Ed., Gilmore, J., 444 Weiler, S., and T. Kivinen, "Using Raw Public Keys in 445 Transport Layer Security (TLS) and Datagram Transport 446 Layer Security (DTLS)", RFC 7250, DOI 10.17487/RFC7250, 447 June 2014, . 449 [RFC7413] Cheng, Y., Chu, J., Radhakrishnan, S., and A. Jain, "TCP 450 Fast Open", RFC 7413, DOI 10.17487/RFC7413, December 2014, 451 . 453 [RFC7435] Dukhovni, V., "Opportunistic Security: Some Protection 454 Most of the Time", RFC 7435, DOI 10.17487/RFC7435, 455 December 2014, . 457 [RFC7626] Bortzmeyer, S., "DNS Privacy Considerations", RFC 7626, 458 DOI 10.17487/RFC7626, August 2015, 459 . 461 [RFC7766] Dickinson, J., Dickinson, S., Bellis, R., Mankin, A., and 462 D. Wessels, "DNS Transport over TCP - Implementation 463 Requirements", RFC 7766, DOI 10.17487/RFC7766, March 2016, 464 . 466 [RFC7858] Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., 467 and P. Hoffman, "Specification for DNS over Transport 468 Layer Security (TLS)", RFC 7858, DOI 10.17487/RFC7858, May 469 2016, . 471 Authors' Addresses 473 Tirumaleswar Reddy 474 Cisco Systems, Inc. 475 Cessna Business Park, Varthur Hobli 476 Sarjapur Marathalli Outer Ring Road 477 Bangalore, Karnataka 560103 478 India 480 Email: tireddy@cisco.com 482 Dan Wing 483 Cisco Systems, Inc. 484 170 West Tasman Drive 485 San Jose, California 95134 486 USA 488 Email: dwing@cisco.com 490 Prashanth Patil 491 Cisco Systems, Inc. 492 Bangalore 493 India 495 Email: praspati@cisco.com