Network Working Group | W. Kumari |
Internet-Draft | |
Intended status: Standards Track | E. Hunt |
Expires: June 23, 2019 | ISC |
R. Arends | |
ICANN | |
W. Hardaker | |
USC/ISI | |
D. Lawrence | |
Oracle + Dyn | |
December 20, 2018 |
Extended DNS Errors
draft-ietf-dnsop-extended-error-03
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.
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on June 23, 2019.
Copyright (c) 2018 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 a bad hair day?
A good example of issues that would benefit by additional error information are errors caused by DNSSEC validation issues. When a stub resolver queries a DNSSEC bogus name (using a validating resolver), the stub resolver receives only a SERVFAIL in response. Unfortunately, SERVFAIL is used to signal many sorts of DNS errors, and so the stub resolver simply asks the next configured DNS resolver. The result of trying the next resolver is one of two outcomes: either the next resolver also validates, a SERVFAIL is returned again, and the user gets an (largely) incomprehensible error message; or the next resolver is not a validating resolver, and the user is returned a potentially harmful result.
This document specifies a mechanism to extend (or annotate) DNS errors to provide additional information about the cause of the error. When properly authenticated, this information can be used by the resolver to make a decision regarding whether or not to retry or it can be used or by technical users attempting to debug issues.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].
This draft uses an EDNS0 ([RFC2671]) 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: | R | RESERVED | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 6: | RESPONSE-CODE | INFO-CODE | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 8: | EXTRA-TEXT | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
Field definition details:
The Extended DNS Error (EDE) is an EDNS option. It can be included in any response (SERVFAIL, NXDOMAIN, REFUSED, etc) to a query that includes an EDNS option. This document includes a set of initial codepoints (and requests to the IANA to add them to the registry), but is extensible via the IANA registry to allow additional error and information codes to be defined in the future.
The fields of the Extended DNS Error option are defined further in the following sub-sections.
The R (Retry) flag provides a hint as to what the receiver may want to do with this annotated error. Specifically, the R (or Retry) flag provides a hint to the receiver that it should retry the query to another server. If the R bit is set (1), the sender believes that retrying the query may provide a successful answer next time; if the R bit is clear (0), the sender believes that the resolver should not ask another server.
The mechanism is specifically designed to be extensible, and so implementations may receive EDE codes that it does not understand. The R flag allows implementations to make a decision as to what to do if it receives a response with an unknown code - retry or drop the query. Note that this flag is only a suggestion. Unless a protective transport mechanism (like TSIG [RFC2845] or TLS [RFC8094]) is used, the bit's value could have have been altered by a person-in-the-middle. Receivers can choose to ignore this hint. See the security considerations for additional considerations.
This 4-bit value SHOULD be a copy of the RCODE from the primary DNS packet. Multiple EDNS0/EDE records may be included in the response. When including multiple EDNS0/EDE records in a response in order to provide additional error information, other RESPONSE-CODEs MAY use a different RCODE.
This 12-bit value provides the additional context for the RESPONSE-CODE value. This combination of the RESPONSE-CODE and the INFO-CODE serve as a joint-index into the IANA "Extended DNS Errors" registry.
The ASCII-encoded, EXTRA-TEXT field may be zero-length, or may hold additional information useful to network operators.
This document defines some initial EDE codes. The mechanism is intended to be extensible, and additional code-points can be registered in the "Extended DNS Errors" registry. This document provides suggestions for the R flag, but the originating server may ignore these recommendations if it knows better.
The RESPONSE-CODE and the INFO-CODE from the EDE EDNS option is used to serve as a double index into the "Extended DNS Error codes" IANA registry, the initial values for which are defined in the following sub-sections.
The resolver attempted to perform DNSSEC validation, but validation ended in the Bogus state. The R flag should not be set.
The resolver attempted to perform DNSSEC validation, but validation ended in the Indeterminate state. The R flag should not be set.
The resolver attempted to perform DNSSEC validation, but the signature was expired. The R flag should not be set.
The resolver attempted to perform DNSSEC validation, but the signatures received were not yet valid. The R flag should not be set.
The resolver attempted to perform DNSSEC validation, but a DNSKEY RRSET contained only unknown algorithms. The R flag should be set.
The resolver attempted to perform DNSSEC validation, but a DS RRSET contained only unknown algorithms. The R flag should be set.
A DS record existed at a parent, but no DNSKEY record could be found for the child. The R flag should not be set.
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.
An authoritative resolver that receives a query (with the RD bit clear) for a domain for which it is not authoritative SHOULD include this EDE code in the REFUSED response. Implementations should set the R flag in this case (another nameserver might not be lame).
An authoritative 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, blacklisted IP addresses, local policy, etc.
Implementations SHOULD allow operators to define what to set the R flag to in this case.
The resolver attempted to perfom a DNS query but the domain is blacklisted due to a security policy. The R flag should not be set.
This document defines a new EDNS(0) option, entitled "Extended DNS Error", assigned a value of TBD1 from the "DNS EDNS0 Option Codes (OPT)" registry [to be removed upon publication: [http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-11]
Value Name Status Reference ----- ---------------- ------ ------------------ TBD Extended DNS Error TBD [ This document ]
This document defines a new double-index IANA registry table, where the first index value is the RCODE value and the second index value is the INFO-CODE from the Extended DNS Error EDNS option defined in this document. The IANA is requested to create and maintain this "Extended DNS Error codes" registry. The codepoint space for each INFO-CODE index is to be broken into 3 ranges:
A starting set of entries, based on the contents of this document, is as follows:
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 validaion issue will simply ask the next (potentially non-validating) resolver in their list, and thus don't get any of the protections which DNSSEC should provide. This is very similar to a kid asking his mother if he can have another cookie. When the mother says "No, it will ruin your dinner!", going off and asking his (more permissive) father and getting a "Yes, sure, have a cookie!".
This information is unauthenticated information, and an attacker (e.g MITM or malicious recursive server) could insert an extended error response into already untrusted data — ideally clients and resolvers would not trust any unauthenticated information, but until we live in an era where all DNS answers are authenticated via DNSSEC or other mechanisms, there are some tradeoffs. As an example, an attacker who is able to insert the DNSSEC Bogus Extended Error into a packet could instead simply reply with a fictitious address (A or AAAA) record. The R bit hint and extended error information are informational - implementations can choose how much to trust this information and validating resolvers / stubs may choose to put a different weight on it.
The authors wish to thank Joe Abley, Mark Andrews, Peter DeVries, Peter van Dijk, Donald Eastlake, Bob Harold, Evan Hunt, Geoff Huston, Shane Kerr, Edward Lewis, Carlos M. Martinez, George Michelson, Petr Spacek, Ondrej Sury, Loganaden Velvindron, and Paul Vixie. They also vaguely remember discussing this with a number of people over the years, but have forgotten who all they were -- if you were one of them, and are not listed, please let us know and we'll acknowledge you.
I also want to thank the band "Infected Mushroom" for providing a good background soundtrack (and to see if I can get away with this!) Another author would like to thank the band "Mushroom Infectors". This was funny at the time we wrote it, but I cannot remember why...
[RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997. |
[GeoffValidation] | IANA, "A quick review of DNSSEC Validation in today’s Internet", June 2016. |
[RFC2845] | Vixie, P., Gudmundsson, O., Eastlake 3rd, D. and B. Wellington, "Secret Key Transaction Authentication for DNS (TSIG)", RFC 2845, DOI 10.17487/RFC2845, May 2000. |
[RFC8094] | Reddy, T., Wing, D. and P. Patil, "DNS over Datagram Transport Layer Security (DTLS)", RFC 8094, DOI 10.17487/RFC8094, February 2017. |
[RFC Editor: Please remove this section before publication ]
From -00 to -01:
From -03 to -IETF 00:
From -02 to -03:
From -00 to -01;