RFC 8914 | Extended DNS Errors | October 2020 |
Kumari, et al. | Standards Track | [Page] |
This document defines an extensible method to return additional information about the cause of DNS errors. Though created primarily to extend SERVFAIL to provide additional information about the cause of DNS and DNSSEC failures, the Extended DNS Errors option defined in this document allows all response types to contain extended error information. Extended DNS Error information does not change the processing of RCODEs.¶
This is an Internet Standards Track document.¶
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.¶
Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at https://www.rfc-editor.org/info/rfc8914.¶
Copyright (c) 2020 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.¶
There are many reasons that a DNS query may fail -- some of them transient, some permanent; some can be resolved by querying another server, some are likely best handled by stopping resolution. Unfortunately, the error signals that a DNS server can return are very limited and are not very expressive. This means that applications and resolvers often have to "guess" at what the issue is, e.g., was the answer marked REFUSED because of a lame delegation or because the nameserver is still starting up and loading zones? Is a SERVFAIL a DNSSEC validation issue, or is the nameserver experiencing some other failure? What error messages should be presented to the user or logged under these conditions?¶
A good example of issues that would benefit from additional error information are errors caused by DNSSEC validation issues. When a stub resolver queries a name that is DNSSEC bogus [RFC8499] (using a validating resolver), the stub resolver receives only a SERVFAIL in response. Unfortunately, the SERVFAIL Response Code (RCODE) is used to signal many sorts of DNS errors, and so the stub resolver's only option is to ask the next configured DNS resolver. The result of trying the next resolver is one of two outcomes: either the next resolver also validates and a SERVFAIL is returned again or the next resolver is not a validating resolver and the user is returned a potentially harmful result. With an Extended DNS Error (EDE) option enclosed in the response message, the resolver is able to return a more descriptive reason as to why any failures happened or add additional context to a message containing a NOERROR RCODE.¶
This document specifies a mechanism to extend DNS errors to provide additional information about the cause of an error. The Extended DNS Error codes described in this document can be used by any system that sends DNS queries and receives a response containing an EDE option. Different codes are useful in different circumstances, and thus different systems (stub resolvers, recursive resolvers, and authoritative resolvers) might receive and use them.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
This document uses an Extended Mechanism for DNS (EDNS0) [RFC6891] option to include Extended DNS Error (EDE) information in DNS messages. The option is structured as follows:¶
1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 0: | OPTION-CODE | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 2: | OPTION-LENGTH | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 4: | INFO-CODE | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 6: / EXTRA-TEXT ... / +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+¶
Field definition details:¶
The Extended DNS Error (EDE) option can be included in any response (SERVFAIL, NXDOMAIN, REFUSED, even NOERROR, etc.) to a query that includes an OPT pseudo-RR [RFC6891]. This document includes a set of initial codepoints but is extensible via the IANA registry defined and created in Section 5.2.¶
When the response grows beyond the requestor's UDP payload size [RFC6891], servers SHOULD truncate messages by dropping EDE options before dropping other data from packets. Implementations SHOULD set the truncation bit when dropping EDE options. Because long EXTRA-TEXT fields may trigger truncation (which is undesirable given the supplemental nature of EDE), implementers and operators creating EDE options SHOULD avoid lengthy EXTRA-TEXT contents.¶
When a resolver or forwarder receives an EDE option, whether or not (and how) to pass along EDE information on to their original client is implementation dependent. Implementations MAY choose to not forward information, or they MAY choose to create a new EDE option(s) that conveys the information encoded in the received EDE. When doing so, the source of the error SHOULD be attributed in the EXTRA-TEXT field, since an EDNS0 option received by the original client will appear to have come from the resolver or forwarder sending it.¶
This document does not allow or prohibit any particular extended error codes and information to be matched with any particular RCODEs. Some combinations of extended error codes and RCODEs may seem nonsensical (such as resolver-specific extended error codes received in responses from authoritative servers), so systems interpreting the extended error codes MUST NOT assume that a combination will make sense. Receivers MUST be able to accept EDE codes and EXTRA-TEXT in all messages, including those with a NOERROR RCODE but need not act on them. Applications MUST continue to follow requirements from applicable specifications on how to process RCODEs no matter what EDE values are also received. Senders MAY include more than one EDE option and receivers MUST be able to accept (but not necessarily process or act on) multiple EDE options in a DNS message.¶
This document defines some initial EDE codes. The mechanism is intended to be extensible, and additional codepoints can be registered in the "Extended DNS Errors" registry (Section 5.2). The INFO-CODE from the EDE EDNS option is used to serve as an index into the "Extended DNS Error" IANA registry, the initial values for which are defined in the following subsections.¶
The error in question falls into a category that does not match known extended error codes. Implementations SHOULD include an EXTRA-TEXT value to augment this error code with additional information.¶
The resolver attempted to perform DNSSEC validation, but a DNSKEY RRset contained only unsupported DNSSEC algorithms.¶
The resolver attempted to perform DNSSEC validation, but a DS RRset contained only unsupported Digest Types.¶
The resolver was unable to resolve the answer within its time limits and decided to answer with previously cached data instead of answering with an error. This is typically caused by problems communicating with an authoritative server, possibly as result of a denial of service (DoS) attack against another network. (See also Code 19.)¶
For policy reasons (legal obligation or malware filtering, for instance), an answer was forged. Note that this should be used when an answer is still provided, not when failure codes are returned instead. See Blocked (15), Censored (16), and Filtered (17) for use when returning other response codes.¶
The resolver attempted to perform DNSSEC validation, but validation ended in the Indeterminate state [RFC4035].¶
The resolver attempted to perform DNSSEC validation, but validation ended in the Bogus state.¶
The resolver attempted to perform DNSSEC validation, but no signatures are presently valid and some (often all) are expired.¶
The resolver attempted to perform DNSSEC validation, but no signatures are presently valid and at least some are not yet valid.¶
A DS record existed at a parent, but no supported matching DNSKEY record could be found for the child.¶
The resolver attempted to perform DNSSEC validation, but no RRSIGs could be found for at least one RRset where RRSIGs were expected.¶
The resolver attempted to perform DNSSEC validation, but no Zone Key Bit was set in a DNSKEY.¶
The resolver attempted to perform DNSSEC validation, but the requested data was missing and a covering NSEC or NSEC3 was not provided.¶
The resolver is returning the SERVFAIL RCODE from its cache.¶
The server is unable to answer the query, as it was not fully functional when the query was received.¶
The server is unable to respond to the request because the domain is on a blocklist due to an internal security policy imposed by the operator of the server resolving or forwarding the query.¶
The server is unable to respond to the request because the domain is on a blocklist due to an external requirement imposed by an entity other than the operator of the server resolving or forwarding the query. Note that how the imposed policy is applied is irrelevant (in-band DNS filtering, court order, etc.).¶
The server is unable to respond to the request because the domain is on a blocklist as requested by the client. Functionally, this amounts to "you requested that we filter domains like this one."¶
An authoritative server or recursive resolver that receives a query from an "unauthorized" client can annotate its REFUSED message with this code. Examples of "unauthorized" clients are recursive queries from IP addresses outside the network, blocklisted IP addresses, local policy, etc.¶
The resolver was unable to resolve an answer within its configured time limits and decided to answer with a previously cached NXDOMAIN answer instead of answering with an error. This may be caused, for example, by problems communicating with an authoritative server, possibly as result of a denial of service (DoS) attack against another network. (See also Code 3.)¶
An authoritative server that receives a query with the Recursion Desired (RD) bit clear, or when it is not configured for recursion for a domain for which it is not authoritative, SHOULD include this EDE code in the REFUSED response. A resolver that receives a query with the RD bit clear SHOULD include this EDE code in the REFUSED response.¶
The requested operation or query is not supported.¶
The resolver could not reach any of the authoritative name servers (or they potentially refused to reply).¶
An unrecoverable error occurred while communicating with another server.¶
The authoritative server cannot answer with data for a zone it is otherwise configured to support. Examples of this include its most recent zone being too old or having expired.¶
This document defines a new EDNS(0) option, entitled "Extended DNS Error", with the assigned value of 15 from the "DNS EDNS0 Option Codes (OPT)" registry:¶
Value | Name | Status | Reference |
---|---|---|---|
15 | Extended DNS Error | Standard | RFC 8914 |
IANA has created and will maintain a new registry called "Extended DNS Error Codes" on the "Domain Name System (DNS) Parameters" web page as follows:¶
Range | Registration Procedures |
---|---|
0 - 49151 | First Come First Served |
49152 - 65535 | Private Use |
The "Extended DNS Error Codes" registry is a table with three columns: INFO-CODE, Purpose, and Reference. The initial content is as below.¶
INFO-CODE | Purpose | Reference |
---|---|---|
0 | Other Error | Section 4.1 |
1 | Unsupported DNSKEY Algorithm | Section 4.2 |
2 | Unsupported DS Digest Type | Section 4.3 |
3 | Stale Answer | Section 4.4 and [RFC8767] |
4 | Forged Answer | Section 4.5 |
5 | DNSSEC Indeterminate | Section 4.6 |
6 | DNSSEC Bogus | Section 4.7 |
7 | Signature Expired | Section 4.8 |
8 | Signature Not Yet Valid | Section 4.9 |
9 | DNSKEY Missing | Section 4.10 |
10 | RRSIGs Missing | Section 4.11 |
11 | No Zone Key Bit Set | Section 4.12 |
12 | NSEC Missing | Section 4.13 |
13 | Cached Error | Section 4.14 |
14 | Not Ready | Section 4.15 |
15 | Blocked | Section 4.16 |
16 | Censored | Section 4.17 |
17 | Filtered | Section 4.18 |
18 | Prohibited | Section 4.19 |
19 | Stale NXDomain Answer | Section 4.20 |
20 | Not Authoritative | Section 4.21 |
21 | Not Supported | Section 4.22 |
22 | No Reachable Authority | Section 4.23 |
23 | Network Error | Section 4.24 |
24 | Invalid Data | Section 4.25 |
25-49151 | Unassigned | |
49152-65535 | Reserved for Private Use | Section 5.2 |
Though DNSSEC continues to be deployed, unfortunately a significant number of clients (~11% according to [GeoffValidation]) that receive a SERVFAIL from a validating resolver because of a DNSSEC validation issue will simply ask the next (potentially non-validating) resolver in their list and thus don't get the protections that DNSSEC should provide.¶
EDE information is unauthenticated information, unless secured by a form of secured DNS transaction, such as [RFC2845], [RFC2931], [RFC8094], or [RFC8484]. An attacker (e.g., a man in the middle (MITM) or malicious recursive server) could insert an extended error response into untrusted data -- although, ideally, clients and resolvers would not trust any unauthenticated information. As such, EDE content should be treated only as diagnostic information and MUST NOT alter DNS protocol processing. Until all DNS answers are authenticated via DNSSEC or the other mechanisms mentioned above, there are some trade-offs. As an example, an attacker who is able to insert the DNSSEC Bogus Extended Error into a DNS message could instead simply reply with a fictitious address (A or AAAA) record. Note that DNS RCODEs also contain no authentication and can be just as easily manipulated.¶
By design, EDE potentially exposes additional information via DNS resolution processes that may leak information. An example of this is the Prohibited EDE code (18), which may leak the fact that the name is on a blocklist.¶
The authors wish to thank Joe Abley, Mark Andrews, Tim April, Vittorio Bertola, Stephane Bortzmeyer, Vladimir Cunat, Ralph Dolmans, Peter DeVries, Peter van Dijk, Mats Dufberg, Donald Eastlake, Bob Harold, Paul Hoffman, Geoff Huston, Shane Kerr, Edward Lewis, Carlos M. Martinez, George Michelson, Eric Orth, Michael Sheldon, Puneet Sood, Petr Spacek, Ondrej Sury, John Todd, Loganaden Velvindron, and Paul Vixie. They also vaguely remember discussing this with a number of people over the years but have forgotten who all of them were. Apologies if we forgot to acknowledge your contributions.¶
One author also wants to thank the band Infected Mushroom for providing a good background soundtrack (and to see if he can get away with this in an RFC!). Another author would like to thank the band Mushroom Infectors. This was funny at the time we wrote it, but we cannot remember why...¶