idnits 2.17.1 draft-ietf-dnsop-extended-error-09.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (September 10, 2019) is 1689 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) ** Obsolete normative reference: RFC 2434 (Obsoleted by RFC 5226) ** Obsolete normative reference: RFC 2671 (Obsoleted by RFC 6891) -- Obsolete informational reference (is this intentional?): RFC 2845 (Obsoleted by RFC 8945) Summary: 2 errors (**), 0 flaws (~~), 1 warning (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group W. Kumari 3 Internet-Draft Google 4 Intended status: Standards Track E. Hunt 5 Expires: March 13, 2020 ISC 6 R. Arends 7 ICANN 8 W. Hardaker 9 USC/ISI 10 D. Lawrence 11 Oracle + Dyn 12 September 10, 2019 14 Extended DNS Errors 15 draft-ietf-dnsop-extended-error-09 17 Abstract 19 This document defines an extensible method to return additional 20 information about the cause of DNS errors. Though created primarily 21 to extend SERVFAIL to provide additional information about the cause 22 of DNS and DNSSEC failures, the Extended DNS Errors option defined in 23 this document allows all response types to contain extended error 24 information. 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 March 13, 2020. 43 Copyright Notice 45 Copyright (c) 2019 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 and background . . . . . . . . . . . . . . . . . 3 61 1.1. Requirements notation . . . . . . . . . . . . . . . . . . 4 62 2. Extended Error EDNS0 option format . . . . . . . . . . . . . 4 63 3. Defined Extended DNS Errors . . . . . . . . . . . . . . . . . 5 64 3.1. Extended DNS Error Code 0 - Other . . . . . . . . . . . . 5 65 3.2. Extended DNS Error Code 1 - 66 Unsupported DNSKEY Algorithm . . . . . . . . . . . . . . 5 67 3.3. Extended DNS Error Code 2 - Unsupported 68 DS Algorithm . . . . . . . . . . . . . . . . . . . . . . 5 69 3.4. Extended DNS Error Code 3 - Stale Answer . . . . . . . . 5 70 3.5. Extended DNS Error Code 4 - Forged Answer . . . . . . . . 5 71 3.6. Extended DNS Error Code 5 - DNSSEC Indeterminate . . . . 5 72 3.7. Extended DNS Error Code 6 - DNSSEC Bogus . . . . . . . . 6 73 3.8. Extended DNS Error Code 7 - Signature Expired . . . . . . 6 74 3.9. Extended DNS Error Code 8 - Signature Not Yet Valid . . . 6 75 3.10. Extended DNS Error Code 9 - DNSKEY Missing . . . . . . . 6 76 3.11. Extended DNS Error Code 10 - RRSIGs Missing . . . . . . . 6 77 3.12. Extended DNS Error Code 11 - No Zone Key Bit Set . . . . 6 78 3.13. Extended DNS Error Code 12 - NSEC Missing . . . . . . . . 6 79 3.14. Extended DNS Error Code 13 - Cached Error . . . . . . . . 6 80 3.15. Extended DNS Error Code 14 - Not Ready . . . . . . . . . 6 81 3.16. Extended DNS Error Code 15 - Blocked . . . . . . . . . . 7 82 3.17. Extended DNS Error Code 16 - Censored . . . . . . . . . . 7 83 3.18. Extended DNS Error Code 17 - Prohibited . . . . . . . . . 7 84 3.19. Extended DNS Error Code 18 - Filtered . . . . . . . . . . 7 85 3.20. Extended DNS Error Code 19 - Stale NXDOMAIN Answer . . . 7 86 3.21. Extended DNS Error Code 20 - Lame . . . . . . . . . . . . 7 87 3.22. Extended DNS Error Code 21 - Deprecated . . . . . . . . . 8 88 3.23. Extended DNS Error Code 22 - No Reachable Authority . . . 8 89 3.24. Extended DNS Error Code 23 - Network Error . . . . . . . 8 90 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 91 4.1. A New Extended DNS Error Code EDNS Option . . . . . . . . 8 92 4.2. New Registry Table for Extended DNS Error Codes . . . . . 8 93 5. Security Considerations . . . . . . . . . . . . . . . . . . . 11 94 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 11 95 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 11 96 7.1. Normative References . . . . . . . . . . . . . . . . . . 11 97 7.2. Informative References . . . . . . . . . . . . . . . . . 12 98 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 12 100 1. Introduction and background 102 There are many reasons that a DNS query may fail, some of them 103 transient, some permanent; some can be resolved by querying another 104 server, some are likely best handled by stopping resolution. 105 Unfortunately, the error signals that a DNS server can return are 106 very limited, and are not very expressive. This means that 107 applications and resolvers often have to "guess" at what the issue is 108 - e.g. was the answer marked REFUSED because of a lame delegation, or 109 because the nameserver is still starting up and loading zones? Is a 110 SERVFAIL a DNSSEC validation issue, or is the nameserver experiencing 111 some other failure? 113 A good example of issues that would benefit by additional error 114 information are errors caused by DNSSEC validation issues. When a 115 stub resolver queries a name which is DNSSEC bogus (using a 116 validating resolver), the stub resolver receives only a SERVFAIL in 117 response. Unfortunately, the SERVFAIL Response Code (RCODE) is used 118 to signal many sorts of DNS errors, and so the stub resolvers only 119 option is to ask the next configured DNS resolver. The result of 120 trying the next resolver is one of two outcomes: either the next 121 resolver also validates, and a SERVFAIL is returned again or the next 122 resolver is not a validating resolver, and the user is returned a 123 potentially harmful result. With an Extended DNS Error (EDE) option 124 enclosed in the response message, the resolver is able to return a 125 more descriptive reason as to why any failures happened, or add 126 additional context to a message containing a NOERROR RCODE. 128 This document specifies a mechanism to extend DNS errors to provide 129 additional information about the cause of an error. These extended 130 DNS error codes described in this document and can be used by any 131 system that sends DNS queries and receives a response containing an 132 EDE option.. Different codes are useful in different circumstances, 133 and thus different systems (stub resolvers, recursive resolvers, and 134 authoritative resolvers) might receive and use them. 136 This document does not allow or prohibit any particular extended 137 error codes and information be matched with any particular RCODEs. 138 Some combinations of extended error codes and RCODEs may seem 139 nonsensical (such as resolver-specific extended error codes in 140 responses from authoritative servers), so systems interpreting the 141 extended error codes MUST NOT assume that a combination will make 142 sense. Receivers MUST be able to accept EDE codes and EXTRA-TEXT in 143 all messages, including even those with a NOERROR RCODE. 145 1.1. Requirements notation 147 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 148 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 149 document are to be interpreted as described in [RFC2119]. 151 2. Extended Error EDNS0 option format 153 This draft uses an EDNS0 ([RFC2671]) option to include Extended DNS 154 Error (EDE) information in DNS messages. The option is structured as 155 follows: 157 1 1 1 1 1 1 158 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 159 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 160 0: | OPTION-CODE | 161 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 162 2: | OPTION-LENGTH | 163 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 164 4: | INFO-CODE | 165 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 166 6: / EXTRA-TEXT ... / 167 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 169 Field definition details: 171 o OPTION-CODE, 2 octets (defined in [RFC6891]]), for EDE is TBD. 172 [RFC Editor: change TBD to the proper code once assigned by IANA.] 173 o OPTION-LENGTH, 2 octets ((defined in [RFC6891]]) contains the 174 length of the payload (everything after OPTION-LENGTH) in octets 175 and should be 4 plus the length of the EXTRA-TEXT section (which 176 may be a zero-length string). 177 o INFO-CODE, 16-bits, which is the principal contribution of this 178 document. This 16-bit value, encoded in network (MSB) byte order, 179 provides the additional context for the RESPONSE-CODE of the DNS 180 message. The INFO-CODE serves as an index to the "Extended DNS 181 Errors" registry Section 4.1. 182 o EXTRA-TEXT, a variable length, UTF-8 encoded, text field that may 183 hold additional textual information. Note: EXTRA-TEXT may be zero 184 octets in length, indicating there is no EXTRA-TEXT included. 185 Care should be take not to leak private information that an 186 observer would not otherwise have access to, such as account 187 numbers. 189 The Extended DNS Error (EDE) option can be included in any response 190 (SERVFAIL, NXDOMAIN, REFUSED, and even NOERROR, etc) to a query that 191 includes OPT Pseudo-RR [RFC6891]. This document includes a set of 192 initial codepoints (and requests to the IANA to add them to the 193 registry), but is extensible via the IANA registry to allow 194 additional error and information codes to be defined in the future. 196 3. Defined Extended DNS Errors 198 This document defines some initial EDE codes. The mechanism is 199 intended to be extensible, and additional code-points can be 200 registered in the "Extended DNS Errors" registry Section 4.1. The 201 INFO-CODE from the EDE EDNS option is used to serve as an index into 202 the "Extended DNS Error" IANA registry, the initial values for which 203 are defined in the following sub-sections. 205 3.1. Extended DNS Error Code 0 - Other 207 The error in question falls into a category that does not match known 208 extended error codes. Implementations SHOULD include a EXTRA-TEXT 209 value to augment this error code with additional information. 211 3.2. Extended DNS Error Code 1 - Unsupported DNSKEY Algorithm 213 The resolver attempted to perform DNSSEC validation, but a DNSKEY 214 RRSET contained only unknown algorithms. 216 3.3. Extended DNS Error Code 2 - Unsupported DS Algorithm 218 The resolver attempted to perform DNSSEC validation, but a DS RRSET 219 contained only unknown algorithms. 221 3.4. Extended DNS Error Code 3 - Stale Answer 223 The resolver was unable to resolve answer within its time limits and 224 decided to answer with previously cached data instead of answering 225 with an error. This is typically caused by problems communicating 226 with an authoritative serever, possibly as result of a DoS attack 227 against another network. 229 3.5. Extended DNS Error Code 4 - Forged Answer 231 For policy reasons (legal obligation, or malware filtering, for 232 instance), an answer was forged. 234 3.6. Extended DNS Error Code 5 - DNSSEC Indeterminate 236 The resolver attempted to perform DNSSEC validation, but validation 237 ended in the Indeterminate state. 239 3.7. Extended DNS Error Code 6 - DNSSEC Bogus 241 The resolver attempted to perform DNSSEC validation, but validation 242 ended in the Bogus state. 244 3.8. Extended DNS Error Code 7 - Signature Expired 246 The resolver attempted to perform DNSSEC validation, but a signature 247 in the validation chain was expired. 249 3.9. Extended DNS Error Code 8 - Signature Not Yet Valid 251 The resolver attempted to perform DNSSEC validation, but the 252 signatures received were not yet valid. 254 3.10. Extended DNS Error Code 9 - DNSKEY Missing 256 A DS record existed at a parent, but no supported matching DNSKEY 257 record could be found for the child. 259 3.11. Extended DNS Error Code 10 - RRSIGs Missing 261 The resolver attempted to perform DNSSEC validation, but no RRSIGs 262 could be found for at least one RRset where RRSIGs were expected. 264 3.12. Extended DNS Error Code 11 - No Zone Key Bit Set 266 The resolver attempted to perform DNSSEC validation, but no Zone Key 267 Bit was set in a DNSKEY. 269 3.13. Extended DNS Error Code 12 - NSEC Missing 271 The resolver attempted to perform DNSSEC validation, but the 272 requested data was missing and a covering NSEC or NSEC3 was not 273 provided. 275 3.14. Extended DNS Error Code 13 - Cached Error 277 The resolver has cached SERVFAIL for this query. 279 3.15. Extended DNS Error Code 14 - Not Ready 281 The server is unable to answer the query as it is not fully 282 functional (yet). 284 3.16. Extended DNS Error Code 15 - Blocked 286 The resolver attempted to perfom a DNS query but the domain is 287 blacklisted due to a security policy implemented on the server being 288 directly talked to. 290 3.17. Extended DNS Error Code 16 - Censored 292 The resolver attempted to perfom a DNS query but the domain was 293 blacklisted by a security policy imposed upon the server being talked 294 to. Note that how the imposed policy is applied is irrelevant (in- 295 band DNS filtering, court order, etc). 297 3.18. Extended DNS Error Code 17 - Prohibited 299 An authoritative or recursive resolver that receives a query from an 300 "unauthorized" client can annotate its REFUSED message with this 301 code. Examples of "unauthorized" clients are recursive queries from 302 IP addresses outside the network, blacklisted IP addresses, local 303 policy, etc. 305 3.19. Extended DNS Error Code 18 - Filtered 307 An authoritative or recursive resolver that receives a query from a 308 client that had requested certain domains be filtered can annotate 309 its REFUSED message with this code. Functionally, this amounts to 310 "you requested that we filter domains like this one." 312 3.20. Extended DNS Error Code 19 - Stale NXDOMAIN Answer 314 The resolver was unable to resolve an answer within its configured 315 time limits and decided to answer with a previously cached NXDOMAIN 316 answer instead of answering with an error. This is typically caused 317 by problems communicating with an authoritative serever, possibly as 318 result of a DoS attack against another network. 320 3.21. Extended DNS Error Code 20 - Lame 322 An authoritative server that receives a query (with the RD bit clear) 323 for a domain for which it is not authoritative SHOULD include this 324 EDE code in the SERVFAIL response. A resolver that receives a query 325 (with the RD bit clear) SHOULD include this EDE code in the REFUSED 326 response. 328 3.22. Extended DNS Error Code 21 - Deprecated 330 The requested operation or query is not supported as its use has been 331 deprecated. 333 3.23. Extended DNS Error Code 22 - No Reachable Authority 335 The resolver could not reach any of the authoritative name servers 336 (or they refused to reply). 338 3.24. Extended DNS Error Code 23 - Network Error 340 An unrecoverable error occurred while communicating with another 341 server. 343 4. IANA Considerations 345 4.1. A New Extended DNS Error Code EDNS Option 347 This document defines a new EDNS(0) option, entitled "Extended DNS 348 Error", assigned a value of TBD1 from the "DNS EDNS0 Option Codes 349 (OPT)" registry [to be removed upon publication: 350 [http://www.iana.org/assignments/dns-parameters/dns- 351 parameters.xhtml#dns-parameters-11] 353 Value Name Status Reference 354 ----- ---------------- ------ ------------------ 355 TBD Extended DNS Error TBD [ This document ] 357 4.2. New Registry Table for Extended DNS Error Codes 359 This document defines a new IANA registry table, where the index 360 value is the INFO-CODE from the "Extended DNS Error" EDNS option 361 defined in this document. The IANA is requested to create and 362 maintain this "Extended DNS Error" codes registry. The code-point 363 space for the INFO-CODE index is to be broken into 3 ranges: 365 o 0 - 32767: Expert Review [RFC2434]. 366 o 32768 - 49151: First come, first served. 367 o 49152 - 65535: Experimental / Private use. 369 A starting set of entries, based on the contents of this document, is 370 as follows: 372 INFO-CODE: 0 373 Purpose: Other Error 374 Reference: Section 3.1 375 INFO-CODE: 1 376 Purpose: Unsupported DNSKEY Algorithm 377 Reference: Section 3.2 379 INFO-CODE: 2 380 Purpose: Unsupported DS Algorithm 381 Reference: Section 3.3 383 INFO-CODE: 3 384 Purpose: Stale Answer 385 Reference: Section 3.4 387 INFO-CODE: 4 388 Purpose: Forged Answer 389 Reference: Section 3.5 391 INFO-CODE: 5 392 Purpose: DNSSEC Indeterminate 393 Reference: Section 3.6 395 INFO-CODE: 6 396 Purpose: DNSSEC Bogus 397 Reference: Section 3.7 399 INFO-CODE: 7 400 Purpose: Signature Expired 401 Reference: Section 3.8 403 INFO-CODE: 8 404 Purpose: Signature Not Yet Valid 405 Reference: Section 3.9 407 INFO-CODE: 9 408 Purpose: DNSKEY Missing 409 Reference: Section 3.10 411 INFO-CODE: 10 412 Purpose: RRSIGs Missing 413 Reference: Section 3.11 415 INFO-CODE: 11 416 Purpose: No Zone Key Bit Set 417 Reference: Section 3.12 419 INFO-CODE: 12 420 Purpose: NSEC Missing 421 Reference: Section 3.13 422 INFO-CODE: 13 423 Purpose: Cached Error 424 Reference: Section 3.14 426 INFO-CODE: 14 427 Purpose: Not Ready. 428 Reference: Section 3.15 430 INFO-CODE: 15 431 Purpose: Blocked 432 Reference: Section 3.16 434 INFO-CODE: 16 435 Purpose: Censored 436 Reference: Section 3.17 438 INFO-CODE: 17 439 Purpose: Prohibited 440 Reference: Section 3.18 442 INFO-CODE: 18 443 Purpose: Filtered 444 Reference: Section 3.19 446 INFO-CODE: 19 447 Purpose: Stale NXDomain Answer 448 Reference: Section 3.20 450 INFO-CODE: 20 451 Purpose: Lame 452 Reference: Section 3.21 454 INFO-CODE: 21 455 Purpose: Deprecated 456 Reference: Section 3.22 458 INFO-CODE: 22 459 Purpose: No Reachable Authority 460 Reference: Section 3.23 462 INFO-CODE: 23 463 Purpose: Network Error 464 Reference: Section 3.24 466 5. Security Considerations 468 Though DNSSEC continues to be deployed, unfortunately a significant 469 number of clients (~11% according to [GeoffValidation]) that receive 470 a SERVFAIL from a validating resolver because of a DNSSEC validaion 471 issue will simply ask the next (potentially non-validating) resolver 472 in their list, and thus don't get any of the protections which DNSSEC 473 should provide. 475 This information is unauthenticated information, and an attacker (e.g 476 a MITM or malicious recursive server) could insert an extended error 477 response into already untrusted data -- ideally clients and resolvers 478 would not trust any unauthenticated information, but until we live in 479 an era where all DNS answers are authenticated via DNSSEC or other 480 mechanisms [RFC2845] [RFC8094], there are some tradeoffs. As an 481 example, an attacker who is able to insert the DNSSEC Bogus Extended 482 Error into a packet could instead simply reply with a fictitious 483 address (A or AAAA) record. 485 6. Acknowledgements 487 The authors wish to thank Joe Abley, Mark Andrews, Vittorio Bertola, 488 Stephane Bortzmeyer, Vladimir Cunat, Ralph Dolmans, Peter DeVries, 489 Peter van Dijk, Donald Eastlake, Bob Harold, Paul Hoffman, Geoff 490 Huston, Shane Kerr, Edward Lewis, Carlos M. Martinez, George 491 Michelson, Michael Sheldon, Puneet Sood, Petr Spacek, Ondrej Sury, 492 Loganaden Velvindron, and Paul Vixie. They also vaguely remember 493 discussing this with a number of people over the years, but have 494 forgotten who all they were -- if you were one of them, and are not 495 listed, please let us know and we'll acknowledge you. 497 One author also wants to thank the band "Infected Mushroom" for 498 providing a good background soundtrack (and to see if he can get away 499 with this in an RFC!) Another author would like to thank the band 500 "Mushroom Infectors". This was funny at the time we wrote it, but we 501 cannot remember why... 503 7. References 505 7.1. Normative References 507 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 508 Requirement Levels", BCP 14, RFC 2119, 509 DOI 10.17487/RFC2119, March 1997, . 512 [RFC2434] Narten, T. and H. Alvestrand, "Guidelines for Writing an 513 IANA Considerations Section in RFCs", RFC 2434, 514 DOI 10.17487/RFC2434, October 1998, . 517 [RFC2671] Vixie, P., "Extension Mechanisms for DNS (EDNS0)", 518 RFC 2671, DOI 10.17487/RFC2671, August 1999, 519 . 521 [RFC6891] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms 522 for DNS (EDNS(0))", STD 75, RFC 6891, 523 DOI 10.17487/RFC6891, April 2013, . 526 7.2. Informative References 528 [GeoffValidation] 529 IANA, "A quick review of DNSSEC Validation in today's 530 Internet", June 2016, . 533 [RFC2845] Vixie, P., Gudmundsson, O., Eastlake 3rd, D., and B. 534 Wellington, "Secret Key Transaction Authentication for DNS 535 (TSIG)", RFC 2845, DOI 10.17487/RFC2845, May 2000, 536 . 538 [RFC8094] Reddy, T., Wing, D., and P. Patil, "DNS over Datagram 539 Transport Layer Security (DTLS)", RFC 8094, 540 DOI 10.17487/RFC8094, February 2017, . 543 Authors' Addresses 545 Warren Kumari 546 Google 547 1600 Amphitheatre Parkway 548 Mountain View, CA 94043 549 US 551 Email: warren@kumari.net 552 Evan Hunt 553 ISC 554 950 Charter St 555 Redwood City, CA 94063 556 US 558 Email: each@isc.org 560 Roy Arends 561 ICANN 563 Email: roy.arends@icann.org 565 Wes Hardaker 566 USC/ISI 567 P.O. Box 382 568 Davis, CA 95617 569 US 571 Email: ietf@hardakers.net 573 David C Lawrence 574 Oracle + Dyn 575 150 Dow St 576 Manchester, NH 03101 577 US 579 Email: tale@dd.org