idnits 2.17.1 draft-eastlake-dnsext-cookies-03.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 15. -- Found old boilerplate from RFC 3978, Section 5.5, updated by RFC 4748 on line 707. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 718. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 725. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 731. 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 (February 25, 2008) is 5904 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. -------------------------------------------------------------------------------- 2 INTERNET-DRAFT Donald E. Eastlake 3rd 3 Intended Status: Proposed Standard Motorola Laboratories 4 Expires: August 2008 February 25, 2008 6 Domain Name System (DNS) Cookies 8 10 Status of This Document 12 By submitting this Internet-Draft, each author represents that any 13 applicable patent or other IPR claims of which he or she is aware 14 have been or will be disclosed, and any of which he or she becomes 15 aware will be disclosed, in accordance with Section 6 of BCP 79. 17 This draft is intended to be become a Proposed Standard RFC. 18 Distribution of this document is unlimited. Comments should be sent 19 to the author or the DNSEXT working group mailing list 20 . 22 Internet-Drafts are working documents of the Internet Engineering 23 Task Force (IETF), its areas, and its working groups. Note that 24 other groups may also distribute working documents as Internet- 25 Drafts. 27 Internet-Drafts are draft documents valid for a maximum of six months 28 and may be updated, replaced, or obsoleted by other documents at any 29 time. It is inappropriate to use Internet-Drafts as reference 30 material or to cite them other than as "work in progress." 32 The list of current Internet-Drafts can be accessed at 33 http://www.ietf.org/1id-abstracts.html 35 The list of Internet-Draft Shadow Directories can be accessed at 36 http://www.ietf.org/shadow.html 38 Abstract 39 DNS cookies are a light-weight DNS transaction security mechanism 40 designed for incremental deployment. They provide limited protection 41 to DNS servers and resolvers against a variety of increasingly common 42 denial-of-service and cache poisoning or forgery attacks by off-path 43 attackers. DNS Cookies are tolerant of NAT, NAT-PT, and Anycast. 45 Table of Contents 47 Status of This Document....................................1 48 Abstract...................................................1 50 Table of Contents..........................................2 52 1. Introduction............................................3 53 1.1 Contents of This Document..............................3 54 1.2 Definitions............................................4 56 2. Threats Considered......................................5 57 2.1 Denial-of-Service Attacks..............................5 58 2.1.1 DNS Server Denial-of-Service.........................5 59 2.1.2 Selected Host Denial-of-Service......................5 60 2.2 Cache Poisoning and Answer Forgery Attacks.............6 61 3. Comments on Existing DNS Security.......................6 62 3.1 Existing DNS Data Security.............................6 63 3.2 DNS Message or Transaction Security....................7 64 3.3 Conclusions on Existing DNS Security...................7 66 4. The COOKIE OPT option...................................8 67 4.1 Resolver Cookies.......................................8 68 4.2 Server Cookies.........................................9 69 5. DNS Cookie Policies and Implementation Requirements.....9 70 5.1 Resolver Policies and Implementation..................10 71 5.2 Server Policies and Implementation....................11 72 5.3 Implementation Requirements...........................11 73 6. NAT Considerations and AnyCast Server Considerations...12 75 7. Incremental Deployment.................................14 77 8. IANA Considerations....................................15 78 9. Security Considerations................................15 79 10. Normative References..................................16 80 11. Informative References................................16 82 Author's Address..........................................18 83 Copyright and Disclaimer..................................18 84 Additional IPR Provisions.................................18 85 Expiration and File Name..................................19 87 1. Introduction 89 As with many core Internet protocols, the Domain Name System (DNS) 90 was designed at a time when the Internet had only a small pool of 91 trusted users. As the Internet has exploded to a global information 92 utility, the DNS has increasingly been subject to abuse and been used 93 as a vector for abuse. 95 This document describes DNS cookies, a light-weight DNS transaction 96 security mechanism specified as an OPT [RFC2671] option. This 97 mechanism provides limited protection to DNS servers and resolvers 98 against a variety of increasingly common denial-of-service and cache 99 poisoning forgery attacks by off-path attackers. 101 The DNS cookies mechanism is designed with a default mode which 102 supports incremental deployment. If only one party to a DNS 103 transaction supports the mechanism, it does not interfere or provide 104 a benefit, but, if both support it, the additional security provided 105 is automatically available for that and subsequent transactions. 107 The DNS cookies mechanism is compatible with and can be used in 108 conjunction with other DNS transaction forgery resistance measures 109 such as those in [forgery]. 111 The DNS cookies mechanism is designed to work in the presence of NAT 112 and NAT-PT boxes and guidance is provided herein on supporting the 113 DNS cookies mechanism in anycast servers. 115 1.1 Contents of This Document 117 In Section 2, we discuss the threats against which the DNS cookie 118 mechanism provides some protection. 120 Section 3 describes existing DNS security mechanisms and why they are 121 not adequate substitutes for DNS cookies. 123 Section 4 describes the COOKIE OPT option including recommendations 124 for calculating Resolver and Server Cookies. 126 Section 5 describes the processing of COOKIE OPT options by resolvers 127 and server and policies for such processing. 129 Section 6 discusses some NAT and anycast related DNS Cookies design 130 considerations. 132 Section 7 discusses incremental deployment considerations. 134 Sections 8 and 9 describe IANA and Security Considerations. 136 1.2 Definitions 138 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 139 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 140 document are to be interpreted as described in [RFC2119]. 142 An "off-path attacker", for a particular DNS resolver and server, is 143 defined as an attacker which cannot observe the legitimate plain text 144 DNS requests and responses between that resolver and server. 146 "Soft state" indicates information learned or derived by a host which 147 may be discarded when indicated by the policies of that host but can 148 be later re-instantiated if needed. For example, it could be 149 discarded after a period of time or when storage for caching such 150 data becomes full. If operations requiring that soft state continue 151 after it has been discarded, it will be automatically re-generated, 152 albeit at some cost. 154 "Silently discarded" indicates that there are no DNS protocol message 155 consequences; however, it is RECOMMENDED that appropriate debugging 156 network management facilities be included in implementations, such as 157 a counter of the occurrences of each type of such events. 159 The term "IP address" is used herein in a length independent manner 160 and refers to address formats including IPv4 and IPv6. 162 2. Threats Considered 164 DNS cookies are intended to provide significant but limited 165 protection against certain denial-of-service and cache poisoning or 166 answer forgery attacks by off-path attackers described below. 168 2.1 Denial-of-Service Attacks 170 The canonical form of the denial-of-service attacks considered herein 171 is to send DNS requests with forged source IP addresses to a server. 172 The intent can be to attack that server or a selected host as 173 described below. 175 2.1.1 DNS Server Denial-of-Service 177 DNS requests that are accepted cause work on the part of DNS servers. 178 This is particularly true for recursive servers which may issue one 179 or more requests and process the responses thereto in order to 180 determine their response to the initial query. And the situation is 181 even worse for recursive servers implementing DNSSEC [RFC4033], 182 [RFC4034], [RFC4035] because they may be induced to perform 183 burdensome public key cryptographic computations in attempts to 184 verify the authenticity of data they retrieve while trying to answer 185 the request. 187 The computational or communications burden caused by such requests 188 may not dependent on a forged IP source address, but the use of such 189 addresses makes 190 + the source of the requests causing the denial-of-service attack to 191 be harder to find and 192 + administrative restriction of the IP addresses from which such 193 requests should be honored harder or impossible to specify. 195 Use of DNS cookies almost always enables a server to reject forged 196 queries from an off path attacker with relative ease, certainly 197 before any recursive queries or public key cryptographic operations 198 are performed. 200 2.1.2 Selected Host Denial-of-Service 202 A request with a forged IP address generally causes a response to be 203 sent to that forged IP address. Thus the forging of many such 204 requests with a particular source IP address can result in enough 205 traffic being sent to the forged IP address to interfere with service 206 to the host at the IP address. Furthermore, it is generally easy in 207 the DNS to create short requests that produce much longer responses. 208 Thus a DNS server can be used as not only a way to obscure the true 209 source of an attack but as a traffic amplifier to make the attack 210 more effective. 212 Use of the DNS Cookies mechanism severely limits the traffic 213 amplification that can be obtained by attackers off path for the 214 server and the attacked host. Enforced DNS cookies would make it hard 215 for an off path attacker to cause any more than a brief error 216 response to be sent to a forged IP address. Furthermore, DNS cookies 217 make it more effective to implement a rate limiting scheme for bad 218 DNS cookie error responses from the server. Such a scheme would 219 further restrict selected host denial-of-service traffic from that 220 server. 222 2.2 Cache Poisoning and Answer Forgery Attacks 224 The form of the cache poisoning attacks considered is to send forged 225 replies to a resolver. Modern network speeds for well connected hosts 226 are such that, by forging replies from the IP addresses of heavily 227 used DNS servers for popular names to a heavily used resolver, there 228 can be an unacceptably high probability of randomly coming up with a 229 reply that will be accepted and cause false DNS information to be 230 cached by that resolver. This can be used to facilitate phishing 231 attacks and other diversion of legitimate traffic to a compromised or 232 malicious host such as a web server. 234 3. Comments on Existing DNS Security 236 Two forms of security have been added to DNS, data security and 237 message or transaction security. 239 3.1 Existing DNS Data Security 241 DNS data security is one part of DNSSEC and is described in 242 [RFC4033], [RFC4034], and [RFC4035]. It provides data origin 243 authentication and authenticated denial of existence. It is being 244 deployed slowly and, in any case, can make some denial-of-service 245 attacks worse because of the high cryptographic computational load it 246 can require and the increased size in DNS packets that it tends to 247 produce. 249 3.2 DNS Message or Transaction Security 251 The second form of security which has been added to DNS provides 252 "transaction" security through TSIG [RFC2845] or SIG(0) [RFC2931]. 253 TSIG could provide near perfect protection against the attacks for 254 which the DNS Cookies mechanism provide weak and incomplete 255 protection; however, TSIG is hard to deploy in the general Internet 256 because of the burden it imposes of pre-agreement and key 257 distribution between pairs of resolvers and servers and because it 258 requires time synchronization between resolver and server. 260 TKEY [RFC2930] can solve the problem of key distribution for TSIG but 261 some modes of TKEY impose a substantial cryptographic computation 262 loads and can be dependent on the deployment of DNSSEC. 264 SIG(0) provides less denial of service protection than TSIG or, in 265 one way, even DNS cookies, because it does not authenticate requests, 266 only complete transactions. In any case, it also depends on the 267 deployment of DNSSEC and requires computationally burdensome public 268 key cryptographic operations. 270 3.3 Conclusions on Existing DNS Security 272 Thus, none of the previous forms of DNS security are a suitable 273 substitute for the DNS Cookies mechanism, which provide light weight 274 message authentication of DNS requests and responses with no 275 requirement for pre-configuration. 277 4. The COOKIE OPT option 279 COOKIE is an OPT RR [RFC2671] option that can be included no more 280 than once in the RDATA portion of an OPT RR in DNS requests and 281 responses. 283 The option is encoded into 22 bytes as shown below. 285 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 286 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 287 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 288 | OPTION-CODE = {TBD} | OPTION-LENGTH = 18 | 289 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 290 | | 291 +- Resolver Cookie -+ 292 | | 293 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 294 | | 295 +-- Server Cookie -+ 296 | | 297 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 298 | Error Code | 299 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 301 The 64-bit Resolver and Server Cookies are stored in network byte 302 order and are determined as described below. 304 The Error Code field MUST be zero in requests and in responses unless 305 the response is communicating a DNS cookie error. Three values are 306 specified in this document for Error Code: NOCOOKIE and BADCOOKIE 307 which occur with a Refused RCODE in the DNS response header, and 308 MANYCOOKIE which occurs with a FormErr RCODE in the DNS header. More 309 information on the generation of error responses appears in Section 5 310 below. 312 4.1 Resolver Cookies 314 The Resolver Cookie, when it occurs in an OPT in a DNS response, is 315 intended to weakly assure the resolver that the response came from a 316 server at the indicated source IP address. 318 Servers remember the Resolver Cookie that appears in a query long 319 enough to use it in the construction of the COOKIE OPT option in the 320 corresponding response if such a COOKIE OPT option is included in 321 that response. 323 The Resolver Cookie SHOULD be a pseudo-random function of the server 324 IP address and a secret quantity known only to the resolver. This 325 resolver secret SHOULD have 64 bits of entropy [RFC4086] and MAY be 326 changed periodically. The RECOMMENDED method is the HMAC-SHA1-64 327 [RFC1321] [RFC2104] of the server IP address and the resolver secret. 328 That is 330 Resolver Cookie = Truncate-64 331 ( HMAC-SHA1 ( Server IP Address, Resolver Secret ) ) 333 where Truncate-64 takes the first 64 bits. A resolver MUST NOT use 334 the same Resolver Cookie value for queries to all servers. 336 4.2 Server Cookies 338 The Server Cookie, when it occurs in a COOKIE OPT option in a query, 339 is intended to weakly assure the server that the query legitimately 340 came from a resolver at the indicated source IP address that is using 341 that Resolver Cookie. 343 Resolvers learn Server Cookies and retain them as soft state 344 associated with the server IP address. They learn them from the 345 Server Cookie that appears in the COOKIE OPT option of a reply if 346 that reply has the correct Resolver Cookie, even if that reply is an 347 error message. 349 The Server Cookie SHOULD be a pseudo-random function of the request 350 source IP address, the request Resolver Cookie, and a secret quantity 351 known only to the server. This server secret SHOULD have 64 bits of 352 entropy [RFC4086] and SHOULD be changed periodically such as daily. 353 The RECOMMENDED method is the HMAC-SHA1-64 [RFC1321], [RFC2104] of 354 the request IP address, the Resolver Cookie, and the server secret. 355 That is 357 Server Cookie = Truncate-64 ( HMAC-SHA1 ( 358 (Request IP Address | Resolver Cookie), Server Secret ) ) 360 where Truncate-64 takes the first 64 bits and "|" represents 361 concatenation. 363 A server MUST NOT use the same Server Cookie value for responses to 364 all resolvers. 366 5. DNS Cookie Policies and Implementation Requirements 368 DNS resolvers and servers will adopt one of various policies 369 regarding cookies. These policies SHOULD be logically settable on a 370 per server IP address basis for resolvers and a per resolver ( IP 371 address, Resolver Cookie ) pair for servers. Thus a resolver can 372 have different policies for different servers, based on the server IP 373 address. And a server can have different policies for different 374 resolvers, based on the resolver IP address and Resolver Cookie. Of 375 course, the actual implementation of setting these policies may be 376 for blocks or classes of values or use sparse array techniques or the 377 like. 379 The policy for each value is either "Disabled", "Enabled", or 380 "Enforced" as described below. 382 5.1 Resolver Policies and Implementation 384 A resolver will logically have one of the following three modes of 385 operation or "policies" for each DNS server as distinguished by 386 server IP Address. 388 Disabled: 389 Never include a COOKIE OPT option in requests. 390 Ignore COOKIE OPT options in responses. 392 Enabled: 393 Always include a COOKIE OPT option in requests. If a cached Server 394 Cookie for the server is not available, the Server Cookie field 395 can be set to any value. 396 Normally process responses without a COOKIE OPT option. 397 Silently ignore responses with more than one COOKIE OPT option. 398 Silently ignore responses with one COOKIE OPT option if it has an 399 incorrect Resolver Cookie value. 400 On receipt of a response with one COOKIE OPT option carrying the 401 correct Resolver Cookie value (even if it is a BADCOOKIE error 402 response), the DNS client performs normal response processing, 403 including caching the received Server Cookie, and it MUST 404 change to the Enforced policy for DNS requests to that DNS 405 server IP address. This policy change SHOULD be treated as soft 406 state with the same timeout strategy as the Server Cookie value 407 for that server. On timeout of that state information, the 408 policy for that DNS server reverts to Enabled. 410 Enforced: 411 Always include a COOKIE OPT option in requests. 412 Silently ignore all responses that do not include exactly one 413 COOKIE OPT option having the correct Resolver Cookie value. 415 5.2 Server Policies and Implementation 417 A server will logically have one of the following three modes of 418 operation or "policies" for each DNS resolver as distinguished by 419 resolver IP Address and Resolver Cookie. 421 Disabled: 422 Ignore COOKIE OPT options in requests. 423 Never include a COOKIE OPT option in responses. 425 Enabled: 426 Always include a COOKIE OPT option in responses. 427 Normally process requests without a COOKIE OPT option. 428 Ignore, other than sending a MANYCOOKIE error response, any 429 request with more than one COOKIE OPT option. 430 Ignore, other than sending a BADCOOKIE error response, any query 431 with one COOKIE OPT option if it has an incorrect Server 432 Cookie. 433 On receipt of a request with a COOKIE OPT option carrying the 434 correct Server Cookie value, the DNS server performs normal 435 request processing and it SHOULD switch to the Enforced policy 436 for DNS requests from that resolver IP address with that 437 Resolver Cookie in the request. This policy change for that 438 resolver SHOULD be treated as soft state. On timing out that 439 state information, the policy for that resolver IP and Resolver 440 Cookie pair reverts to Enabled. 442 Enforced: 443 Always include a COOKIE OPT option in responses. 444 Ignore requests without a COOKIE OPT option or with more than one 445 COOKIE OPT option, other than returning a NOCOOKIE or 446 MANYCOOKIE error respectively. 447 Ignore requests with one COOKIE OPT option if they have an 448 incorrect Server Cookie, other than returning a BADCOOKIE error 449 message. 450 If a request has one COOKIE OPT option with a correct Server 451 Cookie, perform normal processing of the request. 453 5.3 Implementation Requirements 455 DNS resolvers and servers SHOULD implement DNS cookies. 457 DNS resolvers SHOULD operate in and be shipped so as to default to 458 the Enabled or Enforced mode for all servers. 460 DNS servers SHOULD operate in and be shipped so as to default to the 461 Enabled or Enforced mode for all resolvers they are willing to 462 service. 464 6. NAT Considerations and AnyCast Server Considerations 466 In the Classic Internet, DNS Cookies could simply be a pseudo-random 467 function of the resolver IP address and a sever secret or the server 468 IP address and a resolver secret. You would want to compute the 469 Server Cookie that way, so a resolver could cache its Server Cookie 470 for a particular server for an indefinitely amount of time and the 471 server could easily regenerate and check it. You could consider the 472 Resolver Cookie to be a resolver signature over the server IP address 473 which the resolver checks in responses and you could extend this 474 signature to cover the request ID, for example. 476 But we have this reality called NAT [RFC3022], Network Address 477 Translation (including, for the purposes of this document, NAT-PT 478 [RFC2766], Network Address and Protocol Translation, which has been 479 declared Historic [RFC4966]). There is no problem with DNS 480 transactions between resolvers and servers behind a NAT box using 481 local IP addresses. Nor is there a problem with NAT translation of 482 internal addresses to external addresses or translations between IPv4 483 and IPv6 addresses, as long as the address mapping is relatively 484 stable. Should an internal resolver being mapped to a particular 485 external IP address change occasionally, the disruption is no more 486 than when a resolver rolls-over its DNS COOKIE secret. And normally 487 external access to a DNS server behind a NAT box is handled by a 488 fixed mapping which forwards externally received DNS requests to a 489 specific host. 491 However, NAT devices sometimes also map ports. This can cause 492 multiple DNS requests and responses from multiple internal hosts to 493 be simultaneously mapped to a smaller number of external IP 494 addresses, frequently one. There could be many resolvers behind a 495 NAT box that appear to come from the same source IP address to a 496 server outside that NAT box. If one of these were an attacker (think 497 Zombie or Botnet), that behind-NAT attacker could get the Server 498 Cookie for some server for the outgoing IP address by just making 499 some random request to that server. It could then include that Server 500 Cookie in the COOKIE RR of requests to the server with the forged 501 local IP address of some other host and/or resolver behind the NAT 502 box. (Attacker possession of this Server Cookie will not help in 503 forging responses to cause cache poisoning as such responses are 504 protected by the required Resolver Cookie.) 506 To fix this potential defect, it is necessary to distinguish 507 different resolvers behind a NAT box from the point of view of the 508 server. It is for this reason that the Server Cookie is specified as 509 a pseudo-random function of both the request source IP address and 510 the Resolver Cookie. From this inclusion of the Resolver Cookie in 511 the calculation of the Server Cookie, it follows that a stable 512 Resolver Cookie, for any particular server, is needed. If, for 513 example, the request ID was included in the calculation of the 514 Resolver Cookie, it would normally change with each query to a 515 particular server. This would mean that each query would have to be 516 sent twice: first to learn the new Server Cookie based on this new 517 Resolver Cookie based on the new ID and then again using this new 518 Resolver Cookie to actually get an answer. Thus the input to the 519 Resolver Cookie computation must be limited to the server IP address 520 and one or more things that change slowly such as the resolver 521 secret. 523 In principle, there could be a similar problem for servers, not 524 particularly due to NAT but due to mechanisms like anycast which may 525 cause queries to a DNS server at an IP address to be delivered to any 526 one of several machines. (External queries to a DNS server behind a 527 NAT box usually occur via port forwarding such that all such queries 528 go to one host.) However, it is impossible to solve this the way the 529 similar problem was solved for NATed resolvers; if the Server Cookie 530 was included in the calculation of the Resolver Cookie the same way 531 the Resolver Cookie is included in the Server Cookie, you would just 532 get an almost infinite series of BADCOOKIE errors as a query was 533 repeatedly retried. 535 For servers accessed via anycast to successfully support DNS COOKIES, 536 the server clones must either all use the same server secret or the 537 mechanism that distributes queries to them must cause the queries 538 from a particular resolver to go to a particular server for a 539 sufficiently long period of time that extra queries due to changes in 540 Server Cookie resulting from accessing different server machines are 541 not unduly burdensome. When such anycast accessed servers act as 542 recursive servers or otherwise act as resolvers they normally use a 543 different unique address to source their queries and avoid confusion 544 in the delivery of responses. 546 For simplicity, it is RECOMMENDED that the same server secret be used 547 by each DNS server in a set of anycast servers. 549 7. Incremental Deployment 551 The DNS cookies mechanism is designed for incremental deployment and 552 to complement the orthogonal techniques in [forgery]. Either or both 553 techniques can be deployed independently at each DNS server and 554 resolver. 556 In particular, a DNS server or resolver that implements the DNS 557 cookies mechanism and is in the Enabled mode will interoperate 558 successfully with a DNS resolver or server that does not implement 559 this mechanism although, of course, in this case it will not get the 560 benefit of the mechanism. When such a server or resolver 561 interoperates with a resolver or server which also implements the DNS 562 cookies mechanism, this is recognized and, for that transaction 563 partner, it enters the Enforced mode and gets the full benefit of the 564 DNS cookies mechanism until this soft state times out and it reverts 565 to Enabled. 567 8. IANA Considerations 569 IANA will allocate the following code points: 571 The OPT option value for COOKIE is . 573 Three new RCODES are assigned values as listed below: 574 NOCOOKIE is assigned the value ({TBD}, 23 suggested). 575 BADCOOKIE is assigned the value ({TBD}, 24 suggested). 576 MANYCOOKIE is assigned the value ({TBD}, 25 suggested). 578 9. Security Considerations 580 DNS Cookies provide a weak form of authentication of DNS requests and 581 responses. In particular, they provide no protection at all against 582 "on-path" adversaries; that is, they provide no protection against 583 any adversary which can observe the plain text DNS traffic, such as 584 an on-path router, bridge, or any device on an on-path shared link 585 (unless the DNS traffic in question on that path is appropriately 586 encrypted). 588 For example, if a host is connected via an unsecured IEEE 802.11 link 589 (Wi-Fi), any device in the vicinity that could receive and decode the 590 802.11 transmissions must be considered "on-path". On the other hand, 591 in a similar situation but one where 802.11 Robust Security (WPAv2) 592 is appropriately deployed on the Wi-Fi network nodes, only the Access 593 Point via which the host is connecting is "on-path". 595 Despite these limitations, use of DNS Cookies on the global Internet 596 is expected to provide a reduction in the available launch points for 597 the traffic amplification and denial of service forgery attacks 598 described in Section 2 above. 600 The recommended cryptographic algorithms for use in DNS Cookies is 601 HMAC-SHA1-64, that is, the HMAC scheme [RFC2104] using the SHA1 hash 602 function [RFC3174] [RFC4634] with the HMAC output truncated to 603 64-bits. MD5 is now considered to be susceptible to collisions 604 attacks. Although this does not effect the security of HMAC-MD5, 605 HMAC-SHA1 is believed to be stronger. 607 In light of the weak plain-text token security provided by DNS 608 Cookies, stronger cryptography is probably not warranted and in many 609 cases it would be acceptable to use the weaker MD5 hash function 610 [RFC1321]. However, there is nothing wrong with using something 611 stronger, for example, HMAC-SHA256-64 [RFC4634], assuming a DNS 612 processor has adequate computational resources available. DNS 613 processors that feel the need for somewhat stronger security without 614 a significant increase in computational load should consider more 615 frequent changes in their resolver and/or server secret; however, 616 this does require more frequent generation of a cryptographically 617 strong random number [RFC4086] and a change in a server secret will 618 result in a number of initial BADCOOKIE rejected requests from 619 resolvers caching their old Server Cookie. 621 10. Normative References 623 [RFC1321] - Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321, 624 April 1992. 626 [RFC2104] - Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- 627 Hashing for Message Authentication", RFC 2104, February 1997. 629 [RFC2119] - Bradner, S., "Key words for use in RFCs to Indicate 630 Requirement Levels", BCP 14, RFC 2119, March 1997. 632 [RFC2671] - Vixie, P., "Extension Mechanisms for DNS (EDNS0)", August 633 1999. 635 [RFC4086] - Eastlake, D., 3rd, Schiller, J., and S. Crocker, 636 "Randomness Requirements for Security", BCP 106, RFC 4086, June 2005. 638 11. Informative References 640 [forgery] - "Measures for making DNS more resilient against forged 641 answers", Hubert, A. , R. van Mook, draft-ietf-dnsext-forgery- 642 resilience-01.txt, work in progress, July 2007. 644 [RFC2766] - Tsirtsis, G., P. Srisuresh, "Network Address Translation 645 - Protocol Translation (NAT-PT)", February 2000. 647 [RFC2845] - Vixie, P., Gudmundsson, O., Eastlake 3rd, D., and B. 648 Wellington, "Secret Key Transaction Authentication for DNS (TSIG)", 649 RFC 2845, May 2000. 651 [RFC2930] - Eastlake 3rd, D., "Secret Key Establishment for DNS (TKEY 652 RR)", RFC 2930, September 2000. 654 [RFC2931] - Eastlake 3rd, D., "DNS Request and Transaction Signatures 655 ( SIG(0)s )", RFC 2931, September 2000. 657 [RFC3022] - Srisuresh, P. and K. Egevang, "Traditional IP Network 658 Address Translator (Traditional NAT)", RFC 3022, January 2001. 660 [RFC3174] - Eastlake 3rd, D. and P. Jones, "US Secure Hash Algorithm 661 1 (SHA1)", RFC 3174, September 2001. 663 [RFC4033] - Arends, R., Austein, R., Larson, M., Massey, D., and S. 664 Rose, "DNS Security Introduction and Requirements", RFC 4033, March 665 2005. 667 [RFC4034] - Arends, R., Austein, R., Larson, M., Massey, D., and S. 668 Rose, "Resource Records for the DNS Security Extensions", RFC 4034, 669 March 2005. 671 [RFC4035] - Arends, R., Austein, R., Larson, M., Massey, D., and S. 672 Rose, "Protocol Modifications for the DNS Security Extensions", RFC 673 4035, March 2005. 675 [RFC4634] - Eastlake, D. and T. Hansen, "US Secure Hash Algorithms 676 (SHA)", RFC 4634, July 2006. 678 [RFC4966] - Aoun, C. and E. Davies, "Reasons to Move the Network 679 Address Translator - Protocol Translator (NAT-PT) to Historic 680 Status", RFC 4966, July 2007. 682 Author's Address 684 Donald E. Eastlake 3rd 685 Motorola Laboratories 686 111 Locke Drive 687 Marlborough, MA 01752 USA 689 Telephone: +1-508-786-7554 (w) 691 EMail: Donald.Eastlake@motorola.com 693 Copyright and Disclaimer 695 Copyright (C) The IETF Trust (2008). 697 This document is subject to the rights, licenses and restrictions 698 contained in BCP 78, and except as set forth therein, the authors 699 retain all their rights. 701 This document and the information contained herein are provided on an 702 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 703 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND 704 THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS 705 OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF 706 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 707 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 709 Additional IPR Provisions 711 The IETF takes no position regarding the validity or scope of any 712 Intellectual Property Rights or other rights that might be claimed to 713 pertain to the implementation or use of the technology described in 714 this document or the extent to which any license under such rights 715 might or might not be available; nor does it represent that it has 716 made any independent effort to identify any such rights. Information 717 on the procedures with respect to rights in RFC documents can be 718 found in BCP 78 and BCP 79. 720 Copies of IPR disclosures made to the IETF Secretariat and any 721 assurances of licenses to be made available, or the result of an 722 attempt made to obtain a general license or permission for the use of 723 such proprietary rights by implementers or users of this 724 specification can be obtained from the IETF on-line IPR repository at 725 http://www.ietf.org/ipr. 727 The IETF invites any interested party to bring to its attention any 728 copyrights, patents or patent applications, or other proprietary 729 rights that may cover technology that may be required to implement 730 this standard. Please address the information to the IETF at ietf- 731 ipr@ietf.org. 733 Expiration and File Name 735 This draft expires in August 2008. 737 Its file name is draft-eastlake-dnsext-cookies-03.txt