idnits 2.17.1 draft-ietf-dprive-dnsodtls-02.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 : ---------------------------------------------------------------------------- == There are 2 instances of lines with non-RFC2606-compliant FQDNs in the document. == There are 2 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. == There are 1 instance of lines with private range IPv4 addresses in the document. If these are generic example addresses, they should be changed to use any of the ranges defined in RFC 6890 (or successor): 192.0.2.x, 198.51.100.x or 203.0.113.x. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'MUST not' in this paragraph: Multiple DNS queries can be sent over a single DTLS session and the DNSoD client need not wait for an outstanding reply before sending the next query. The existing Query ID allows multiple requests and responses to be interleaved in whatever order they can be fulfilled by the DNS server. This means DNSoD reduces the consumption of UDP port numbers, and because DTLS protects the communication between the DNS client and its server, the resolver SHOULD NOT use random ephemeral source ports (Section 9.2 of [RFC5452]) because such source port use would incur additional, unnecessary DTLS load on the DNSoD server. When sending multiple queries over a single DTLS session, clients MUST take care to avoid Message ID collisions. In other words, they MUST not re-use the DNS Message ID of an in-flight query. -- The document date (October 18, 2015) is 3114 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 376, but not defined == Unused Reference: 'RFC4492' is defined on line 626, but no explicit reference was found in the text == Unused Reference: 'RFC5288' is defined on line 646, but no explicit reference was found in the text == Unused Reference: 'RFC3749' is defined on line 731, but no explicit reference was found in the text == Unused Reference: 'RFC4821' is defined on line 735, 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 6125 (Obsoleted by RFC 9525) ** Downref: Normative reference to an Informational RFC: RFC 6234 ** Obsolete normative reference: RFC 6347 (Obsoleted by RFC 9147) ** Downref: Normative reference to an Informational RFC: RFC 7435 ** Obsolete normative reference: RFC 7525 (Obsoleted by RFC 9325) == Outdated reference: A later version (-09) exists of draft-ietf-dprive-dns-over-tls-01 == Outdated reference: A later version (-23) exists of draft-ietf-tls-cached-info-19 Summary: 8 errors (**), 0 flaws (~~), 12 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: April 20, 2016 Cisco 6 October 18, 2015 8 DNS over DTLS (DNSoD) 9 draft-ietf-dprive-dnsodtls-02 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 April 20, 2016. 43 Copyright Notice 45 Copyright (c) 2015 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 2. Relationship to TCP Queries and to DNSSEC . . . . . . . . . . 3 62 3. Common problems with DNS Privacy . . . . . . . . . . . . . . 3 63 3.1. Firewall Blocking Ports or DNS Privacy Protocol . . . . . 3 64 3.2. Authenticating the DNS Privacy Server . . . . . . . . . . 4 65 3.3. Downgrade attacks . . . . . . . . . . . . . . . . . . . . 5 66 4. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 67 5. Incremental Deployment . . . . . . . . . . . . . . . . . . . 6 68 6. DTLS session initiation, Polling and Discovery . . . . . . . 6 69 7. Performance Considerations . . . . . . . . . . . . . . . . . 7 70 8. Established sessions . . . . . . . . . . . . . . . . . . . . 8 71 9. Fragmentation and Reassembly . . . . . . . . . . . . . . . . 9 72 9.1. Generating fragmented packets . . . . . . . . . . . . . . 10 73 9.2. Receiving fragmented packets . . . . . . . . . . . . . . 11 74 9.3. The DNS-fragment Extension . . . . . . . . . . . . . . . 12 75 10. Anycast . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 76 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13 77 12. Security Considerations . . . . . . . . . . . . . . . . . . . 14 78 13. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 14 79 14. References . . . . . . . . . . . . . . . . . . . . . . . . . 14 80 14.1. Normative References . . . . . . . . . . . . . . . . . . 14 81 14.2. Informative References . . . . . . . . . . . . . . . . . 16 82 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 17 84 1. Introduction 86 The Domain Name System is specified in [RFC1034] and [RFC1035]. DNS 87 queries and responses are normally exchanged unencrypted and are thus 88 vulnerable to eavesdropping. Such eavesdropping can result in an 89 undesired entity learning domains that a host wishes to access, thus 90 resulting in privacy leakage. DNS privacy problem is further 91 discussed in [I-D.bortzmeyer-dnsop-dns-privacy]. 93 Active attackers have long been successful at injecting bogus 94 responses, causing cache poisoning and causing misdirection of the 95 subsequent connection (if attacking A or AAAA records). A popular 96 mitigation against that attack is to use ephemeral and random source 97 ports for DNS queries [RFC5452]. 99 This document defines DNS over DTLS (DNSoD, pronounced "dee-enn-sod") 100 which provides confidential DNS communication for stub resolvers, 101 recursive resolvers, iterative resolvers and authoritative servers. 103 The motivations for proposing DNSoD are that 105 o TCP suffers from network head-of-line blocking, where the loss of 106 a packet causes all other TCP segments to not be delivered to the 107 application until the lost packet is re-transmitted. DNSoD, 108 because it uses UDP, does not suffer from network head-of-line 109 blocking. 111 o DTLS session resumption consumes 1 round trip whereas TLS session 112 resumption can start only after TCP handshake is complete. 113 Although TCP Fast Open [RFC7413] can reduce that handshake, TCP 114 Fast Open is not yet available in commercially-popular operating 115 systems. 117 2. Relationship to TCP Queries and to DNSSEC 119 DNS queries can be sent over UDP or TCP. The scope of this document, 120 however, is only UDP. DNS over TCP could be protected with TLS, as 121 described in [I-D.ietf-dprive-dns-over-tls]. Alternatively, a shim 122 protocol could be defined between DTLS and DNS, allowing large 123 responses to be sent over DTLS itself, see Section 7. 125 DNS Security Extensions (DNSSEC [RFC4033]) provides object integrity 126 of DNS resource records, allowing end-users (or their resolver) to 127 verify legitimacy of responses. However, DNSSEC does not protect 128 privacy of DNS requests or responses. DNSoD works in conjunction 129 with DNSSEC, but DNSoD does not replace the need or value of DNSSEC. 131 3. Common problems with DNS Privacy 133 This section describes problems common to any DNS privacy solution. 134 To achieve DNS privacy an encrypted and integrity-protected channel 135 is needed between the client and server. This channel can be 136 blocked, and the client needs to react to such blockages. 138 3.1. Firewall Blocking Ports or DNS Privacy Protocol 140 When sending DNS over an encrypted channel, there are two choices: 141 send the encrypted traffic over the DNS ports (UDP 53, TCP 53) or 142 send the encrypted traffic over a different port. The encrypted 143 traffic is not normal DNS traffic, but rather is a cryptographic 144 handshake followed by encrypted payloads. There can be firewalls, 145 other security devices, or intercepting DNS proxies which block the 146 non-DNS traffic or otherwise react negatively (e.g., quarantining the 147 host for suspicious behavior). Alternatively, if a different port is 148 used for the encrypted traffic, a firewall or other security device 149 might block that port or otherwise react negatively. 151 There is no panacea, and only experiments on the Internet will 152 uncover which technique or combination of techniques will work best. 153 This document describes using DNSoD on a well-known port. 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 or IP addresses of those DNS 166 privacy servers. The server certificate MUST contain DNS-ID 167 (subjectAltName) as described in Section 4.1 of [RFC6125]. DNS names 168 and IP addresses can be contained in the subjectAltName entries. The 169 client MUST use the rules and guidelines given in section 6 of 170 [RFC6125] to validate the DNS server identity. 172 We imagine this could be implemented by adding the certificate name 173 to the /etc/resolv.conf file, such as below: 175 nameserver 8.8.8.8 176 certificate google-public-dns.google.com 177 nameserver 208.67.220.220 178 certificate resolver.opendns.com 180 For DNS privacy servers that don't have a certificate trust chain 181 (e.g., because they are on a home network or a corporate network), 182 the configured list of DNS privacy servers can contain the Subject 183 Public Key Info (SPKI) fingerprint of the DNS privacy server (i.e., a 184 simple whitelist of name and SPKI fingerprint). The public key is 185 used for the same reasons HTTP pinning [RFC7469] uses the public key. 186 Raw public key-based authentication mechanism defined in [RFC7250] 187 can be also used to authenticate the DNS server. 189 We imagine this could be implemented by adding the SPKI fingerprint 190 to the /etc/resolv.conf file, such as below (line split for Internet 191 Draft formatting): 193 nameserver 192.168.1.1 194 sha256 : "d6qzRu9zOECb90Uez27xWltNsj0e1Md7GkYYkVoZWmM=" 196 The only algorithm considered at this time is "sha256", i.e., the 197 hash algorithm SHA256 [RFC6234]; additional algorithms may be allowed 198 for use in this context in the future. The quoted-string is a 199 sequence of base 64 digits: the base64-encoded SPKI Fingerprint 200 [RFC4648]. 202 3.3. Downgrade attacks 204 Using DNS privacy with an authenticated server is most preferred, DNS 205 privacy with an unauthenticated server is next preferred, and plain 206 DNS is least preferred. This section gives a non-normative 207 discussion on common behaviors and choices. 209 An implementation MAY attempt to obtain DNS privacy by contacting DNS 210 servers on the local network (provided by DHCP) and on the Internet, 211 and make those attempts in parallel to reduce user impact. If DNS 212 privacy cannot be successfully negotiated for whatever reason, the 213 client can do three things: 215 1. refuse to send DNS queries on this network, which means the 216 client cannot make effective use of this network, as modern 217 networks require DNS; or, 219 2. use opportunistic security, as described in [RFC7435]. or, 221 3. send plain DNS queries on this network, which means no DNS 222 privacy is provided. 224 Heuristics can improve this situation, but only to a degree (e.g., 225 previous success of DNS privacy on this network may be reason to 226 alert the user about failure to establish DNS privacy on this network 227 now). Still, the client (in cooperation with the end user) has to 228 decide to use the network without the protection of DNS privacy. 230 4. Terminology 232 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 233 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 234 "OPTIONAL" in this document are to be interpreted as described in 235 [RFC2119]. 237 5. Incremental Deployment 239 DNSoD can be deployed incrementally by the Internet Service Provider 240 or as an Internet service. 242 If the ISP's DNS resolver supports DNSoD, then DNS queries are 243 protected from passive listening and from many active attacks along 244 that path. 246 DNSoD can be offered as an Internet service, and a stub resolver or 247 DNS resolver can be configured to point to that DNSoD server (rather 248 than to the ISP-provided DNS server). 250 6. DTLS session initiation, Polling and Discovery 252 Many modern operating systems already detect if a web proxy is 253 interfering with Internet communications, using proprietary 254 mechanisms that are out of scope of this document. After that 255 mechanism has run (and detected Internet connectivity is working), 256 the DNSoD procedure described in this document should commence. This 257 timing avoids delays in joining the network (and displaying an icon 258 indicating successful Internet connection), at the risk that those 259 initial DNS queries will be sent without protection afforded by 260 DNSoD. 262 DNSoD MUST run over standard UDP port 853 as defined in Section 11. 263 A DNS server that supports DNSoD MUST listen for and accept DTLS 264 packets on a designated port 853. 266 The host should determine if the DNS server supports DNSoD by sending 267 a DTLS ClientHello message. A DNS server that does not support DNSoD 268 will not respond to ClientHello messages sent by the client. The 269 client MUST use timer values defined in Section 4.2.4.1 of [RFC6347] 270 for retransmission of ClientHello message and if no response is 271 received from the DNS server. After 15 seconds, it MUST cease 272 attempts to re-transmit its ClientHello. If the DNS client receives 273 a hard ICMP error [RFC1122], it MUST immediately cease attempts to 274 re-transmit its ClientHello. Thereafter, the client MAY repeat that 275 procedure in the event the DNS server has been upgraded to support 276 DNSoD, but such probing SHOULD NOT be done more frequently than every 277 24 hours and MUST NOT be done more frequently than every 15 minutes. 278 This mechanism requires no additional signaling between the client 279 and server. 281 7. Performance Considerations 283 To reduce number of octets of the DTLS handshake, especially the size 284 of the certificate in the ServerHello (which can be several 285 kilobytes), DNS client and server can use raw public keys [RFC7250] 286 or Cached Information Extension [I-D.ietf-tls-cached-info]. Cached 287 Information Extension avoids transmitting the server's certificate 288 and certificate chain if the client has cached that information from 289 a previous TLS handshake. 291 Multiple DNS queries can be sent over a single DTLS session and the 292 DNSoD client need not wait for an outstanding reply before sending 293 the next query. The existing Query ID allows multiple requests and 294 responses to be interleaved in whatever order they can be fulfilled 295 by the DNS server. This means DNSoD reduces the consumption of UDP 296 port numbers, and because DTLS protects the communication between the 297 DNS client and its server, the resolver SHOULD NOT use random 298 ephemeral source ports (Section 9.2 of [RFC5452]) because such source 299 port use would incur additional, unnecessary DTLS load on the DNSoD 300 server. When sending multiple queries over a single DTLS session, 301 clients MUST take care to avoid Message ID collisions. In other 302 words, they MUST not re-use the DNS Message ID of an in-flight query. 304 It is highly advantageous to avoid server-side DTLS state and reduce 305 the number of new DTLS sessions on the server which can be done with 306 [RFC5077]. This also eliminates a round-trip for subsequent DNSoD 307 queries, because with [RFC5077] the DTLS session does not need to be 308 re-established. 310 Compared to normal DNS, DTLS adds at least 13 octets of header, plus 311 cipher and authentication overhead to every query and every response. 312 This reduces the size of the DNS payload that can be carried. 313 Certain DNS responses are large (e.g., many AAAA records, TXT, SRV) 314 and don't fit into a single UDP packet, causing a partial response 315 with the truncation (TC) bit set. The client is then expected to 316 repeat the query over TCP, which causes additional name resolution 317 delay. We have considered two ideas, one that reduces the need to 318 switch to TCP and another that eliminates the need to switch to TCP: 320 o To avoid IP fragmentation, DTLS handshake messages incorporate 321 their own fragment offset and fragment length, but this is only 322 for the handshake. Payloads that cause the DTLS packet to exceed 323 the path maximum MTU need their own fragmentation support 324 Section 9. 326 o DNS client and server MUST support the EDNS0 option defined in 327 [RFC6891] so that the DNS client can indicate to the DNS server 328 the maximum DNS response size it can handle without IP 329 fragmentation. 331 DNSoD puts an additional computational load on servers. The largest 332 gain for privacy is to protect the communication between the DNS 333 client (the end user's machine) and its caching resolver. 334 Implementing DNSoD on root servers is outside the scope of this 335 document. 337 8. Established sessions 339 In DTLS, all data is protected using the same record encoding and 340 mechanisms. When the mechanism described in this document is in 341 effect, DNS messages are encrypted using the standard DTLS record 342 encoding. When a user of DTLS wishes to send an DNS message, it 343 delivers it to the DTLS implementation as an ordinary application 344 data write (e.g., SSL_write()). A single DTLS session can be used to 345 receive multiple DNS requests and generate DNS multiple responses. 347 DNSoD client and server can use DTLS heartbeat [RFC6520] to verify 348 that the peer still has DTLS state. DTLS session is terminated by 349 the receipt of an authenticated message that closes the connection 350 (e.g., a DTLS fatal alert). 352 Client Server 353 ------ ------ 355 ClientHello --------> 357 <------- HelloVerifyRequest 358 (contains cookie) 360 ClientHello --------> 361 (contains cookie) 362 (empty SessionTicket extension) 363 ServerHello 364 (empty SessionTicket extension) 365 Certificate* 366 ServerKeyExchange* 367 CertificateRequest* 368 <-------- ServerHelloDone 370 Certificate* 371 ClientKeyExchange 372 CertificateVerify* 373 [ChangeCipherSpec] 374 Finished --------> 375 NewSessionTicket 376 [ChangeCipherSpec] 377 <-------- Finished 379 DNS Request ---------> 381 <--------- DNS Response 383 Message Flow for Full Handshake Issuing New Session Ticket 385 9. Fragmentation and Reassembly 387 This section describes an optional procedure the client and server 388 can negotiate to send large DNS responses without IP fragmentation or 389 reassembly. 391 Large DNS responses cannot exceed the DNS maximum payload size (512) 392 unless a larger size is negotiated with EDNS0. Even using EDNS0, 393 requesting responses larger the path MTU causes IP fragmentation. If 394 the response exceeds that size it is truncated and the TC bit set, 395 forcing a DNS client that wants the entire response to establish a 396 TCP connection and send the query again over TCP. This slows down 397 DNS lookups, and is even more troublesome if a TLS session also needs 398 to be established. 400 To avoid these problems with DNS over DTLS, the DNS client and the 401 DNS server can indicate support for a new application-layer 402 fragmentation and reassembly mechanism, by using the new DTLS 403 extension "DNS-fragment" in the DTLS ClientHello, and indicate how 404 many fragments the client is willing to receive. If the server 405 supports this extension, it includes "DNS-fragment" in its DTLS 406 ServerHello and indicates how many fragments it is willing to send in 407 a response. The EDNS0 value controls the size of the responses, 408 including the size of fragmented responses. If both the DTLS client 409 and DTLS server indicate support DNS-fragment, and the DNS server's 410 response exceeds the EDNS0-indicated size, the DNS server fragments 411 the response into packets that are no larger than the EDNS0-indicated 412 size, and sends them all to the DNS client. Logically, the layering 413 of the fragmentation is like this, 415 | DNS | 416 | fragmentation | 417 | DTLS | 418 | UDP | 419 | IP | 421 9.1. Generating fragmented packets 423 The response is formed, and separate packets are sent with their own 424 fragmentation header, as follows: 426 1 1 1 1 1 1 427 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 428 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 429 | DNS Query ID | 430 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 431 |QR| 1| M| M| Fragment-count | Fragment-ID | 432 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 433 | Master Fragment Sequence Number (MFSN) | 434 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 436 The above fragment header appears at the beginning of all fragments. 437 The fields are defined as follows: 439 DNS Query ID: Is the same as the ID value of the DNS response; 440 this means the first fragment has the DNS Query ID value appear 441 twice in the packet, and means subsequent fragments will contain 442 their associated DNS Query ID in the fragmentation header. 444 QR: This is the QR field in a normal DNS packet, and is always 445 set, because fragmentation/reassembly is only defined in this 446 document for responses. 448 OP: This bit is always set. This bit corresponds to first bit of 449 the Opcode field of a normal DNS packet; that Opcode field for a 450 normal DNS packet must be all 0. By setting this bit to 1, this 451 fragmentation header is distinguished from a normal DNS packet. 453 M: The next two "M" bits must be 0, for future use. 455 Fragment-count: For each query ID that generates a fragmented 456 response, this field is set to the number of fragments that will 457 be sent (that is, the highest Fragment-ID minus 1). 459 Fragment-ID: Starts at 0 for the first fragmented segment and is 460 incremented for each fragment. 462 Master Fragment Sequence Number: starts at 0 and is incremented 463 for the first packet of each fragmented response. 465 The length of each fragment is calculated from the UDP packet size 466 minus the DTLS overhead. 468 It is RECOMMENDED that a value not exceeding 10 is used by the DNS 469 client and DNS server during their DNS-fragment negotiation 470 [RFC6928]. If the server needs to generate more fragments than were 471 negotiated, MUST set the TC bit and SHOULD send the number of 472 fragments negotiated. 474 The fragments MUST be at least 64 bytes (minimum Ethernet MTU) minus 475 DTLS, UDP, and IP overhead. The fragments need not all be the same 476 size. The DNS client indicates the maximum DNS size using EDNS0, 477 which constrains the size of the response packet on the wire. When 478 generating fragmented packets, the DNS server MUST NOT generate 479 fragments that exceed the maximum DNS size. 481 9.2. Receiving fragmented packets 483 Upon receipt of a DTLS packet, DTLS processing is performed and the 484 Opcode field is examined to determine if reassembly is required 485 before processing as a DNS packet, as depicted below: 487 +--------+ 488 | 00000 -+------------> DNS processing 489 Opcode = | | ^ 490 | | | 491 | 1xxxx -+--->reassembly----+ 492 +--------+ 494 If reassembly needs to be performed, the packets are matched 495 according to their DNS query ID value (at the top of the fragment 496 header), their Master Fragment Sequence Number, and ordered by their 497 Fragment-ID. Once all the fragments have been received (that is, all 498 fragments from 0 through the Fragment-ID matching the frag-count 499 minus 1), the fragment headers are removed and the DNS payload is 500 handed to the DNS layer. Due to network loss or packet corruption, 501 some fragments might not be received, which will cause the DNS layer 502 to perform a normal re-transmission of the DNS query, with the same 503 query ID. The re-transmitted answer, which will be fragmented 504 identically to the original answer (assuming that resource record did 505 not change between the two answers), will have a different Master 506 Fragment Sequence Number. 508 Design Note: Tha MFSN protects against corruption caused by DNS 509 resource record changing between the initial query and its re- 510 transmitted query. 512 After a time out, incomplete fragments are discarded by the receiver. 514 If the Fragment-ID is 0 and the DNS Query ID value in the fragment 515 header does not match the ID value in the DNS header, a DTLS Alert is 516 generated and an error is logged. 518 9.3. The DNS-fragment Extension 520 A new extension type ("DNS_fragment(TBA)") is defined and MUST be 521 included by the client in its "ClientHello" message if it wants to 522 use fragmentation, and MUST be included in the ServerHello if the 523 server agrees to use fragmentation. 525 enum { DNS-fragment(TBA), (65535) } ExtensionType; 527 The "extension_data" field of the "DNS-fragment" extension MUST 528 contain a "MaxNumOfFragments" value, which is the maximum number of 529 fragments the client wants to receive (indicated in the ClientHello), 530 and the maximum number of fragments the server will send (indicated 531 in the ServerHello). 533 uint8 MaxNoOfFragments; 534 The value indicated in the ServerHello MUST be less than or equal to 535 the value indicated in the ClientHello, and if not the client MUST 536 terminate the DTLS association with an Alert, and MAY establish a new 537 DTLS association without the dns_fragment extension. 539 10. Anycast 541 DNS servers are often configured with anycast addresses. While the 542 network is stable, packets transmitted from a particular source to an 543 anycast address will reach the same server that has the cryptographic 544 context from the DNS over DTLS handshake. But when the network 545 configuration changes,a DNS over DTLS packet can be received by a 546 server that does not have the necessary cryptographic context. To 547 encourage the client to initiate a new DTLS handshake, DNS servers 548 SHOULD generate a DTLS Alert message in response to receiving a DTLS 549 packet for which the server does not have any cryptographic context. 551 11. IANA Considerations 553 This document adds a new extension for DTLS, in accordance with 554 [RFC5246]: 556 enum { DNS-Fragment(TBA), (65535) } ExtensionType; 558 [[ NOTE: This value needs to be assigned by IANA ]] 560 This extension MUST only be used with DTLS. 562 IANA is requested to add the following value to the "Service Name and 563 Transport Protocol Port Number Registry" registry in the System 564 Range. The registry for that range requires IETF Review or IESG 565 Approval [RFC6335] and such a review has been requested using the 566 Early Allocation process [RFC7120] for the well-known UDP port in 567 this document. 569 Service Name domain-s 570 Transport Protocol(s) UDP/TCP 571 Port 853 572 Assignee IESG 573 Contact dwing@cisco.com 574 Description DNS query-response protocol runs over 575 DTLS and TLS 576 Reference This document 578 12. Security Considerations 580 The interaction between a DNS client and DNS server requires Datagram 581 Transport Layer Security (DTLS) with a ciphersuite offering 582 confidentiality protection and guidance given in [RFC7525] must be 583 followed to avoid attacks on DTLS. Once a DNSoD client has 584 established a security association with a particular DNS server, and 585 outstanding normal DNS queries with that server (if any) have been 586 received, the DNSoD client MUST ignore any subsequent normal DNS 587 responses from that server, as all subsequent responses should be 588 encrypted. This behavior mitigates all possible attacks described in 589 Measures for Making DNS More Resilient against Forged Answers 590 [RFC5452]. 592 The DNS Fragment extension does not impact security of DTLS session 593 establishment or application data exchange. DNS Fragment provides 594 fragmentation and reassembly of the encrypted DNS payload. 596 13. Acknowledgements 598 Thanks to Phil Hedrick for his review comments on TCP and to Josh 599 Littlefield for pointing out DNSoD load on busy servers (most notably 600 root servers). The authors would like to thank Simon Josefsson, 601 Daniel Kahn Gillmor, Bob Harold, Ilari Liusvaara and Sara Dickinson 602 for discussions and comments on the design of DNSoD. 604 14. References 606 14.1. Normative References 608 [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", 609 STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987, 610 . 612 [RFC1035] Mockapetris, P., "Domain names - implementation and 613 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 614 November 1987, . 616 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 617 Requirement Levels", BCP 14, RFC 2119, 618 DOI 10.17487/RFC2119, March 1997, 619 . 621 [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S. 622 Rose, "DNS Security Introduction and Requirements", 623 RFC 4033, DOI 10.17487/RFC4033, March 2005, 624 . 626 [RFC4492] Blake-Wilson, S., Bolyard, N., Gupta, V., Hawk, C., and B. 627 Moeller, "Elliptic Curve Cryptography (ECC) Cipher Suites 628 for Transport Layer Security (TLS)", RFC 4492, 629 DOI 10.17487/RFC4492, May 2006, 630 . 632 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 633 Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, 634 . 636 [RFC5077] Salowey, J., Zhou, H., Eronen, P., and H. Tschofenig, 637 "Transport Layer Security (TLS) Session Resumption without 638 Server-Side State", RFC 5077, DOI 10.17487/RFC5077, 639 January 2008, . 641 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 642 (TLS) Protocol Version 1.2", RFC 5246, 643 DOI 10.17487/RFC5246, August 2008, 644 . 646 [RFC5288] Salowey, J., Choudhury, A., and D. McGrew, "AES Galois 647 Counter Mode (GCM) Cipher Suites for TLS", RFC 5288, 648 DOI 10.17487/RFC5288, August 2008, 649 . 651 [RFC5452] Hubert, A. and R. van Mook, "Measures for Making DNS More 652 Resilient against Forged Answers", RFC 5452, 653 DOI 10.17487/RFC5452, January 2009, 654 . 656 [RFC6125] Saint-Andre, P. and J. Hodges, "Representation and 657 Verification of Domain-Based Application Service Identity 658 within Internet Public Key Infrastructure Using X.509 659 (PKIX) Certificates in the Context of Transport Layer 660 Security (TLS)", RFC 6125, DOI 10.17487/RFC6125, March 661 2011, . 663 [RFC6234] Eastlake 3rd, D. and T. Hansen, "US Secure Hash Algorithms 664 (SHA and SHA-based HMAC and HKDF)", RFC 6234, 665 DOI 10.17487/RFC6234, May 2011, 666 . 668 [RFC6335] Cotton, M., Eggert, L., Touch, J., Westerlund, M., and S. 669 Cheshire, "Internet Assigned Numbers Authority (IANA) 670 Procedures for the Management of the Service Name and 671 Transport Protocol Port Number Registry", BCP 165, 672 RFC 6335, DOI 10.17487/RFC6335, August 2011, 673 . 675 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 676 Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, 677 January 2012, . 679 [RFC6520] Seggelmann, R., Tuexen, M., and M. Williams, "Transport 680 Layer Security (TLS) and Datagram Transport Layer Security 681 (DTLS) Heartbeat Extension", RFC 6520, 682 DOI 10.17487/RFC6520, February 2012, 683 . 685 [RFC6891] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms 686 for DNS (EDNS(0))", STD 75, RFC 6891, 687 DOI 10.17487/RFC6891, April 2013, 688 . 690 [RFC7120] Cotton, M., "Early IANA Allocation of Standards Track Code 691 Points", BCP 100, RFC 7120, DOI 10.17487/RFC7120, January 692 2014, . 694 [RFC7435] Dukhovni, V., "Opportunistic Security: Some Protection 695 Most of the Time", RFC 7435, DOI 10.17487/RFC7435, 696 December 2014, . 698 [RFC7469] Evans, C., Palmer, C., and R. Sleevi, "Public Key Pinning 699 Extension for HTTP", RFC 7469, DOI 10.17487/RFC7469, April 700 2015, . 702 [RFC7525] Sheffer, Y., Holz, R., and P. Saint-Andre, 703 "Recommendations for Secure Use of Transport Layer 704 Security (TLS) and Datagram Transport Layer Security 705 (DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, May 706 2015, . 708 14.2. Informative References 710 [I-D.bortzmeyer-dnsop-dns-privacy] 711 Bortzmeyer, S., "DNS privacy considerations", draft- 712 bortzmeyer-dnsop-dns-privacy-02 (work in progress), April 713 2014. 715 [I-D.ietf-dprive-dns-over-tls] 716 Zi, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., 717 and P. Hoffman, "DNS over TLS: Initiation and Performance 718 Considerations", draft-ietf-dprive-dns-over-tls-01 (work 719 in progress), October 2015. 721 [I-D.ietf-tls-cached-info] 722 Santesson, S. and H. Tschofenig, "Transport Layer Security 723 (TLS) Cached Information Extension", draft-ietf-tls- 724 cached-info-19 (work in progress), March 2015. 726 [RFC1122] Braden, R., Ed., "Requirements for Internet Hosts - 727 Communication Layers", STD 3, RFC 1122, 728 DOI 10.17487/RFC1122, October 1989, 729 . 731 [RFC3749] Hollenbeck, S., "Transport Layer Security Protocol 732 Compression Methods", RFC 3749, DOI 10.17487/RFC3749, May 733 2004, . 735 [RFC4821] Mathis, M. and J. Heffner, "Packetization Layer Path MTU 736 Discovery", RFC 4821, DOI 10.17487/RFC4821, March 2007, 737 . 739 [RFC6928] Chu, J., Dukkipati, N., Cheng, Y., and M. Mathis, 740 "Increasing TCP's Initial Window", RFC 6928, 741 DOI 10.17487/RFC6928, April 2013, 742 . 744 [RFC7250] Wouters, P., Ed., Tschofenig, H., Ed., Gilmore, J., 745 Weiler, S., and T. Kivinen, "Using Raw Public Keys in 746 Transport Layer Security (TLS) and Datagram Transport 747 Layer Security (DTLS)", RFC 7250, DOI 10.17487/RFC7250, 748 June 2014, . 750 [RFC7413] Cheng, Y., Chu, J., Radhakrishnan, S., and A. Jain, "TCP 751 Fast Open", RFC 7413, DOI 10.17487/RFC7413, December 2014, 752 . 754 Authors' Addresses 756 Tirumaleswar Reddy 757 Cisco Systems, Inc. 758 Cessna Business Park, Varthur Hobli 759 Sarjapur Marathalli Outer Ring Road 760 Bangalore, Karnataka 560103 761 India 763 Email: tireddy@cisco.com 764 Dan Wing 765 Cisco Systems, Inc. 766 170 West Tasman Drive 767 San Jose, California 95134 768 USA 770 Email: dwing@cisco.com 772 Prashanth Patil 773 Cisco Systems, Inc. 774 Bangalore 775 India 777 Email: praspati@cisco.com