idnits 2.17.1 draft-wing-dnsop-dnsodtls-01.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 3, 2014) is 3584 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 347, but not defined == Unused Reference: 'RFC3596' is defined on line 409, but no explicit reference was found in the text == Unused Reference: 'RFC6891' is defined on line 438, but no explicit reference was found in the text == Unused Reference: 'RFC4892' is defined on line 466, but no explicit reference was found in the text ** Obsolete normative reference: RFC 4492 (Obsoleted by RFC 8422) ** Obsolete normative reference: RFC 5077 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 6347 (Obsoleted by RFC 9147) == Outdated reference: A later version (-01) exists of draft-hzhwm-start-tls-for-dns-00 Summary: 4 errors (**), 0 flaws (~~), 6 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 DNSOP Working Group T. Reddy 3 Internet-Draft D. Wing 4 Intended status: Standards Track P. Patil 5 Expires: January 4, 2015 Cisco 6 July 3, 2014 8 DNS over DTLS (DNSoD) 9 draft-wing-dnsop-dnsodtls-01 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 the default DNS port and can also run over an 25 alternate port. 27 Status of This Memo 29 This Internet-Draft is submitted in full conformance with the 30 provisions of BCP 78 and BCP 79. 32 Internet-Drafts are working documents of the Internet Engineering 33 Task Force (IETF). Note that other groups may also distribute 34 working documents as Internet-Drafts. The list of current Internet- 35 Drafts is at http://datatracker.ietf.org/drafts/current/. 37 Internet-Drafts are draft documents valid for a maximum of six months 38 and may be updated, replaced, or obsoleted by other documents at any 39 time. It is inappropriate to use Internet-Drafts as reference 40 material or to cite them other than as "work in progress." 42 This Internet-Draft will expire on January 4, 2015. 44 Copyright Notice 46 Copyright (c) 2014 IETF Trust and the persons identified as the 47 document authors. All rights reserved. 49 This document is subject to BCP 78 and the IETF Trust's Legal 50 Provisions Relating to IETF Documents 51 (http://trustee.ietf.org/license-info) in effect on the date of 52 publication of this document. Please review these documents 53 carefully, as they describe your rights and restrictions with respect 54 to this document. Code Components extracted from this document must 55 include Simplified BSD License text as described in Section 4.e of 56 the Trust Legal Provisions and are provided without warranty as 57 described in the Simplified BSD License. 59 Table of Contents 61 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 62 2. Relationship to TCP Queries and to DNSSEC . . . . . . . . . . 3 63 3. Common problems with DNS Privacy . . . . . . . . . . . . . . 3 64 3.1. Firewall Blocking Ports or DNS Privacy Protocol . . . . . 3 65 3.2. Authenticating the DNS Privacy Server . . . . . . . . . . 4 66 3.3. Downgrade attacks . . . . . . . . . . . . . . . . . . . . 4 67 4. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 68 5. Incremental Deployment . . . . . . . . . . . . . . . . . . . 5 69 6. Demultiplexing, Polling, Port Usage, and Discovery . . . . . 5 70 7. Performance Considerations . . . . . . . . . . . . . . . . . 6 71 8. Established sessions . . . . . . . . . . . . . . . . . . . . 7 72 9. DTLS Features and Cipher Suites . . . . . . . . . . . . . . . 8 73 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 74 11. Security Considerations . . . . . . . . . . . . . . . . . . . 9 75 12. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 9 76 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 77 13.1. Normative References . . . . . . . . . . . . . . . . . . 9 78 13.2. Informative References . . . . . . . . . . . . . . . . . 10 79 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 11 81 1. Introduction 83 The Domain Name System is specified in [RFC1034] and [RFC1035]. DNS 84 queries and responses are normally exchanged unencrypted and are thus 85 vulnerable to eavesdropping. Such eavesdropping can result in an 86 undesired entity learning domains that a host wishes to access, thus 87 resulting in privacy leakage. DNS privacy problem is further 88 discussed in [I-D.bortzmeyer-dnsop-dns-privacy]. 90 Active attackers have long been successful at injecting bogus 91 responses, causing cache poisoning and causing misdirection of the 92 subsequent connection (if attacking A or AAAA records). A popular 93 mitigation against that attack is to use ephemeral and random source 94 ports for DNS queries. 96 This document defines DNS over DTLS (DNSoD, pronounced "dee-enn-sod") 97 which provides confidential DNS communication for stub resolvers, 98 recursive resolvers, iterative resolvers and authoritative servers. 100 2. Relationship to TCP Queries and to DNSSEC 102 DNS queries can be sent over UDP or TCP. The scope of this document, 103 however, is only UDP. DNS over TCP could be protected with TLS, as 104 described in [I-D.hzhwm-start-tls-for-dns]. Alternatively, a shim 105 protocol could be defined between DTLS and DNS, allowing large 106 responses to be sent over DTLS itself, see Section 7. 108 DNS Security Extensions (DNSSEC [RFC4033]) provides object integrity 109 of DNS resource records, allowing end-users (or their resolver) to 110 verify legitimacy of responses. However, DNSSEC does not protect 111 privacy of DNS requests or responses. DNSoD works in conjunction 112 with DNSSEC, but DNSoD does not replace the need or value of DNSSEC. 114 3. Common problems with DNS Privacy 116 This section describes problems common to any DNS privacy solution. 117 To achieve DNS privacy an encrypted and integrity-protected channel 118 is needed between the client and server. This channel can be 119 blocked, and the client needs to react to such blockages. 121 3.1. Firewall Blocking Ports or DNS Privacy Protocol 123 When sending DNS over an encrypted channel, there are two choices: 124 send the encrypted traffic over the DNS ports (UDP 53, TCP 53) or 125 send the encrypted traffic over a different port. The encrypted 126 traffic is not normal DNS traffic, but rather is a cryptographic 127 handshake followed by encrypted payloads. There can be firewalls, 128 other security devices, or intercepting DNS proxies which block the 129 non-DNS traffic or otherwise react negatively (e.g., quarantining the 130 host for suspicious behavior). Alternatively, if a different port is 131 used for the encrypted traffic, a firewall or other security device 132 might block that port or otherwise react negatively. 134 There is no panacea, and only experiments on the Internet will 135 uncover which technique or combination of techniques will work best. 136 The authors believe a combination of techniques will be necessary, as 137 that has proven necessary with other protocols that desire to work on 138 existing networks. 140 3.2. Authenticating the DNS Privacy Server 142 DNS privacy requires encrypting the query (and response) from passive 143 attacks. Such encryption typically provides integrity protection as 144 a side-effect, which means on-path attackers cannot simply inject 145 bogus DNS responses. However, to provide stronger protection from 146 active attackers pretending to be the server, the server itself needs 147 to be authenticated. 149 To authenticate the server providing DNS privacy, the DNS client 150 needs to be configured with the names of those DNS privacy servers. 151 When connecting a DNS privacy server, the server's IP address can be 152 converted to its hostname by doing a DNS PTR lookup, verifying that 153 the name matches the pre-configured list of DNS privacy servers, and 154 finally validating its certificate trust chain or a local list of 155 certificates. For DNS privacy servers that don't have a certificate 156 trust chain (e.g.,, because they are on a home network or a corporate 157 network), the configured list of DNS privacy servers can contain the 158 certificate fingerprint of the DNS privacy server (i.e., a simple 159 whitelist of name and certificate fingerprint). 161 3.3. Downgrade attacks 163 Using DNS privacy with an authenticated server is most preferred, DNS 164 privacy with an unauthenticated server is next preferred, and plain 165 DNS is least preferred. An implementation will attempt to obtain DNS 166 privacy by contacting DNS servers on the local network (provided by 167 DHCP) and on the Internet, and will make those attempts in parallel 168 to reduce user impact. If DNS privacy cannot be successfully 169 negotiated for whatever reason, client can do three things: 171 1. refuse to send DNS queries on this network, which means the 172 client can not make effective use of this network, as modern 173 networks require DNS; or, 175 2. use DNS privacy with an un-authorized server, which means an 176 attacker could be spoofing the handshake with the DNS privacy 177 server; or, 179 3. send plain DNS queries on this network, which means no DNS 180 privacy is provided. 182 Heuristics can improve this situation, but only to a degree (e.g., 183 previous success of DNS privacy on this network may be reason to 184 alert the user about failure to establish DNS privacy on this network 185 now). Still, the client (in cooperation with the end user) has to 186 decide to use the network without the protection of DNS privacy. 188 4. Terminology 190 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 191 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 192 "OPTIONAL" in this document are to be interpreted as described in 193 [RFC2119]. 195 5. Incremental Deployment 197 DNSoD can be deployed incrementally by the Internet Service Provider 198 or as an Internet service. 200 If the ISP's DNS resolver supports DNSoD, then DNS queries are 201 protected from passive listening and from many active attacks along 202 that path. 204 DNSoD can be offered as an Internet service, and a stub resolver or 205 DNS resolver can be configured to point to that DNSoD server (rather 206 than to the ISP-provided DNS server). 208 6. Demultiplexing, Polling, Port Usage, and Discovery 210 [Note - This section requires further discussion] 212 Many modern operating systems already detect if a web proxy is 213 interfering with Internet communications, using proprietary 214 mechanisms that are out of scope of this document. After that 215 mechanism has run (and detected Internet connectivity is working), 216 the DNSoD procedure described in this document should commence. This 217 timing avoids delays in joining the network (and displaying an icon 218 indicating successful Internet connection), at the risk that those 219 initial DNS queries will be sent without protection afforded by 220 DNSoD. 222 DNSoD can run over standard UDP port 53 as defined in [RFC1035]. A 223 DNS client or server that does not implement this specification will 224 not respond to the incoming DTLS packets because they don't parse as 225 DNS packets (the DNS Opcode would be 15, which is undefined). A DNS 226 client or server that does implement this specification can 227 demultiplex DNS and DTLS packets by examining the third octet. For 228 TLS 1.2, which is what is defined by this specification, a DTLS 229 packet will contain 253 in the third octet, whereas a DNS packet will 230 never contain 253 in the third octet. 232 There has been some concern with sending DNSoD traffic over the same 233 port as normal, un-encrypted DNS traffic. The intent of this section 234 is to show that DNSoD could successfully be sent over port 53. 235 Further analysis and testing on the Internet may be valuable to 236 determine if multiplexing on port 53, using a separate port, or some 237 fallback between a separate port and port 53 brings the most success. 239 After performing the above steps, the host should determine if the 240 DNS server supports DNSoD by sending a DTLS ClientHello message. A 241 DNS server that does not support DNSoD will not respond to 242 ClientHello messages sent by the client, because they are not valid 243 DNS requests (specifically, the DNS Opcode is invalid). The client 244 MUST use timer values defined in Section 4.2.4.1 of [RFC6347] for 245 retransmission of ClientHello message and if no response is received 246 from the DNS server. After 15 seconds, it MUST cease attempts to re- 247 transmit its ClientHello. Thereafter, the client MAY repeat that 248 procedure in the event the DNS server has been upgraded to support 249 DNSoD, but such probing SHOULD NOT be done more frequently than every 250 24 hours and MUST NOT be done more frequently than every 15 minutes. 251 This mechanism requires no additional signaling between the client 252 and server. 254 7. Performance Considerations 256 To reduce number of octets of the DTLS handshake, especially the size 257 of the certificate in the ServerHello (which can be several 258 kilobytes), we should consider using plain public keys 259 [I-D.ietf-tls-oob-pubkey]. Considering that to authorize a certain 260 DNS server the client already needs explicit configuration of the DNS 261 servers it trusts, maybe the public key configuration problem is 262 really no worse than the configuration problem of those whitelisted 263 certificates? 265 Multiple DNS queries can be sent over a single DNSoD security 266 association. The existing QueryID allows multiple requests and 267 responses to be interleaved in whatever order they can be fulfilled 268 by the DNS server. This means DNSoD reduces the consumption of UDP 269 port numbers, and because DTLS protects the communication between the 270 DNS client and its server, the resolver SHOULD NOT use random 271 ephemeral source ports (Section 9.2 of [RFC5452]) because such source 272 port use would incur additional, unnecessary DTLS load on the DNSoD 273 server. 275 It is highly advantageous to avoid server-side DTLS state and reduce 276 the number of new DTLS security associations on the server which can 277 be done with [RFC5077]. This also eliminates a round-trip for 278 subsequent DNSoD queries, because with [RFC5077] the DTLS security 279 association does not need to be re-established. Note: with the shim 280 (described below) perhaps we could send the query and the restore 281 server-side state in the ClientHello packet. 283 Compared to normal DNS, DTLS adds at least 13 octets of header, plus 284 cipher and authentication overhead to every query and every response. 285 This reduces the size of the DNS payload that can be carried. 286 Certain DNS responses are large (e.g., many AAAA records, TXT, SRV) 287 and don't fit into a single UDP packet, causing a partial response 288 with the truncation (TC) bit set. The client is then expected to 289 repeat the query over TCP, which causes additional name resolution 290 delay. We have considered two ideas, one that reduces the need to 291 switch to TCP and another that eliminates the need to switch to TCP: 293 o Path MTU can be determined using Packetization Layer Path MTU 294 Discovery [RFC4821] using DTLS heartbeat. [RFC4821] does not rely 295 on ICMP or ICMPv6, and would not affect DNS state or 296 responsiveness on the client or server. However, it would be 297 additional chattiness. 299 o To avoid IP fragmentation, DTLS handshake messages incorporate 300 their own fragment offset and fragment length. We might utilize a 301 similar mechanism in a shim layer between DTLS and DNS, so that 302 large DNS messages could be carried without causing IP 303 fragmentation. 305 DNSoD puts an additional computational load on servers. The largest 306 gain for privacy is to protect the communication between the DNS 307 client (the end user's machine) and its caching resolver. Because of 308 the load imposed, and because of the infrequency of queries to root 309 servers means the DTLS overhead is unlikely to be amoritized over the 310 DNS queries sent over that DTLS connection, implementing DNSoD on 311 root servers is NOT RECOMMENDED. 313 8. Established sessions 315 In DTLS, all data is protected using the same record encoding and 316 mechanisms. When the mechanism described in this document is in 317 effect, DNS messages are encrypted using the standard DTLS record 318 encoding. When a user of DTLS wishes to send an DNS message, it 319 delivers it to the DTLS implementation as an ordinary application 320 data write (e.g., SSL_write()). A single DTLS session can be used to 321 receive multiple DNS requests and generate DNS multiple responses. 323 Client Server 324 ------ ------ 326 ClientHello --------> 328 <------- HelloVerifyRequest 329 (contains cookie) 331 ClientHello --------> 332 (contains cookie) 333 (empty SessionTicket extension) 334 ServerHello 335 (empty SessionTicket extension) 336 Certificate* 337 ServerKeyExchange* 338 CertificateRequest* 339 <-------- ServerHelloDone 341 Certificate* 342 ClientKeyExchange 343 CertificateVerify* 344 [ChangeCipherSpec] 345 Finished --------> 346 NewSessionTicket 347 [ChangeCipherSpec] 348 <-------- Finished 350 DNS Request ---------> 352 <--------- DNS Response 354 Message Flow for Full Handshake Issuing New Session Ticket 356 9. DTLS Features and Cipher Suites 358 To improve interoperability, the set of DTLS features and cipher 359 suites is restricted. The DTLS implementation MUST disable 360 compression. DTLS compression can lead to the exposure of 361 information that would not otherwise be revealed [RFC3749]. Generic 362 compression is unnecessary since DNS provides compression features 363 itself. DNS over DTLS MUST only be used with cipher suites that have 364 ephemeral key exchange, such as the ephemeral Diffie-Hellman (DHE) 365 [RFC5246] or the elliptic curve variant (ECDHE) [RFC4492]. Ephemeral 366 key exchange MUST have a minimum size of 2048 bits for DHE or 367 security level of 128 bits for ECDHE. Authenticated Encryption with 368 Additional Data (AEAD) modes, such as the Galois Counter Model (GCM) 369 mode for AES [RFC5288] are acceptable. 371 10. IANA Considerations 373 If demultiplexing DTLS and DNS (using the third octet, Section 6) is 374 useful, we should reserve DNS Opcode 15 to ensure DNS always has a 0 375 bit where DTLS always has a 1 bit. 377 11. Security Considerations 379 Once a DNSoD client has established a security association with a 380 particular DNS server, and outstanding normal DNS queries with that 381 server (if any) have been received, the DNSoD client MUST ignore any 382 subsequent normal DNS responses from that server, as all subsequent 383 responses should be inside DNSoD. This behavior mitigates all (?) 384 attacks described in Measures for Making DNS More Resilient against 385 Forged Answers [RFC5452]. 387 Security considerations discussed in DTLS [RFC6347] also apply to 388 this document. 390 12. Acknowledgements 392 Thanks to Phil Hedrick for his review comments on TCP and to Josh 393 Littlefield for pointing out DNSoD load on busy servers (most notably 394 root servers). 396 13. References 398 13.1. Normative References 400 [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", 401 STD 13, RFC 1034, November 1987. 403 [RFC1035] Mockapetris, P., "Domain names - implementation and 404 specification", STD 13, RFC 1035, November 1987. 406 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 407 Requirement Levels", BCP 14, RFC 2119, March 1997. 409 [RFC3596] Thomson, S., Huitema, C., Ksinant, V., and M. Souissi, 410 "DNS Extensions to Support IP Version 6", RFC 3596, 411 October 2003. 413 [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S. 414 Rose, "DNS Security Introduction and Requirements", RFC 415 4033, March 2005. 417 [RFC4492] Blake-Wilson, S., Bolyard, N., Gupta, V., Hawk, C., and B. 418 Moeller, "Elliptic Curve Cryptography (ECC) Cipher Suites 419 for Transport Layer Security (TLS)", RFC 4492, May 2006. 421 [RFC5077] Salowey, J., Zhou, H., Eronen, P., and H. Tschofenig, 422 "Transport Layer Security (TLS) Session Resumption without 423 Server-Side State", RFC 5077, January 2008. 425 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 426 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 428 [RFC5288] Salowey, J., Choudhury, A., and D. McGrew, "AES Galois 429 Counter Mode (GCM) Cipher Suites for TLS", RFC 5288, 430 August 2008. 432 [RFC5452] Hubert, A. and R. van Mook, "Measures for Making DNS More 433 Resilient against Forged Answers", RFC 5452, January 2009. 435 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 436 Security Version 1.2", RFC 6347, January 2012. 438 [RFC6891] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms 439 for DNS (EDNS(0))", STD 75, RFC 6891, April 2013. 441 13.2. Informative References 443 [I-D.bortzmeyer-dnsop-dns-privacy] 444 Bortzmeyer, S., "DNS privacy considerations", draft- 445 bortzmeyer-dnsop-dns-privacy-02 (work in progress), April 446 2014. 448 [I-D.hzhwm-start-tls-for-dns] 449 Zi, Z., Zhu, L., Heidemann, J., Mankin, A., and D. 450 Wessels, "Starting TLS over DNS", draft-hzhwm-start-tls- 451 for-dns-00 (work in progress), February 2014. 453 [I-D.ietf-tls-oob-pubkey] 454 Wouters, P., Tschofenig, H., Gilmore, J., Weiler, S., and 455 T. Kivinen, "Using Raw Public Keys in Transport Layer 456 Security (TLS) and Datagram Transport Layer Security 457 (DTLS)", draft-ietf-tls-oob-pubkey-11 (work in progress), 458 January 2014. 460 [RFC3749] Hollenbeck, S., "Transport Layer Security Protocol 461 Compression Methods", RFC 3749, May 2004. 463 [RFC4821] Mathis, M. and J. Heffner, "Packetization Layer Path MTU 464 Discovery", RFC 4821, March 2007. 466 [RFC4892] Woolf, S. and D. Conrad, "Requirements for a Mechanism 467 Identifying a Name Server Instance", RFC 4892, June 2007. 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