idnits 2.17.1 draft-ietf-dnsop-extended-error-07.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 (August 09, 2019) is 1693 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) == Unused Reference: 'RFC2845' is defined on line 509, but no explicit reference was found in the text == Unused Reference: 'RFC8094' is defined on line 514, but no explicit reference was found in the text ** Obsolete normative reference: RFC 2671 (Obsoleted by RFC 6891) -- Obsolete informational reference (is this intentional?): RFC 2845 (Obsoleted by RFC 8945) Summary: 1 error (**), 0 flaws (~~), 3 warnings (==), 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: February 10, 2020 ISC 6 R. Arends 7 ICANN 8 W. Hardaker 9 USC/ISI 10 D. Lawrence 11 Oracle + Dyn 12 August 09, 2019 14 Extended DNS Errors 15 draft-ietf-dnsop-extended-error-07 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 February 10, 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 . . . . . . . . . . . . . . . . . . 3 62 2. Extended Error EDNS0 option format . . . . . . . . . . . . . 4 63 3. Use of the Extended DNS Error option . . . . . . . . . . . . 4 64 3.1. The INFO-CODE field . . . . . . . . . . . . . . . . . . . 5 65 3.2. The EXTRA-TEXT field . . . . . . . . . . . . . . . . . . 5 66 4. Defined Extended DNS Errors . . . . . . . . . . . . . . . . . 5 67 4.1. Extended DNS Error Code 0 - Other . . . . . . . . . . . . 5 68 4.2. Extended DNS Error Code 1 - 69 Unsupported DNSKEY Algorithm . . . . . . . . . . . . . . 5 70 4.3. Extended DNS Error Code 2 - Unsupported 71 DS Algorithm . . . . . . . . . . . . . . . . . . . . . . 5 72 4.4. Extended DNS Error Code 3 - Stale Answer . . . . . . . . 5 73 4.5. Extended DNS Error Code 4 - Forged Answer . . . . . . . . 6 74 4.6. Extended DNS Error Code 5 - DNSSEC Indeterminate . . . . 6 75 4.7. Extended DNS Error Code 6 - DNSSEC Bogus . . . . . . . . 6 76 4.8. Extended DNS Error Code 7 - Signature Expired . . . . . . 6 77 4.9. Extended DNS Error Code 8 - Signature Not Yet Valid . . . 6 78 4.10. Extended DNS Error Code 9 - DNSKEY Missing . . . . . . . 6 79 4.11. Extended DNS Error Code 10 - RRSIGs Missing . . . . . . . 6 80 4.12. Extended DNS Error Code 11 - No Zone Key Bit Set . . . . 6 81 4.13. Extended DNS Error Code 12 - NSEC Missing . . . . . . . . 6 82 4.14. Extended DNS Error Code 13 - Cached Error . . . . . . . . 7 83 4.15. Extended DNS Error Code 14 - Not Ready . . . . . . . . . 7 84 4.16. Extended DNS Error Code 15 - Blocked . . . . . . . . . . 7 85 4.17. Extended DNS Error Code 16 - Censored . . . . . . . . . . 7 86 4.18. Extended DNS Error Code 17 - Prohibited . . . . . . . . . 7 87 4.19. Extended DNS Error Code 18 - Stale Answer . . . . . . . . 7 88 4.20. Extended DNS Error Code 19 - Lame . . . . . . . . . . . . 7 89 4.21. Extended DNS Error Code 20 - Deprecated . . . . . . . . . 8 90 4.22. Extended DNS Error Code 21 - No Reachable Authority . . . 8 91 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 92 5.1. A New Extended Error Code EDNS Option . . . . . . . . . . 8 93 5.2. New Double-Index Registry Table for Extended Error Codes 8 94 6. Security Considerations . . . . . . . . . . . . . . . . . . . 10 95 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 11 96 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 11 97 8.1. Normative References . . . . . . . . . . . . . . . . . . 11 98 8.2. Informative References . . . . . . . . . . . . . . . . . 11 99 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 12 101 1. Introduction and background 103 There are many reasons that a DNS query may fail, some of them 104 transient, some permanent; some can be resolved by querying another 105 server, some are likely best handled by stopping resolution. 106 Unfortunately, the error signals that a DNS server can return are 107 very limited, and are not very expressive. This means that 108 applications and resolvers often have to "guess" at what the issue is 109 - e.g. was the answer marked REFUSED because of a lame delegation, or 110 because the nameserver is still starting up and loading zones? Is a 111 SERVFAIL a DNSSEC validation issue, or is the nameserver experiencing 112 a bad hair day? 114 A good example of issues that would benefit by additional error 115 information are errors caused by DNSSEC validation issues. When a 116 stub resolver queries a DNSSEC bogus name (using a validating 117 resolver), the stub resolver receives only a SERVFAIL in response. 118 Unfortunately, SERVFAIL is used to signal many sorts of DNS errors, 119 and so the stub resolver simply asks the next configured DNS 120 resolver. The result of trying the next resolver is one of two 121 outcomes: either the next resolver also validates, a SERVFAIL is 122 returned again, and the user gets an (largely) incomprehensible error 123 message; or the next resolver is not a validating resolver, and the 124 user is returned a potentially harmful result. 126 This document specifies a mechanism to extend (or annotate) DNS 127 errors to provide additional information about the cause of the 128 error. These extended error codes are specially useful when received 129 by resolvers, to return to stub resolvers or to downstream resolvers. 130 Authoritative servers MAY parse and use them, but most error codes 131 would make no sense for them. Authoritative servers may need to 132 generate extended error codes though. 134 1.1. Requirements notation 136 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 137 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 138 document are to be interpreted as described in [RFC2119]. 140 2. Extended Error EDNS0 option format 142 This draft uses an EDNS0 ([RFC2671]) option to include Extended DNS 143 Error (EDE) information in DNS messages. The option is structured as 144 follows: 146 1 1 1 1 1 1 147 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 148 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 149 0: | OPTION-CODE | 150 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 151 2: | OPTION-LENGTH | 152 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 153 4: | INFO-CODE | 154 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 155 6: / EXTRA-TEXT ... / 156 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 158 Field definition details: 160 o OPTION-CODE, 2 octets (defined in [RFC6891]]), for EDE is TBD. 161 [RFC Editor: change TBD to the proper code once assigned by IANA.] 162 o OPTION-LENGTH, 2 octets ((defined in [RFC6891]]) contains the 163 length of the payload (everything after OPTION-LENGTH) in octets 164 and should be 4 plus the length of the EXTRA-TEXT section (which 165 may be a zero-length string). 166 o INFO-CODE, 16-bits, which is the principal contribution of this 167 document. 168 o EXTRA-TEXT, a variable length, UTF-8 encoded, text field that may 169 hold additional textual information. Note: EXTRA-TEXT may be zero 170 octets in length, indicating there is no EXTRA-TEXT included. 172 3. Use of the Extended DNS Error option 174 The Extended DNS Error (EDE) is an EDNS option. It can be included 175 in any response (SERVFAIL, NXDOMAIN, REFUSED, etc) to a query that 176 includes OPT Pseudo-RR [RFC6891]. This document includes a set of 177 initial codepoints (and requests to the IANA to add them to the 178 registry), but is extensible via the IANA registry to allow 179 additional error and information codes to be defined in the future. 181 The fields of the Extended DNS Error option are defined further in 182 the following sub-sections. 184 3.1. The INFO-CODE field 186 This 16-bit value, encoded in network (MSB) byte order, provides the 187 additional context for the RESPONSE-CODE of the DNS message. The 188 INFO-CODE serves as an index to the "Extended DNS Errors" registry 189 Section 5.1. 191 3.2. The EXTRA-TEXT field 193 The UTF-8-encoded, EXTRA-TEXT field may be zero-length, or may hold 194 additional information useful to network operators. 196 4. 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 5.1. The 201 INFO-CODE from the EDE EDNS option is used to serve as an index into 202 the "Extended DNS Error codes" IANA registry, the initial values for 203 which are defined in the following sub-sections. 205 4.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 4.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 4.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 4.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 a previously cached data instead of answering 225 with an error. This is typically caused by problems on authoritative 226 side, possibly as result of a DoS attack. 228 4.5. Extended DNS Error Code 4 - Forged Answer 230 For policy reasons (legal obligation, or malware filtering, for 231 instance), an answer was forged. 233 4.6. Extended DNS Error Code 5 - DNSSEC Indeterminate 235 The resolver attempted to perform DNSSEC validation, but validation 236 ended in the Indeterminate state. 238 4.7. Extended DNS Error Code 6 - DNSSEC Bogus 240 The resolver attempted to perform DNSSEC validation, but validation 241 ended in the Bogus state. 243 4.8. Extended DNS Error Code 7 - Signature Expired 245 The resolver attempted to perform DNSSEC validation, a signature in 246 the validation chain was expired. 248 4.9. Extended DNS Error Code 8 - Signature Not Yet Valid 250 The resolver attempted to perform DNSSEC validation, but the 251 signatures received were not yet valid. 253 4.10. Extended DNS Error Code 9 - DNSKEY Missing 255 A DS record existed at a parent, but no supported matching DNSKEY 256 record could be found for the child. 258 4.11. Extended DNS Error Code 10 - RRSIGs Missing 260 The resolver attempted to perform DNSSEC validation, but no RRSIGs 261 could be found for at least one RRset where RRSIGs were expected. 263 4.12. Extended DNS Error Code 11 - No Zone Key Bit Set 265 The resolver attempted to perform DNSSEC validation, but no Zone Key 266 Bit was set in a DNSKEY. 268 4.13. Extended DNS Error Code 12 - NSEC Missing 270 The resolver attempted to perform DNSSEC validation, but the 271 requested data was missing and a covering NSEC or NSEC3 was not 272 provided. 274 4.14. Extended DNS Error Code 13 - Cached Error 276 The resolver has cached SERVFAIL for this query without additional 277 information. 279 4.15. Extended DNS Error Code 14 - Not Ready 281 The server is unable to answer the query as it is not fully up and 282 functional yet. 284 4.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 4.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 somehow, court order, etc). 297 4.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 4.19. Extended DNS Error Code 18 - Stale Answer 307 The resolver was unable to resolve answer within its time limits and 308 decided to answer with a previously cached NXDOMAIN answer instead of 309 answering with an error. This is typically caused by problems on 310 authoritative side, possibly as result of a DoS attack. 312 4.20. Extended DNS Error Code 19 - Lame 314 An authoritative server that receives a query (with the RD bit clear) 315 for a domain for which it is not authoritative SHOULD include this 316 EDE code in the SERVFAIL response. A resolver that receives a query 317 (with the RD bit clear) SHOULD include this EDE code in the REFUSED 318 response. 320 4.21. Extended DNS Error Code 20 - Deprecated 322 The requested operation or query is not supported as its use has been 323 deprecated. 325 4.22. Extended DNS Error Code 21 - No Reachable Authority 327 The resolver could not reach any of the authoritative name servers 328 (or they refused to reply). 330 5. IANA Considerations 332 5.1. A New Extended Error Code EDNS Option 334 This document defines a new EDNS(0) option, entitled "Extended DNS 335 Error", assigned a value of TBD1 from the "DNS EDNS0 Option Codes 336 (OPT)" registry [to be removed upon publication: 337 [http://www.iana.org/assignments/dns-parameters/dns- 338 parameters.xhtml#dns-parameters-11] 340 Value Name Status Reference 341 ----- ---------------- ------ ------------------ 342 TBD Extended DNS Error TBD [ This document ] 344 5.2. New Double-Index Registry Table for Extended Error Codes 346 This document defines a new double-index IANA registry table, where 347 the index value is the INFO-CODE from the Extended DNS Error EDNS 348 option defined in this document. The IANA is requested to create and 349 maintain this "Extended DNS Error codes" registry. The code-point 350 space for each INFO-CODE index is to be broken into 3 ranges: 352 o 0 - : Specification required. 353 o 65023 - 65279: First come, first served. 354 o 65280 - 32767: Experimental / Private use 356 A starting set of entries, based on the contents of this document, is 357 as follows: 359 INFO-CODE: 0 360 Purpose: Other Error 361 Reference: Section 4.1 363 INFO-CODE: 1 364 Purpose: Unsupported DNSKEY Algorithm 365 Reference: Section 4.2 367 INFO-CODE: 2 368 Purpose: Unsupported DS Algorithm 369 Reference: Section 4.3 371 INFO-CODE: 3 372 Purpose: Answering with stale/cached data 373 Reference: Section 4.4 375 INFO-CODE: 4 376 Purpose: Forged Answer 377 Reference: Section 4.5 379 INFO-CODE: 5 380 Purpose: DNSSEC Indeterminate 381 Reference: Section 4.6 383 INFO-CODE: 6 384 Purpose: DNSSEC Bogus 385 Reference: Section 4.7 387 INFO-CODE: 7 388 Purpose: Signature Expired 389 Reference: Section 4.8 391 INFO-CODE: 8 392 Purpose: Signature Not Yet Valid 393 Reference: Section 4.9 395 INFO-CODE: 9 396 Purpose: DNSKEY Missing 397 Reference: Section 4.10 399 INFO-CODE: 10 400 Purpose: RRSIGs Missing 401 Reference: Section 4.11 403 INFO-CODE: 11 404 Purpose: No Zone Key Bit Set 405 Reference: Section 4.12 407 INFO-CODE: 12 408 Purpose: No NSEC records could be obtained 409 Reference: Section 4.13 411 INFO-CODE: 13 412 Purpose: The SERVFAIL error comes from the cache 413 Reference: Section 4.14 415 INFO-CODE: 14 416 Purpose: Not Ready. 417 Reference: Section 4.15 419 INFO-CODE: 15 420 Purpose: Blocked 421 Reference: Section 4.16 423 INFO-CODE: 16 424 Purpose: Censored 425 Reference: Section 4.17 427 INFO-CODE: 17 428 Purpose: Prohibited 429 Reference: Section 4.18 431 INFO-CODE: 18 432 Purpose: Answering with stale/cached NXDOMAIN data 433 Reference: Section 4.19 435 INFO-CODE: 19 436 Purpose: Lame 437 Reference: Section 4.20 439 INFO-CODE: 20 440 Purpose: Deprecated 441 Reference: Section 4.21 443 INFO-CODE: 21 444 Purpose: No Reachable Authority 445 Reference: Section 4.21 447 6. Security Considerations 449 Though DNSSEC continues to be deployed, unfortunately a significant 450 number of clients (~11% according to [GeoffValidation]) that receive 451 a SERVFAIL from a validating resolver because of a DNSSEC validaion 452 issue will simply ask the next (potentially non-validating) resolver 453 in their list, and thus don't get any of the protections which DNSSEC 454 should provide. This is very similar to a kid asking his mother if 455 he can have another cookie. When the mother says "No, it will ruin 456 your dinner!", going off and asking his (more permissive) father and 457 getting a "Yes, sure, have a cookie!". 459 This information is unauthenticated information, and an attacker (e.g 460 MITM or malicious recursive server) could insert an extended error 461 response into already untrusted data -- ideally clients and resolvers 462 would not trust any unauthenticated information, but until we live in 463 an era where all DNS answers are authenticated via DNSSEC or other 464 mechanisms, there are some tradeoffs. As an example, an attacker who 465 is able to insert the DNSSEC Bogus Extended Error into a packet could 466 instead simply reply with a fictitious address (A or AAAA) record. 468 7. Acknowledgements 470 The authors wish to thank Joe Abley, Mark Andrews, Stephane 471 Bortzmeyer, Vladimir Cunat, Peter DeVries, Peter van Dijk, Donald 472 Eastlake, Bob Harold, Geoff Huston, Shane Kerr, Edward Lewis, Carlos 473 M. Martinez, George Michelson, Michael Sheldon, Petr Spacek, Ondrej 474 Sury, Loganaden Velvindron, and Paul Vixie. They also vaguely 475 remember discussing this with a number of people over the years, but 476 have forgotten who all they were -- if you were one of them, and are 477 not listed, please let us know and we'll acknowledge you. 479 I also want to thank the band "Infected Mushroom" for providing a 480 good background soundtrack (and to see if I can get away with this!) 481 Another author would like to thank the band "Mushroom Infectors". 482 This was funny at the time we wrote it, but we cannot remember why... 484 8. References 486 8.1. Normative References 488 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 489 Requirement Levels", BCP 14, RFC 2119, 490 DOI 10.17487/RFC2119, March 1997, . 493 [RFC2671] Vixie, P., "Extension Mechanisms for DNS (EDNS0)", 494 RFC 2671, DOI 10.17487/RFC2671, August 1999, 495 . 497 [RFC6891] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms 498 for DNS (EDNS(0))", STD 75, RFC 6891, 499 DOI 10.17487/RFC6891, April 2013, . 502 8.2. Informative References 504 [GeoffValidation] 505 IANA, "A quick review of DNSSEC Validation in today's 506 Internet", June 2016, . 509 [RFC2845] Vixie, P., Gudmundsson, O., Eastlake 3rd, D., and B. 510 Wellington, "Secret Key Transaction Authentication for DNS 511 (TSIG)", RFC 2845, DOI 10.17487/RFC2845, May 2000, 512 . 514 [RFC8094] Reddy, T., Wing, D., and P. Patil, "DNS over Datagram 515 Transport Layer Security (DTLS)", RFC 8094, 516 DOI 10.17487/RFC8094, February 2017, . 519 Authors' Addresses 521 Warren Kumari 522 Google 523 1600 Amphitheatre Parkway 524 Mountain View, CA 94043 525 US 527 Email: warren@kumari.net 529 Evan Hunt 530 ISC 531 950 Charter St 532 Redwood City, CA 94063 533 US 535 Email: each@isc.org 537 Roy Arends 538 ICANN 540 Email: roy.arends@icann.org 542 Wes Hardaker 543 USC/ISI 544 P.O. Box 382 545 Davis, CA 95617 546 US 548 Email: ietf@hardakers.net 549 David C Lawrence 550 Oracle + Dyn 551 150 Dow St 552 Manchester, NH 03101 553 US 555 Email: tale@dd.org