idnits 2.17.00 (12 Aug 2021) /tmp/idnits30042/draft-eastlake-dnsext-cookies-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** It looks like you're using RFC 3978 boilerplate. You should update this to the boilerplate described in the IETF Trust License Policy document (see https://trustee.ietf.org/license-info), which is required now. -- Found old boilerplate from RFC 3978, Section 5.1 on line 14. -- Found old boilerplate from RFC 3978, Section 5.5, updated by RFC 4748 on line 675. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 686. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 693. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 699. 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 Copyright Line does not match the current year -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (August 2007) is 5392 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) ** Downref: Normative reference to an Informational RFC: RFC 1321 ** Downref: Normative reference to an Informational RFC: RFC 2104 ** Obsolete normative reference: RFC 2671 (Obsoleted by RFC 6891) -- Obsolete informational reference (is this intentional?): RFC 2766 (Obsoleted by RFC 4966) -- Obsolete informational reference (is this intentional?): RFC 2845 (Obsoleted by RFC 8945) -- Obsolete informational reference (is this intentional?): RFC 4634 (Obsoleted by RFC 6234) Summary: 4 errors (**), 0 flaws (~~), 1 warning (==), 10 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 INTERNET-DRAFT Donald E. Eastlake 3rd 2 Intended Status: Proposed Standard Motorola Laboratories 3 Expires: February 2008 August 2007 5 Domain Name System (DNS) Cookies 6 ------ ---- ------ ----- ------- 7 9 Status of This Document 11 By submitting this Internet-Draft, each author represents that any 12 applicable patent or other IPR claims of which he or she is aware 13 have been or will be disclosed, and any of which he or she becomes 14 aware will be disclosed, in accordance with Section 6 of BCP 79. 16 This draft is intended to be become a Proposed Standard RFC. 17 Distribution of this document is unlimited. Comments should be sent 18 to the author or the DNSEXT working group mailing list 19 . 21 Internet-Drafts are working documents of the Internet Engineering 22 Task Force (IETF), its areas, and its working groups. Note that 23 other groups may also distribute working documents as Internet- 24 Drafts. 26 Internet-Drafts are draft documents valid for a maximum of six months 27 and may be updated, replaced, or obsoleted by other documents at any 28 time. It is inappropriate to use Internet-Drafts as reference 29 material or to cite them other than as "work in progress." 31 The list of current Internet-Drafts can be accessed at 32 http://www.ietf.org/1id-abstracts.html 34 The list of Internet-Draft Shadow Directories can be accessed at 35 http://www.ietf.org/shadow.html 37 Abstract 38 DNS cookies are a light-weight DNS transaction security mechanism. 39 They provides limited protection to DNS servers and resolvers against 40 a variety of increasingly common denial-of-service and cache 41 poisoning or forgery attacks by off-path attackers. 43 Table of Contents 45 Status of This Document....................................1 46 Abstract...................................................1 48 Table of Contents..........................................2 50 1. Introduction............................................3 51 1.1 Contents of This Document..............................3 52 1.2 Definitions............................................3 54 2. Threats Considered......................................5 55 2.1 Denial-of-Service Attacks..............................5 56 2.1.1 DNS Server Denial-of-Service.........................5 57 2.1.2 Selected Host Denial-of-Service......................5 58 2.2 Cache Poisoning and Answer Forgery Attacks.............6 59 3. Comments on Existing DNS Security.......................6 60 3.1 Existing DNS Data Security.............................6 61 3.2 DNS Message or Transaction Security....................7 62 3.3 Conclusions on Existing DNS Security...................7 64 4. The COOKIE OPT option...................................8 65 4.1 Resolver Cookies.......................................8 66 4.2 Server Cookies.........................................9 67 5. DNS Cookie Policies and Implementation Requirements.....9 68 5.1 Resolver Policies and Implementation..................10 69 5.2 Server Policies and Implementation....................10 70 5.3 Implementation Requirements...........................11 71 6. NAT and AnyCast Considerations.........................11 73 7. IANA Considerations....................................14 74 8. Security Considerations................................14 75 9. Normative References...................................15 76 10. Informative References................................15 78 Author's Address..........................................17 79 Copyright and Disclaimer..................................17 80 Additional IPR Provisions.................................17 81 Expiration and File Name..................................18 83 1. Introduction 85 The Domain Name System (DNS) provides a replicated distributed 86 database which stores "resource records" (RRs) under hierarchical 87 domain names. DNS data is structured into CLASSes and zones which 88 can be independently maintained. See [STD13] and [RFC2181] 89 familiarity with which is assumed. 91 As with many core Internet protocols, DNS was designed at a time when 92 the Internet had only a small pool of trusted users. As the Internet 93 has exploded to a global information utility the DNS has increasingly 94 been subject to abuse and been used as a vector for abuse. 96 This document describes DNS cookies, a light-weight DNS transaction 97 security mechanism specified as an OPT [RFC2671] option. They 98 provides limited protection to DNS servers and resolvers against a 99 variety of increasingly common denial-of-service and cache poisoning 100 forgery attacks by off-path attackers. 102 1.1 Contents of This Document 104 In Section 2, we discuss the threats against which DNS cookies 105 provides some protection. 107 Section 3 describes existing DNS security mechanisms and why they are 108 not adequate substitutes for DNS cookies. 110 Section 4 describes the COOKIE OPT option including recommendations 111 for calculating Resolver and Server Cookies. 113 Section 5 describes the processing of COOKIE OPT options by resolvers 114 and server and policies for such processing. 116 Section 6 discusses some NAT and anycast related DNS Cookies design 117 considerations. 119 Sections 7 and 8 describe IANA and Security Considerations. 121 1.2 Definitions 123 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 124 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 125 document are to be interpreted as described in [RFC2119]. 127 An "off-path attacker", for a particular DNS resolver and server, is 128 defined as an attacker which cannot observe the legitimate plain text 129 DNS requests and responses between that resolver and server. 131 "Soft state" indicates information learned or derived by a host which 132 may be discarded when indicated by the policies of that host but can 133 be later re-instantiated if needed. For example, it could be 134 discarded after a period of time or when storage for caching such 135 data becomes full. If operations requiring that soft state continue 136 after it has been discarded, it will be automatically re-generated, 137 albeit at some cost. 139 "Silently discarded" indicates that there are no DNS protocol message 140 consequences; however, it is RECOMMENDED that appropriate debugging 141 network management facilities be included in implementations, such as 142 a counter of the occurrences of each type of such events. 144 The term "IP address" is used herein in a length independent manner 145 and refers to address formats including IPv4 and IPv6. 147 2. Threats Considered 149 DNS cookies are intended to provide significant but limited 150 protection against certain denial-of-service and cache poisoning or 151 answer forgery attacks by off-path attackers described below. 153 2.1 Denial-of-Service Attacks 155 The canonical form of the denial-of-service attacks considered herein 156 is to send DNS requests with forged source IP addresses to a server. 157 The intent can be to attack that server or a selected host as 158 described below. 160 2.1.1 DNS Server Denial-of-Service 162 DNS requests that are accepted cause work on the part of DNS servers. 163 This is particularly true for recursive servers which may issue one 164 or more requests and process the responses thereto in order to 165 determine their response to the initial query. And the situation is 166 even worse for recursive servers implementing DNSSEC [RFC4033], 167 [RFC4034], [RFC4035] because they may be induced to perform 168 burdensome public key cryptographic computations in attempts to 169 verify the authenticity of data they retrieve while trying to answer 170 the request. 172 The computational or communications burden cause by such requests is 173 not dependent on a forged IP source address, but the use of such 174 addresses makes 175 + the source of the requests causing the denial-of-service attack to 176 be harder to find and 177 + administrative restriction of the IP addresses from which such 178 requests should be honored harder to accurately specify. 180 Use of DNS cookies almost always enables a server to reject forged 181 queries from an off path attacker with relative ease, certainly 182 before any recursive queries or public key cryptographic operations 183 are performed. 185 2.1.2 Selected Host Denial-of-Service 187 A request with a forged IP address generally causes a response to be 188 sent to that forged IP address. Thus the forging of many such 189 requests with a particular source IP address can result in enough 190 traffic being sent to the forged IP address to interfere with service 191 to the host at the IP address. Furthermore, it is generally easy in 192 the DNS to create short requests that produce much longer responses. 193 Thus a DNS server can be used as not only a way to obscure the true 194 source of an attack but as a traffic amplifier to make the attack 195 more effective. 197 Use of DNS cookies severely limits the traffic amplification that can 198 be obtained by attackers off path for the server and the attacked 199 host. Enforced DNS cookies would make it hard for an off path 200 attacker to cause any more than a brief error response to be send to 201 a forged IP address. Furthermore, DNS cookies make it more effective 202 to implement a rate limiting scheme for bad DNS cookie error 203 responses from the server. Such a scheme would further restrict 204 selected host denial-of-service traffic from that server. 206 2.2 Cache Poisoning and Answer Forgery Attacks 208 The form of the cache poisoning attacks considered is to send forged 209 replies to a resolver. Modern network speeds for well connected hosts 210 are such that, by forging replies from the IP addresses of heavily 211 used DNS servers and for popular names to a heavily used resolver, 212 there can be an unacceptably high probability of randomly coming up 213 with a reply that will be accepted and cause false DNS information to 214 be cached by that resolver. This can be used to facilitate phishing 215 attacks and other diversion of legitimate traffic to a compromised or 216 malicious host such as a web server. 218 In a similar manner it is possible, under some circumstances to send 219 forged answers that will be accepted by resolvers with an 220 unacceptably high probability. 222 3. Comments on Existing DNS Security 224 Two forms of security have been added to DNS, data security and 225 message or transaction security. 227 3.1 Existing DNS Data Security 229 DNS data security is one part of DNSSEC and is described in 230 [RFC4033], [RFC4034], and [RFC4035]. It provides data origin 231 authentication and authenticated denial of existence. It is being 232 deployed slowly and, in any case, can make some denial-of-service 233 attacks worse because of the high cryptographic computational load it 234 can require and the increased size in DNS packets that it tends to 235 produce. 237 3.2 DNS Message or Transaction Security 239 The second form of security which has been added to DNS provides 240 "transaction" security through TSIG [RFC2845] or SIG(0) [RFC2931]. 241 TSIG could provide near perfect protection against the attacks for 242 which DNS cookies provide weak and incomplete protection; however, 243 TSIG is hard to deploy in the general Internet because of the burden 244 it imposes of pre-agreement and key distribution between pairs of 245 resolvers and servers and because it requires time synchronization 246 between resolver and server. 248 TKEY [RFC2930] can solve the problem of key distribution for TSIG but 249 some modes of TKEY impose substantial cryptographic computations 250 loads and can be dependent on the deployment of DNSSEC. 252 SIG(0) provides less denial of service protection than TSIG or, in 253 one way, even DNS cookies, because it does not authenticate requests, 254 only complete transactions. In any case, it also depends on the 255 deployment of DNSSEC and requires computationally burdensome public 256 key cryptographic operations. 258 3.3 Conclusions on Existing DNS Security 260 Thus, none of the previous forms of DNS security are a suitable 261 substitute for DNS cookies, which provide light weight message 262 authentication of DNS requests and responses with no requirement for 263 pre-configuration. 265 4. The COOKIE OPT option 267 COOKIE is an OPT RR [RFC2671] option that can be included once in the 268 RDATA portion of an OPT RR in DNS requests and responses. 270 The option is encoded into 22 bytes as shown below. 272 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 273 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 274 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 275 | OPTION-CODE TBD | OPTION-LENGTH = 18 | 276 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 277 | Resolver Cookie upper half | 278 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 279 | Resolver Cookie lower half | 280 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 281 | Server Cookie upper half | 282 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 283 | Server Cookie lower half | 284 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 285 | Error Code | 286 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 288 The Resolver and Server Cookies are stored in network byte order and 289 are determined as described below. 291 The Error Code field MUST be zero in requests and in responses unless 292 the response is communicating a DNS cookie error. Three values are 293 specified in this document for Error Code: NOCOOKIE and BADCOOKIE 294 which occur with a Refused RCODE in the DNS response header, and 295 MANYCOOKIE which occurs with a FormErr RCODE in the DNS header. More 296 information on the generation of error response appears in Section 5 297 below. 299 4.1 Resolver Cookies 301 The Resolver Cookie, when it occurs in an OPT in a DNS response, is 302 intended to weakly assure the resolver that the response came from a 303 server at the indicated source IP address. 305 Servers remember the Resolver Cookie that appears in a query long 306 enough to use it in the construction of the COOKIE OPT option in the 307 corresponding response if such a COOKIE OPT option is included in 308 that response. 310 The Resolver Cookie SHOULD be a pseudo-random function of the server 311 IP address and a secret quantity known only to the resolver. This 312 resolver secret SHOULD have 64 bits of entropy [RFC4086] and MAY be 313 changed periodically. The RECOMMENDED method is the HMAC-SHA1-64 314 [RFC1321], [RFC2104] of the server IP address and the resolver 315 secret. That is 317 Resolver Cookie = Truncate-64 318 ( HMAC-SHA1 ( Server IP Address, Resolver Secret ) ) 320 where Truncate-64 takes the first 64 bits. A resolver MUST NOT use 321 the same Resolver Cookie value for queries to all servers. 323 4.2 Server Cookies 325 The Server Cookie, when it occurs in a COOKIE OPT option in a query, 326 is intended to weakly assure the server that the query legitimately 327 came from a resolver at the indicated source IP address that is using 328 that Resolver Cookie. 330 Resolvers learn Server Cookies and retain them as soft state 331 associated with the server IP address. They learn them from the 332 Server Cookie that appears in the COOKIE OPT option of a reply that 333 also has the correct Resolver Cookie, even if that reply is an error 334 message. 336 The Server Cookie SHOULD be a pseudo-random function of the request 337 source IP address, the request Resolver Cookie, and a secret quantity 338 known only to the server. This server secret SHOULD have 64 bits of 339 entropy [RFC4086] and SHOULD be changed periodically such as daily. 340 The RECOMMENDED method is the HMAC-SHA1-64 [RFC1321], [RFC2104] of 341 the request IP address, the Resolver Cookie, and the server secret. 342 That is 344 Server Cookie = Truncate-64 ( HMAC-SHA1 ( 345 (Request IP Address | Resolver Cookie), Server Secret ) ) 347 where Truncate-64 takes the first 64 bits and "|" represents 348 concatenation. 350 A server MUST NOT use the same Server Cookie value for responses to 351 all resolvers. 353 5. DNS Cookie Policies and Implementation Requirements 355 DNS resolvers and servers will adopt one of various policies 356 regarding cookies. These policies SHOULD be logically settable on a 357 per server IP address basis for resolvers and a per resolver ( IP 358 address, Resolver Cookie ) pair for servers. Thus a resolver can 359 have different policies for different servers, based on the server IP 360 address. And a server can have different policies for different 361 resolvers, based on the resolver IP address and Resolver Cookie. Of 362 course, the actual implementation of setting these policies may be 363 for blocks or classes of values or use sparse array techniques. 365 The policy for each value is either "Disabled", "Enabled", or 366 "Enforced" as described below. 368 5.1 Resolver Policies and Implementation 370 A resolver will logically have one of the following three policies 371 for each DNS server as distinguished by server IP Address. 373 Disabled: 374 Never include a COOKIE OPT option in requests. 375 Ignore COOKIE OPT options in responses. 377 Enabled: 378 Always include a COOKIE OPT option in requests. If a cached Server 379 Cookie for the server is not available, the Server Cookie field 380 can be set to any value. 381 Normally process responses without a COOKIE OPT option. 382 Silently ignore responses with more than one COOKIE OPT option. 383 Silently ignore responses with one COOKIE OPT option if it has an 384 incorrect Resolver Cookie value. 385 On receipt of a response with one COOKIE OPT option and it having 386 the correct Resolver Cookie value (even if it is a BADCOOKIE 387 error response), perform normal response processing, including 388 caching the received Server Cookie and MUST change to the 389 Enforced policy for DNS requests to that DNS server IP address. 390 This policy change SHOULD be treated as soft state with the 391 same discard policy as the Server Cookie value for that server. 392 On discarding that state information, the policy for that DNS 393 server reverts to Enabled. 395 Enforced: 396 Always include a COOKIE OPT option in requests. 397 Silently ignore all responses that do not include exactly one 398 COOKIE OPT option having the correct Resolver Cookie value. 400 5.2 Server Policies and Implementation 402 A server will logically have one of the following three policies for 403 each DNS resolver as distinguished by resolver IP Address and 404 Resolver Cookie. 406 Disabled: 407 Ignore COOKIE OPT options in requests. 408 Never include a COOKIE OPT option in responses. 410 Enabled: 411 Always include a COOKIE OPT option in responses. 412 Normally process requests without a COOKIE OPT option. 413 Ignore, other than sending a MANYCOOKIE error response, any 414 request with more than one COOKIE OPT option. 415 Ignore, other than sending a BADCOOKIE error response, any query 416 with one COOKIE OPT option if it has an incorrect Server 417 Cookie. 418 On receipt of a request with a COOKIE OPT option having the 419 correct Server Cookie value, perform normal request processing 420 and SHOULD adopt the Enforced policy for DNS requests from that 421 resolver IP address with that Resolver Cookie in the request. 422 This policy change for that resolver SHOULD be treated as soft 423 state. On discarding that state information, the policy for 424 that resolver IP and Resolver Cookie pair reverts to enabled. 426 Enforced: 427 Always include a COOKIE OPT option in responses. 428 Ignore requests without a COOKIE OPT option or with more than one 429 COOKIE OPT option, other than sending a NOCOOKIE or MANYCOOKIE 430 error respectively. 431 Ignore requests with one COOKIE OPT option if they have an 432 incorrect Server Cookie, other than sending a BADCOOKIE error 433 message. 434 If a request has one COOKIE OPT option with a correct Server 435 Cookie, perform normal processing of the request. 437 5.3 Implementation Requirements 439 DNS resolvers and servers SHOULD implement DNS cookies. 441 DNS resolvers SHOULD operate in and be shipped so as to default to 442 the Enabled or Enforced mode for all servers. 444 DNS servers SHOULD operate in and be shipped so as to default to the 445 Enabled or Enforced mode for all resolvers they are willing to 446 service. 448 6. NAT and AnyCast Considerations 450 [The section below is too confusing and needs to be reworded...] 451 In the Classic Internet, DNS Cookies could simply be a pseudo-random 452 function of the resolver IP address and a sever secret or the server 453 IP address and a resolver secret. You would want to compute the 454 Server Cookie that way, so a resolver could cache its Server Cookie 455 for a particular server for an indefinitely amount of time and the 456 server could easily regenerate and check it. You could consider the 457 Resolver Cookie to be a resolver signature over the server IP address 458 which the resolver checks in responses and you could extend this 459 signature to cover the request ID, for example. 461 But we have this reality called NAT [RFC3022], Network Address 462 Translation (including therein for the purposes of this document NAT- 463 PT [RFC2766], Network Address and Protocol Translation). There is no 464 problem with DNS transactions between resolvers and servers behind a 465 NAT box using local IP addresses. Nor is there a problem with NAT 466 translation of internal addresses to external addresses or 467 translations between IPv4 and IPv6 addresses, as long as the address 468 mapping is relatively stable. Should an internal resolver being 469 mapped to a particular external IP address change occasionally, the 470 disruption is no more than when a resolver rolls-over its DNS COOKIE 471 secret. And normally external access to a DNS server behind a NAT box 472 is handled by a fixed mapping which forwards externally received DNS 473 requests to a specific host. 475 However, NAT devices sometimes also map ports. This can cause 476 multiple DNS requests and responses from multiple internal hosts to 477 be simultaneously mapped to a smaller number of external IP 478 addresses, frequently one. There could be many resolvers behind a 479 NAT box that appear to come from the same source IP address to a 480 server outside that NAT box.. If one of these were an attacker 481 (think Zombie or Botnet), that behind-NAT attacker could get the 482 Server Cookie for some server for the outgoing IP address by just 483 making some random request to that server. It could then include that 484 Server Cookie in the COOKIE RR of requests to the server with the 485 forged IP address of the local IP address of some other host and/or 486 resolver behind the NAT box. (Attacker possession of this Server 487 Cookie will not help in forging responses to cause cache poisoning as 488 such responses are protected by the required Resolver Cookie.) 490 To fix this potential defect, it is necessary to distinguish 491 different resolvers behind a NAT box from the point of view of the 492 server. It is for this reason that the Server Cookie is specified as 493 a pseudo-random function of both the request source IP address and 494 the Resolver Cookie. From this inclusion of the Resolver Cookie in 495 the calculation of the Server Cookie, it follows that a stable 496 Resolver Cookie, for any particular server, is needed. If, for 497 example, the request ID was included in the calculation of the 498 Resolver Cookie, it would normally change with each query to a 499 particular server. This would mean that each query would have to be 500 sent twice: first to learn the new Server Cookie based on this new 501 Resolver Cookie based on the new ID and then again using this new 502 Resolver Cookie to actually get an answer. Thus the input to the 503 Resolver Cookie computation must be limited to the server IP address 504 and one or more things that change slowly such as the resolver 505 secret. 507 In principle, there could be a similar problem for servers, not 508 particularly due to NAT but due to mechanisms like anycast which may 509 cause queries to a DNS server at an IP address to be delivered to any 510 one of several machines. (External queries to a DNS server behind a 511 NAT box usually occur via port forwarding such that all such queries 512 go to one host.) However, it is impossible to solve this the way the 513 similar problem was solved for NATed resolvers; if the Server Cookie 514 was included in the calculation of the Resolver Cookie the same way 515 the Resolver Cookie is included in the Server Cookie, you would just 516 get an almost infinite series of BADCOOKIE errors as a query was 517 repeatedly retried. 519 For server accessed via anycast or similar mechanisms to successfully 520 support DNS COOKIES, the server clones must either all use the same 521 server secret or the mechanism that distributes queries to them must 522 cause the queries from a particular resolver to go to a particular 523 server for a sufficiently long period of time that extra queries due 524 to changes in Server Cookie resulting from accessing different server 525 machines are not unduly burdensome. When such anycast accessed 526 servers act as recursive servers or otherwise act as resolvers they 527 normally use a different unique address to source their queries and 528 avoid confusion in the delivery of responses. 530 For simplicity, it is RECOMMENDED that the same server secret be used 531 by each set of anycast servers. 533 7. IANA Considerations 535 IANA will allocate the following code points: 537 The OPT option value for COOKIE is . 539 Three new RCODES are assigned values as listed below: 540 NOCOOKIE is assigned the value (, 23 suggested). 541 BADCOOKIE is assigned the value (, 24 suggested). 542 MANYCOOKIE is assigned the value (, 25 suggested). 544 8. Security Considerations 546 DNS Cookies provide a weak form of authentication of DNS requests and 547 responses. In particular, they provide no protection at all against 548 "on-path" adversaries; that is, they provide no protection against 549 any adversary which can observe the plain text DNS traffic, such as 550 an on-path router, bridge, or any device on an on-path shared link 551 (unless the DNS traffic in question on that path is appropriately 552 encrypted). 554 For example, if a host is connected via an unsecured IEEE 802.11 link 555 (Wi-Fi), any device in the vicinity that could receive and decode the 556 802.11 transmissions must be considered "on-path". On the other hand, 557 in a similar situation but one where 802.11i security is 558 appropriately deployed on the Wi-Fi network nodes, only the Access 559 Point via which the host is connecting is "on-path". 561 Despite these limitations, use of DNS Cookies on the global Internet 562 is expected to provide a reduction in the available launch points for 563 the traffic amplification and denial of service forgery attacks 564 described in Section 2 above. 566 The recommended cryptographic algorithms for use in DNS Cookies is 567 HMAC-SHA1-64, that is, the HMAC scheme [RFC2104] using the SHA1 hash 568 function [RFC3174] [RFC4634] with the HMAC output truncated to 569 64-bits. MD5 is now considered to be susceptible to collisions 570 attacks. Although this does not effect the security of HMAC-MD5, 571 HMAC-SHA1 is stronger. 573 In light of the weak plain-text token security provided by DNS 574 Cookies, stronger cryptography is probably not warranted and in many 575 cases it would be acceptable to use the weaker MD5 hash function 576 [RFC1321]. However, there is nothing wrong with using something 577 stronger, for example, HMAC-SHA256-64 [RFC4634], assuming a DNS 578 processor has adequate computational resources available. DNS 579 processors that feel the need for somewhat stronger security without 580 a significant increase in computational load should consider more 581 frequent changes in their resolver and/or server secret; however, 582 this does require more frequent generation of a cryptographically 583 strong random number [RFC4086] and a change in a server secret will 584 result in a number of initial BADCOOKIE rejected requests from 585 resolvers caching their old Server Cookie. 587 9. Normative References 589 [RFC1321] - Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321, 590 April 1992. 592 [RFC2104] - Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- 593 Hashing for Message Authentication", RFC 2104, February 1997. 595 [RFC2119] - Bradner, S., "Key words for use in RFCs to Indicate 596 Requirement Levels", BCP 14, RFC 2119, March 1997. 598 [RFC2181] - Elz, R. and R. Bush, "Clarifications to the DNS 599 Specification", RFC 2181, July 1997. 601 [RFC2671] - Vixie, P., "Extension Mechanisms for DNS (EDNS0)", August 602 1999. 604 [RFC4086] - Eastlake, D., 3rd, Schiller, J., and S. Crocker, 605 "Randomness Requirements for Security", BCP 106, RFC 4086, June 2005. 607 [STD13] 608 Mockapetris, P., "Domain names - concepts and facilities", STD 609 13, RFC 1034, November 1987. 611 Mockapetris, P., "Domain names - implementation and 612 specification", STD 13, RFC 1035, November 1987. 614 10. Informative References 616 [RFC2766] - Tsirtsis, G., P. Srisuresh, "Network Address Translation 617 - Protocol Translation (NAT-PT)", February 2000. 619 [RFC2845] - Vixie, P., Gudmundsson, O., Eastlake 3rd, D., and B. 620 Wellington, "Secret Key Transaction Authentication for DNS (TSIG)", 621 RFC 2845, May 2000. 623 [RFC2930] - Eastlake 3rd, D., "Secret Key Establishment for DNS (TKEY 624 RR)", RFC 2930, September 2000. 626 [RFC2931] - Eastlake 3rd, D., "DNS Request and Transaction Signatures 627 ( SIG(0)s )", RFC 2931, September 2000. 629 [RFC3022] - Srisuresh, P. and K. Egevang, "Traditional IP Network 630 Address Translator (Traditional NAT)", RFC 3022, January 2001. 632 [RFC3174] - Eastlake 3rd, D. and P. Jones, "US Secure Hash Algorithm 633 1 (SHA1)", RFC 3174, September 2001. 635 [RFC4033] - Arends, R., Austein, R., Larson, M., Massey, D., and S. 636 Rose, "DNS Security Introduction and Requirements", RFC 4033, March 637 2005. 639 [RFC4034] - Arends, R., Austein, R., Larson, M., Massey, D., and S. 640 Rose, "Resource Records for the DNS Security Extensions", RFC 4034, 641 March 2005. 643 [RFC4035] - Arends, R., Austein, R., Larson, M., Massey, D., and S. 644 Rose, "Protocol Modifications for the DNS Security Extensions", RFC 645 4035, March 2005. 647 [RFC4634] - Eastlake, D. and T. Hansen, "US Secure Hash Algorithms 648 (SHA)", RFC 4634, July 2006. 650 Author's Address 652 Donald E. Eastlake 3rd 653 Motorola Laboratories 654 111 Locke Drive 655 Marlborough, MA 01752 USA 657 Telephone: +1-508-786-7554 (w) 659 EMail: Donald.Eastlake@motorola.com 661 Copyright and Disclaimer 663 Copyright (C) The IETF Trust (2007). 665 This document is subject to the rights, licenses and restrictions 666 contained in BCP 78, and except as set forth therein, the authors 667 retain all their rights. 669 This document and the information contained herein are provided on an 670 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 671 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND 672 THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS 673 OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF 674 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 675 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 677 Additional IPR Provisions 679 The IETF takes no position regarding the validity or scope of any 680 Intellectual Property Rights or other rights that might be claimed to 681 pertain to the implementation or use of the technology described in 682 this document or the extent to which any license under such rights 683 might or might not be available; nor does it represent that it has 684 made any independent effort to identify any such rights. Information 685 on the procedures with respect to rights in RFC documents can be 686 found in BCP 78 and BCP 79. 688 Copies of IPR disclosures made to the IETF Secretariat and any 689 assurances of licenses to be made available, or the result of an 690 attempt made to obtain a general license or permission for the use of 691 such proprietary rights by implementers or users of this 692 specification can be obtained from the IETF on-line IPR repository at 693 http://www.ietf.org/ipr. 695 The IETF invites any interested party to bring to its attention any 696 copyrights, patents or patent applications, or other proprietary 697 rights that may cover technology that may be required to implement 698 this standard. Please address the information to the IETF at ietf- 699 ipr@ietf.org. 701 Expiration and File Name 703 This draft expires in February 2008. 705 Its file name is draft-eastlake-dnsext-cookies-02.txt