idnits 2.17.1 draft-wing-dprive-dnsodtls-00.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 21, 2015) is 3294 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 362, but not defined ** 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) Summary: 4 errors (**), 0 flaws (~~), 2 warnings (==), 1 comment (--). 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 23, 2015 Cisco 6 April 21, 2015 8 DNS over DTLS (DNSoD) 9 draft-wing-dprive-dnsodtls-00 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 October 23, 2015. 44 Copyright Notice 46 Copyright (c) 2015 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. Anycast . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 74 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 75 12. Security Considerations . . . . . . . . . . . . . . . . . . . 9 76 13. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 9 77 14. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 78 14.1. Normative References . . . . . . . . . . . . . . . . . . 9 79 14.2. Informative References . . . . . . . . . . . . . . . . . 10 80 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 11 82 1. Introduction 84 The Domain Name System is specified in [RFC1034] and [RFC1035]. DNS 85 queries and responses are normally exchanged unencrypted and are thus 86 vulnerable to eavesdropping. Such eavesdropping can result in an 87 undesired entity learning domains that a host wishes to access, thus 88 resulting in privacy leakage. DNS privacy problem is further 89 discussed in [I-D.bortzmeyer-dnsop-dns-privacy]. 91 Active attackers have long been successful at injecting bogus 92 responses, causing cache poisoning and causing misdirection of the 93 subsequent connection (if attacking A or AAAA records). A popular 94 mitigation against that attack is to use ephemeral and random source 95 ports for DNS queries. 97 This document defines DNS over DTLS (DNSoD, pronounced "dee-enn-sod") 98 which provides confidential DNS communication for stub resolvers, 99 recursive resolvers, iterative resolvers and authoritative servers. 101 The motivations for proposing DNSoD are that 103 o TCP suffers from network head-of-line blocking, where the loss of 104 a packet causes all other TCP segments to not be delivered to the 105 application until the lost packet is re-transmitted. DNSoD, 106 because it uses UDP, does not suffer from network head-of-line 107 blocking. 109 o DTLS session resumption consumes 1 round trip whereas TLS session 110 resumption can start only after TCP handshake is complete. 111 Although TCP Fast Open [RFC7413] can reduce that handshake, TCP 112 Fast Open is not yet available in commercially-popular operating 113 systems. 115 2. Relationship to TCP Queries and to DNSSEC 117 DNS queries can be sent over UDP or TCP. The scope of this document, 118 however, is only UDP. DNS over TCP could be protected with TLS, as 119 described in [I-D.hzhwm-start-tls-for-dns]. Alternatively, a shim 120 protocol could be defined between DTLS and DNS, allowing large 121 responses to be sent over DTLS itself, see Section 7. 123 DNS Security Extensions (DNSSEC [RFC4033]) provides object integrity 124 of DNS resource records, allowing end-users (or their resolver) to 125 verify legitimacy of responses. However, DNSSEC does not protect 126 privacy of DNS requests or responses. DNSoD works in conjunction 127 with DNSSEC, but DNSoD does not replace the need or value of DNSSEC. 129 3. Common problems with DNS Privacy 131 This section describes problems common to any DNS privacy solution. 132 To achieve DNS privacy an encrypted and integrity-protected channel 133 is needed between the client and server. This channel can be 134 blocked, and the client needs to react to such blockages. 136 3.1. Firewall Blocking Ports or DNS Privacy Protocol 138 When sending DNS over an encrypted channel, there are two choices: 139 send the encrypted traffic over the DNS ports (UDP 53, TCP 53) or 140 send the encrypted traffic over a different port. The encrypted 141 traffic is not normal DNS traffic, but rather is a cryptographic 142 handshake followed by encrypted payloads. There can be firewalls, 143 other security devices, or intercepting DNS proxies which block the 144 non-DNS traffic or otherwise react negatively (e.g., quarantining the 145 host for suspicious behavior). Alternatively, if a different port is 146 used for the encrypted traffic, a firewall or other security device 147 might block that port or otherwise react negatively. 149 There is no panacea, and only experiments on the Internet will 150 uncover which technique or combination of techniques will work best. 151 The authors believe a combination of techniques will be necessary, as 152 that has proven necessary with other protocols that desire to work on 153 existing networks. 155 3.2. Authenticating the DNS Privacy Server 157 DNS privacy requires encrypting the query (and response) from passive 158 attacks. Such encryption typically provides integrity protection as 159 a side-effect, which means on-path attackers cannot simply inject 160 bogus DNS responses. However, to provide stronger protection from 161 active attackers pretending to be the server, the server itself needs 162 to be authenticated. 164 To authenticate the server providing DNS privacy, the DNS client 165 needs to be configured with the names of those DNS privacy servers. 166 When connecting a DNS privacy server, the server's IP address can be 167 converted to its hostname by doing a DNS PTR lookup, verifying that 168 the name matches the pre-configured list of DNS privacy servers, and 169 finally validating its certificate trust chain or a local list of 170 certificates. For DNS privacy servers that don't have a certificate 171 trust chain (e.g.,, because they are on a home network or a corporate 172 network), the configured list of DNS privacy servers can contain the 173 certificate fingerprint of the DNS privacy server (i.e., a simple 174 whitelist of name and certificate fingerprint). 176 3.3. Downgrade attacks 178 Using DNS privacy with an authenticated server is most preferred, DNS 179 privacy with an unauthenticated server is next preferred, and plain 180 DNS is least preferred. An implementation will attempt to obtain DNS 181 privacy by contacting DNS servers on the local network (provided by 182 DHCP) and on the Internet, and will make those attempts in parallel 183 to reduce user impact. If DNS privacy cannot be successfully 184 negotiated for whatever reason, client can do three things: 186 1. refuse to send DNS queries on this network, which means the 187 client can not make effective use of this network, as modern 188 networks require DNS; or, 190 2. use DNS privacy with an un-authorized server, which means an 191 attacker could be spoofing the handshake with the DNS privacy 192 server; or, 194 3. send plain DNS queries on this network, which means no DNS 195 privacy is provided. 197 Heuristics can improve this situation, but only to a degree (e.g., 198 previous success of DNS privacy on this network may be reason to 199 alert the user about failure to establish DNS privacy on this network 200 now). Still, the client (in cooperation with the end user) has to 201 decide to use the network without the protection of DNS privacy. 203 4. Terminology 205 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 206 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 207 "OPTIONAL" in this document are to be interpreted as described in 208 [RFC2119]. 210 5. Incremental Deployment 212 DNSoD can be deployed incrementally by the Internet Service Provider 213 or as an Internet service. 215 If the ISP's DNS resolver supports DNSoD, then DNS queries are 216 protected from passive listening and from many active attacks along 217 that path. 219 DNSoD can be offered as an Internet service, and a stub resolver or 220 DNS resolver can be configured to point to that DNSoD server (rather 221 than to the ISP-provided DNS server). 223 6. Demultiplexing, Polling, Port Usage, and Discovery 225 [Note - This section requires further discussion] 227 Many modern operating systems already detect if a web proxy is 228 interfering with Internet communications, using proprietary 229 mechanisms that are out of scope of this document. After that 230 mechanism has run (and detected Internet connectivity is working), 231 the DNSoD procedure described in this document should commence. This 232 timing avoids delays in joining the network (and displaying an icon 233 indicating successful Internet connection), at the risk that those 234 initial DNS queries will be sent without protection afforded by 235 DNSoD. 237 DNSoD can run over standard UDP port 53 as defined in [RFC1035]. A 238 DNS client or server that does not implement this specification will 239 not respond to the incoming DTLS packets because they don't parse as 240 DNS packets (the DNS Opcode would be 15, which is undefined). A DNS 241 client or server that does implement this specification can 242 demultiplex DNS and DTLS packets by examining the third octet. For 243 TLS 1.2, which is what is defined by this specification, a DTLS 244 packet will contain 253 in the third octet, whereas a DNS packet will 245 never contain 253 in the third octet. 247 There has been some concern with sending DNSoD traffic over the same 248 port as normal, un-encrypted DNS traffic. The intent of this section 249 is to show that DNSoD could successfully be sent over port 53. 250 Further analysis and testing on the Internet may be valuable to 251 determine if multiplexing on port 53, using a separate port, or some 252 fallback between a separate port and port 53 brings the most success. 254 After performing the above steps, the host should determine if the 255 DNS server supports DNSoD by sending a DTLS ClientHello message. A 256 DNS server that does not support DNSoD will not respond to 257 ClientHello messages sent by the client, because they are not valid 258 DNS requests (specifically, the DNS Opcode is invalid). The client 259 MUST use timer values defined in Section 4.2.4.1 of [RFC6347] for 260 retransmission of ClientHello message and if no response is received 261 from the DNS server. After 15 seconds, it MUST cease attempts to re- 262 transmit its ClientHello. Thereafter, the client MAY repeat that 263 procedure in the event the DNS server has been upgraded to support 264 DNSoD, but such probing SHOULD NOT be done more frequently than every 265 24 hours and MUST NOT be done more frequently than every 15 minutes. 266 This mechanism requires no additional signaling between the client 267 and server. 269 7. Performance Considerations 271 To reduce number of octets of the DTLS handshake, especially the size 272 of the certificate in the ServerHello (which can be several 273 kilobytes), we should consider using plain public keys 274 [I-D.ietf-tls-oob-pubkey]. Considering that to authorize a certain 275 DNS server the client already needs explicit configuration of the DNS 276 servers it trusts, maybe the public key configuration problem is 277 really no worse than the configuration problem of those whitelisted 278 certificates? 280 Multiple DNS queries can be sent over a single DNSoD security 281 association. The existing QueryID allows multiple requests and 282 responses to be interleaved in whatever order they can be fulfilled 283 by the DNS server. This means DNSoD reduces the consumption of UDP 284 port numbers, and because DTLS protects the communication between the 285 DNS client and its server, the resolver SHOULD NOT use random 286 ephemeral source ports (Section 9.2 of [RFC5452]) because such source 287 port use would incur additional, unnecessary DTLS load on the DNSoD 288 server. 290 It is highly advantageous to avoid server-side DTLS state and reduce 291 the number of new DTLS security associations on the server which can 292 be done with [RFC5077]. This also eliminates a round-trip for 293 subsequent DNSoD queries, because with [RFC5077] the DTLS security 294 association does not need to be re-established. Note: with the shim 295 (described below) perhaps we could send the query and the restore 296 server-side state in the ClientHello packet. 298 Compared to normal DNS, DTLS adds at least 13 octets of header, plus 299 cipher and authentication overhead to every query and every response. 300 This reduces the size of the DNS payload that can be carried. 301 Certain DNS responses are large (e.g., many AAAA records, TXT, SRV) 302 and don't fit into a single UDP packet, causing a partial response 303 with the truncation (TC) bit set. The client is then expected to 304 repeat the query over TCP, which causes additional name resolution 305 delay. We have considered two ideas, one that reduces the need to 306 switch to TCP and another that eliminates the need to switch to TCP: 308 o Path MTU can be determined using Packetization Layer Path MTU 309 Discovery [RFC4821] using DTLS heartbeat. [RFC4821] does not rely 310 on ICMP or ICMPv6, and would not affect DNS state or 311 responsiveness on the client or server. However, it would be 312 additional chattiness. 314 o To avoid IP fragmentation, DTLS handshake messages incorporate 315 their own fragment offset and fragment length. We might utilize a 316 similar mechanism in a shim layer between DTLS and DNS, so that 317 large DNS messages could be carried without causing IP 318 fragmentation. 320 DNSoD puts an additional computational load on servers. The largest 321 gain for privacy is to protect the communication between the DNS 322 client (the end user's machine) and its caching resolver. Because of 323 the load imposed, and because of the infrequency of queries to root 324 servers means the DTLS overhead is unlikely to be amoritized over the 325 DNS queries sent over that DTLS connection, implementing DNSoD on 326 root servers is NOT RECOMMENDED. 328 8. Established sessions 330 In DTLS, all data is protected using the same record encoding and 331 mechanisms. When the mechanism described in this document is in 332 effect, DNS messages are encrypted using the standard DTLS record 333 encoding. When a user of DTLS wishes to send an DNS message, it 334 delivers it to the DTLS implementation as an ordinary application 335 data write (e.g., SSL_write()). A single DTLS session can be used to 336 receive multiple DNS requests and generate DNS multiple responses. 338 Client Server 339 ------ ------ 341 ClientHello --------> 343 <------- HelloVerifyRequest 344 (contains cookie) 346 ClientHello --------> 347 (contains cookie) 348 (empty SessionTicket extension) 349 ServerHello 350 (empty SessionTicket extension) 351 Certificate* 352 ServerKeyExchange* 353 CertificateRequest* 354 <-------- ServerHelloDone 356 Certificate* 357 ClientKeyExchange 358 CertificateVerify* 359 [ChangeCipherSpec] 360 Finished --------> 361 NewSessionTicket 362 [ChangeCipherSpec] 363 <-------- Finished 365 DNS Request ---------> 367 <--------- DNS Response 369 Message Flow for Full Handshake Issuing New Session Ticket 371 9. DTLS Features and Cipher Suites 373 To improve interoperability, the set of DTLS features and cipher 374 suites is restricted. The DTLS implementation MUST disable 375 compression. DTLS compression can lead to the exposure of 376 information that would not otherwise be revealed [RFC3749]. Generic 377 compression is unnecessary since DNS provides compression features 378 itself. DNS over DTLS MUST only be used with cipher suites that have 379 ephemeral key exchange, such as the ephemeral Diffie-Hellman (DHE) 380 [RFC5246] or the elliptic curve variant (ECDHE) [RFC4492]. Ephemeral 381 key exchange MUST have a minimum size of 2048 bits for DHE or 382 security level of 128 bits for ECDHE. Authenticated Encryption with 383 Additional Data (AEAD) modes, such as the Galois Counter Model (GCM) 384 mode for AES [RFC5288] are acceptable. 386 10. Anycast 388 DNS servers are often configured with anycast addresses. While the 389 network is stable, packets transmitted from a particular source to an 390 anycast address will reach the same server that has the cryptographic 391 context from the DNS over DTLS handshake. But when the network 392 configuration changes,a DNS over DTLS packet can be received by a 393 server that does not have the necessary cryptographic context. To 394 encourage the client to initiate a new DTLS handshake, DNS servers 395 SHOULD generate a DTLS Alert message in response to receiving a DTLS 396 packet for which the server does not have any cryptographic context. 398 11. IANA Considerations 400 If demultiplexing DTLS and DNS (using the third octet, Section 6) is 401 useful, we should reserve DNS Opcode 15 to ensure DNS always has a 0 402 bit where DTLS always has a 1 bit. 404 12. Security Considerations 406 Once a DNSoD client has established a security association with a 407 particular DNS server, and outstanding normal DNS queries with that 408 server (if any) have been received, the DNSoD client MUST ignore any 409 subsequent normal DNS responses from that server, as all subsequent 410 responses should be inside DNSoD. This behavior mitigates all (?) 411 attacks described in Measures for Making DNS More Resilient against 412 Forged Answers [RFC5452]. 414 Security considerations discussed in DTLS [RFC6347] also apply to 415 this document. 417 13. Acknowledgements 419 Thanks to Phil Hedrick for his review comments on TCP and to Josh 420 Littlefield for pointing out DNSoD load on busy servers (most notably 421 root servers). 423 14. References 425 14.1. Normative References 427 [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", 428 STD 13, RFC 1034, November 1987. 430 [RFC1035] Mockapetris, P., "Domain names - implementation and 431 specification", STD 13, RFC 1035, November 1987. 433 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 434 Requirement Levels", BCP 14, RFC 2119, March 1997. 436 [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S. 437 Rose, "DNS Security Introduction and Requirements", RFC 438 4033, March 2005. 440 [RFC4492] Blake-Wilson, S., Bolyard, N., Gupta, V., Hawk, C., and B. 441 Moeller, "Elliptic Curve Cryptography (ECC) Cipher Suites 442 for Transport Layer Security (TLS)", RFC 4492, May 2006. 444 [RFC5077] Salowey, J., Zhou, H., Eronen, P., and H. Tschofenig, 445 "Transport Layer Security (TLS) Session Resumption without 446 Server-Side State", RFC 5077, January 2008. 448 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 449 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 451 [RFC5288] Salowey, J., Choudhury, A., and D. McGrew, "AES Galois 452 Counter Mode (GCM) Cipher Suites for TLS", RFC 5288, 453 August 2008. 455 [RFC5452] Hubert, A. and R. van Mook, "Measures for Making DNS More 456 Resilient against Forged Answers", RFC 5452, January 2009. 458 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 459 Security Version 1.2", RFC 6347, January 2012. 461 14.2. Informative References 463 [I-D.bortzmeyer-dnsop-dns-privacy] 464 Bortzmeyer, S., "DNS privacy considerations", draft- 465 bortzmeyer-dnsop-dns-privacy-02 (work in progress), April 466 2014. 468 [I-D.hzhwm-start-tls-for-dns] 469 Zi, Z., Zhu, L., Heidemann, J., Mankin, A., and D. 470 Wessels, "Starting TLS over DNS", draft-hzhwm-start-tls- 471 for-dns-01 (work in progress), July 2014. 473 [I-D.ietf-tls-oob-pubkey] 474 Wouters, P., Tschofenig, H., Gilmore, J., Weiler, S., and 475 T. Kivinen, "Using Raw Public Keys in Transport Layer 476 Security (TLS) and Datagram Transport Layer Security 477 (DTLS)", draft-ietf-tls-oob-pubkey-11 (work in progress), 478 January 2014. 480 [RFC3749] Hollenbeck, S., "Transport Layer Security Protocol 481 Compression Methods", RFC 3749, May 2004. 483 [RFC4821] Mathis, M. and J. Heffner, "Packetization Layer Path MTU 484 Discovery", RFC 4821, March 2007. 486 [RFC7413] Cheng, Y., Chu, J., Radhakrishnan, S., and A. Jain, "TCP 487 Fast Open", RFC 7413, December 2014. 489 Authors' Addresses 491 Tirumaleswar Reddy 492 Cisco Systems, Inc. 493 Cessna Business Park, Varthur Hobli 494 Sarjapur Marathalli Outer Ring Road 495 Bangalore, Karnataka 560103 496 India 498 Email: tireddy@cisco.com 500 Dan Wing 501 Cisco Systems, Inc. 502 170 West Tasman Drive 503 San Jose, California 95134 504 USA 506 Email: dwing@cisco.com 508 Prashanth Patil 509 Cisco Systems, Inc. 510 Bangalore 511 India 513 Email: praspati@cisco.com