idnits 2.17.1 draft-ietf-dprive-dnsodtls-07.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 6, 2016) is 2850 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-02 -- 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 7, 2017 Cisco 6 July 6, 2016 8 DNS over DTLS (DNSoD) 9 draft-ietf-dprive-dnsodtls-07 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 7, 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 . . . . . . . . . . . . . . . . . . . 3 65 3.2. DTLS Handshake and Authentication . . . . . . . . . . . . 4 66 3.3. Established Sessions . . . . . . . . . . . . . . . . . . 4 67 4. Performance Considerations . . . . . . . . . . . . . . . . . 5 68 5. Anycast . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 69 6. Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 70 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 71 8. Security Considerations . . . . . . . . . . . . . . . . . . . 8 72 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8 73 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 74 10.1. Normative References . . . . . . . . . . . . . . . . . . 8 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. 98 The motivations for proposing DNSoD are that 100 o TCP suffers from network head-of-line blocking, where the loss of 101 a packet causes all other TCP segments to not be delivered to the 102 application until the lost packet is re-transmitted. DNSoD, 103 because it uses UDP, does not suffer from network head-of-line 104 blocking. 106 o DTLS session resumption consumes 1 round trip whereas TLS session 107 resumption can start only after TCP handshake is complete. 108 Although TCP Fast Open [RFC7413] can reduce that handshake, TCP 109 Fast Open is only available on a few OSs, it is not yet 110 ubiquitous. 112 1.1. Relationship to TCP Queries and to DNSSEC 114 DNS queries can be sent over UDP or TCP. The scope of this document, 115 however, is only UDP. DNS over TCP could be protected with TLS, as 116 described in [RFC7858]. 118 DNS Security Extensions ( DNSSEC [RFC4033] ) provides object 119 integrity of DNS resource records, allowing end-users (or their 120 resolver) to verify legitimacy of responses. However, DNSSEC does 121 not protect privacy of DNS requests or responses. DNSoD works in 122 conjunction with DNSSEC, but DNSoD does not replace the need or value 123 of DNSSEC. 125 2. Terminology 127 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 128 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 129 "OPTIONAL" in this document are to be interpreted as described in 130 [RFC2119] . 132 3. Establishing and Managing DNS-over-DTLS Sessions 134 3.1. Session Initiation 136 DNSoD MUST run over standard UDP port 853 as defined in Section 7. 138 The host should determine if the DNS server supports DNSoD by sending 139 a DTLS ClientHello message. A DNS server that does not support DNSoD 140 will not respond to ClientHello messages sent by the client. If no 141 response is received from that server, and the client has no better 142 round-trip estimate, the client MUST retransmit the DTLS ClientHello 143 according to Section 4.2.4.1 of [RFC6347]. After 15 seconds, it MUST 144 cease attempts to re-transmit its ClientHello. The client MAY repeat 145 that procedure in the event the DNS server upgrades to support DNSoD, 146 but such probing SHOULD NOT be done more frequently than every 24 147 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. Behavior for an unsuccessful DTLS connection is 150 discussed in Section 6. 152 3.2. DTLS Handshake and Authentication 154 Once the DNS client succeeds in receiving HelloVerifyRequest from the 155 server via UDP on the well-known port for DNS over DTLS, it proceeds 156 with DTLS handshake as described in [RFC6347], following the best 157 practices specified in [RFC7525]. 159 DNS privacy requires encrypting the query (and response) from passive 160 attacks. Such encryption typically provides integrity protection as 161 a side-effect, which means on-path attackers cannot simply inject 162 bogus DNS responses. However, to provide stronger protection from 163 active attackers pretending to be the server, the server itself needs 164 to be authenticated. To authenticate the server providing DNS 165 privacy, DNS client can use the authenication mechanisms discussed in 166 [I-D.ietf-dprive-dtls-and-tls-profiles]. This document does not 167 propose new ideas for authentication. 169 After DTLS negotiation completes, the connection will be encrypted 170 and is now protected from eavesdropping. 172 3.3. Established Sessions 174 In DTLS, all data is protected using the same record encoding and 175 mechanisms. When the mechanism described in this document is in 176 effect, DNS messages are encrypted using the standard DTLS record 177 encoding. When a user of DTLS wishes to send an DNS message, it 178 delivers it to the DTLS implementation as an ordinary application 179 data write (e.g., SSL_write()). To reduce client and server 180 workload, clients SHOULD re-use the DTLS session. A single DTLS 181 session can be used to send multiple DNS requests and receive 182 multiple DNS responses. 184 DNSoD client and server can use DTLS heartbeat [RFC6520] to verify 185 that the peer still has DTLS state. DTLS session is terminated by 186 the receipt of an authenticated message that closes the connection 187 (e.g., a DTLS fatal alert). 189 Client Server 190 ------ ------ 192 ClientHello --------> 194 <------- HelloVerifyRequest 195 (contains cookie) 197 ClientHello --------> 198 (contains cookie) 199 (empty SessionTicket extension) 200 ServerHello 201 (empty SessionTicket extension) 202 Certificate* 203 ServerKeyExchange* 204 CertificateRequest* 205 <-------- ServerHelloDone 207 Certificate* 208 ClientKeyExchange 209 CertificateVerify* 210 (ChangeCipherSpec) 211 Finished --------> 212 NewSessionTicket 213 (ChangeCipherSpec) 214 <-------- Finished 216 DNS Request ---------> 218 <--------- DNS Response 220 Message Flow for Full Handshake Issuing New Session Ticket 222 4. Performance Considerations 224 To reduce number of octets of the DTLS handshake, especially the size 225 of the certificate in the ServerHello (which can be several 226 kilobytes), DNS client and server can use raw public keys [RFC7250] 227 or Cached Information Extension [I-D.ietf-tls-cached-info] . Cached 228 Information Extension avoids transmitting the server's certificate 229 and certificate chain if the client has cached that information from 230 a previous TLS handshake. 232 Since pipelined responses can arrive out of order, clients MUST match 233 responses to outstanding queries on the same DTLS connection using 234 the Message ID. If the response contains a question section, the 235 client MUST match the QNAME, QCLASS, and QTYPE fields. Failure by 236 clients to properly match responses to outstanding queries can have 237 serious consequences for interoperability ( [RFC7766] , Section 7). 239 It is highly advantageous to avoid server-side DTLS state and reduce 240 the number of new DTLS sessions on the server which can be done with 241 [RFC5077] . This also eliminates a round-trip for subsequent DNSoD 242 queries, because with [RFC5077] the DTLS session does not need to be 243 re-established. 245 Compared to normal DNS, DTLS adds at least 13 octets of header, plus 246 cipher and authentication overhead to every query and every response. 247 This reduces the size of the DNS payload that can be carried. DNS 248 client and server MUST support the EDNS0 option defined in [RFC6891] 249 so that the DNS client can indicate to the DNS server the maximum DNS 250 response size it can reassemble and deliver in the DNS client's 251 network stack. The client sets its EDNS0 value as if DTLS is not 252 being used. The DNS server must ensure that the DNS response size 253 does not exceed the Path MTU. The DNS server must consider the 254 amount of record expansion expected by the DTLS processing when 255 calculating the size of DNS response that fits within the path MTU. 256 Path MTU MUST be greater than equal to [DNS response size + DTLS 257 overhead of 13 octets + padding size ([RFC7830]) + authentication 258 overhead of the negotiated DTLS cipher suite + block padding 259 (Section 4.1.1.1 of [RFC6347]]. If the DNS server's response were to 260 exceed that calculated value, the server sends a response that does 261 fit within that value and sets the TC (truncated) bit. The client, 262 upon receiving a response with the TC bit set and wanting to receive 263 the entire response, establishes a DNS-over-TLS [RFC7858] connection 264 to the same server, and sends a new DNS request for the same resource 265 record. 267 DNSoD puts an additional computational load on servers. The largest 268 gain for privacy is to protect the communication between the DNS 269 client (the end user's machine) and its caching resolver. 271 5. Anycast 273 DNS servers are often configured with anycast addresses. While the 274 network is stable, packets transmitted from a particular source to an 275 anycast address will reach the same server that has the cryptographic 276 context from the DNS over DTLS handshake. But when the network 277 configuration changes, a DNS over DTLS packet can be received by a 278 server that does not have the necessary cryptographic context. To 279 encourage the client to initiate a new DTLS handshake, DNS servers 280 SHOULD generate a DTLS Alert message in response to receiving a DTLS 281 packet for which the server does not have any cryptographic context. 283 Upon receipt of an un-authenicated DTLS alert, the DTLS client 284 validates the Alert is within the replay window (Section 4.1.2.6 of 285 [RFC6347] ). It is difficult for the DTLS client to validate that 286 the DTLS alert was generated by the DTLS server in response to a 287 request or was generated by an on- or off-path attacker. Thus, upon 288 receipt of an in-window DTLS Alert, the client SHOULD continue re- 289 transmitting the DTLS packet (in the event the Alert was spoofed), 290 and at the same time it SHOULD initiate DTLS session resumption. 291 When the DTLS client receives authenticated DNS response from one of 292 those DTLS sessions, the other DTLS session should be terminated. 294 6. Usage 296 Using DNS privacy with an authenticated server is most preferred, DNS 297 privacy with an unauthenticated server is next preferred, and plain 298 DNS is least preferred. This section gives a non-normative 299 discussion on common behaviors and choices. 301 An implementation MAY attempt to obtain DNS privacy by contacting DNS 302 servers on the local network (provided by DHCP) and on the Internet, 303 and make those attempts in parallel to reduce user impact. If DNS 304 privacy cannot be successfully negotiated for whatever reason, the 305 client can do three things, in order from best to worst for privacy: 307 1. refuse to send DNS queries on this network, which means the 308 client cannot make effective use of this network, as modern 309 networks require DNS; or, 311 2. use opportunistic security, as described in [RFC7435] or, 313 3. send plain DNS queries on this network, which means no DNS 314 privacy is provided. 316 Heuristics can improve this situation, but only to a degree (e.g., 317 previous success of DNS privacy on this network may be reason to 318 alert the user about failure to establish DNS privacy on this network 319 now). Still, the client (in cooperation with the end user) has to 320 decide to use the network without the protection of DNS privacy. 322 7. IANA Considerations 324 This specification uses port 853 already allocated in the IANA port 325 number registry as defined in Section 6 of [RFC7858]. 327 8. Security Considerations 329 The interaction between a DNS client and DNS server requires Datagram 330 Transport Layer Security (DTLS) with a ciphersuite offering 331 confidentiality protection and guidance given in [RFC7525] must be 332 followed to avoid attacks on DTLS. DNS clients keeping track of 333 servers known to support DTLS enables clients to detect downgrade 334 attacks. To interfere with DNS over DTLS, an on- or off-path 335 attacker might send an ICMP message towards the DTLS client or DTLS 336 server. As these ICMP messages cannot be authenticated, all ICMP 337 errors should be treated as soft errors [RFC1122] . For servers with 338 no connection history and no apparent support for DTLS, depending on 339 their Privacy Profile and privacy requirements, clients may choose to 340 (a) try another server when available, (b) continue without DTLS, or 341 (c) refuse to forward the query. Once a DNSoD client has established 342 a security association with a particular DNS server, and outstanding 343 normal DNS queries with that server (if any) have been received, the 344 DNSoD client MUST ignore any subsequent normal DNS responses from 345 that server, as all subsequent responses should be encrypted. This 346 behavior mitigates all possible attacks described in Measures for 347 Making DNS More Resilient against Forged Answers [RFC5452] . 349 A malicious client might attempt to perform a high number of DTLS 350 handshakes with a server. As the clients are not uniquely identified 351 by the protocol and can be obfuscated with IPv4 address sharing and 352 with IPv6 temporary addresses, a server needs to mitigate the impact 353 of such an attack. Such mitigation might involve rate limiting 354 handshakes from a certain subnet or more advanced DoS/DDoS techniques 355 beyond the scope of this paper. 357 9. Acknowledgements 359 Thanks to Phil Hedrick for his review comments on TCP and to Josh 360 Littlefield for pointing out DNSoD load on busy servers (most notably 361 root servers). The authors would like to thank Simon Josefsson, 362 Daniel Kahn Gillmor, Bob Harold, Ilari Liusvaara, Sara Dickinson, 363 Christian Huitema, Stephane Bortzmeyer and Geoff Huston for 364 discussions and comments on the design of DNSoD. 366 10. References 368 10.1. Normative References 370 [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", 371 STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987, 372 . 374 [RFC1035] Mockapetris, P., "Domain names - implementation and 375 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 376 November 1987, . 378 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 379 Requirement Levels", BCP 14, RFC 2119, 380 DOI 10.17487/RFC2119, March 1997, 381 . 383 [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S. 384 Rose, "DNS Security Introduction and Requirements", 385 RFC 4033, DOI 10.17487/RFC4033, March 2005, 386 . 388 [RFC5077] Salowey, J., Zhou, H., Eronen, P., and H. Tschofenig, 389 "Transport Layer Security (TLS) Session Resumption without 390 Server-Side State", RFC 5077, DOI 10.17487/RFC5077, 391 January 2008, . 393 [RFC5452] Hubert, A. and R. van Mook, "Measures for Making DNS More 394 Resilient against Forged Answers", RFC 5452, 395 DOI 10.17487/RFC5452, January 2009, 396 . 398 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 399 Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, 400 January 2012, . 402 [RFC6520] Seggelmann, R., Tuexen, M., and M. Williams, "Transport 403 Layer Security (TLS) and Datagram Transport Layer Security 404 (DTLS) Heartbeat Extension", RFC 6520, 405 DOI 10.17487/RFC6520, February 2012, 406 . 408 [RFC6891] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms 409 for DNS (EDNS(0))", STD 75, RFC 6891, 410 DOI 10.17487/RFC6891, April 2013, 411 . 413 [RFC7525] Sheffer, Y., Holz, R., and P. Saint-Andre, 414 "Recommendations for Secure Use of Transport Layer 415 Security (TLS) and Datagram Transport Layer Security 416 (DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, May 417 2015, . 419 [RFC7830] Mayrhofer, A., "The EDNS(0) Padding Option", RFC 7830, 420 DOI 10.17487/RFC7830, May 2016, 421 . 423 10.2. Informative References 425 [I-D.ietf-dprive-dtls-and-tls-profiles] 426 Dickinson, S., Gillmor, D., and T. Reddy, "Authentication 427 and (D)TLS Profile for DNS-over-(D)TLS", draft-ietf- 428 dprive-dtls-and-tls-profiles-02 (work in progress), June 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-23 (work in progress), May 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 [RFC7858] Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., 465 and P. Hoffman, "Specification for DNS over Transport 466 Layer Security (TLS)", RFC 7858, DOI 10.17487/RFC7858, May 467 2016, . 469 Authors' Addresses 471 Tirumaleswar Reddy 472 Cisco Systems, Inc. 473 Cessna Business Park, Varthur Hobli 474 Sarjapur Marathalli Outer Ring Road 475 Bangalore, Karnataka 560103 476 India 478 Email: tireddy@cisco.com 480 Dan Wing 481 Cisco Systems, Inc. 482 170 West Tasman Drive 483 San Jose, California 95134 484 USA 486 Email: dwing@cisco.com 488 Prashanth Patil 489 Cisco Systems, Inc. 490 Bangalore 491 India 493 Email: praspati@cisco.com