rfc-9567

DNS Error Reporting

R. Arends, M. Larson
date2024-04 streamIETF areaops wgdnsop statusPROPOSED STANDARD pages11 canonicalhttps://www.rfc-editor.org/rfc/rfc9567 doi10.17487/RFC9567
DNS error reporting is a lightweight reporting mechanism that provides the operator of an authoritative server with reports on DNS resource records that fail to resolve or validate. A domain owner or DNS hosting organization can use these reports to improve domain hosting. The reports are based on extended DNS errors as described in RFC 8914. When a domain name fails to resolve or validate due to a misconfiguration or an attack, the operator of the authoritative server may be unaware of this. To mitigate this lack of feedback, this document describes a method for a validating resolver to automatically signal an error to a monitoring agent specified by the authoritative server. The error is encoded in the QNAME; thus, the very act of sending the query is to report the error.

Extracted elements (30)

design-rationale §4

Caching of the monitoring agent's response is essential to dampen the number of report queries sent for the same problem; with caching in place, only one report query per TTL is sent per unique error condition, rather than one per failing query.

dns

design-rationale §8.2

The agent domain is recommended to remain unsigned (no DNSSEC) to avoid triggering aggressive negative caching (RFC 8198), which would use NSEC/NSEC3 records to synthesize negative answers from cache and suppress subsequent error-report queries to the monitoring agent.

dns

design-rationale §4

The error is encoded entirely in the QNAME of the report query so that the very act of sending the DNS query constitutes the error report. This keeps reporting lightweight, with minimal impact on the resolver's main functions, and requires no new protocol beyond standard DNS.

dns

interoperability-note §8.2

If the monitoring agent responds with NXDOMAIN, RFC 8020 specifies that any name at or below that domain is considered unreachable; negative caching would then block all subsequent error-report queries for that subtree for the negative TTL duration. Implementations must avoid NXDOMAIN responses from monitoring agents for this reason.

dns

interoperability-note §8.2

When the agent domain is DNSSEC-signed, resolvers employing aggressive use of DNSSEC-validated cache (RFC 8198) can synthesize responses using NSEC/NSEC3 records, preventing report queries from reaching the monitoring agent even without an explicit cached answer.

dns

normative-requirement §6.1 MUST NOT

A reporting resolver MUST NOT use DNS error reporting if the authoritative server returned an empty AGENT DOMAIN field in the EDNS0 Report-Channel option.

dns

normative-requirement §6.1 MUST

A reporting resolver MUST use a maximum expense or depth limit when performing additional DNS resolution to resolve the report query QNAME, in order to prevent cascading errors from triggering further error reports.

dns

normative-requirement §6.1 MUST

A reporting resolver MUST validate responses received from the monitoring agent; there is no special treatment for responses to error-reporting queries, and standard DNSSEC validation applies.

dns, security

normative-requirement §9 SHOULD

DNS error reporting SHOULD be performed using DNS query name minimization (RFC 9156) to improve privacy of the reporting resolver.

dns, privacy

normative-requirement §6.1 SHOULD

For the monitoring agent to gain more confidence that the report is not spoofed, the reporting resolver SHOULD send error reports over TCP (RFC 7766) or other connection-oriented protocols, or SHOULD use DNS Cookies (RFC 7873), making it harder to falsify the source address.

dns, security

normative-requirement §6.1.1 MUST NOT

If the constructed QNAME of the report query exceeds 255 octets, the report query MUST NOT be sent.

dns

normative-requirement §9 MUST

If the RDATA content of a TXT record response is logged by the monitoring agent, the agent MUST assume the content can be malicious and take appropriate measures such as logging in hexadecimal to avoid exploitation (e.g., log4shell-style attacks).

dns, security

normative-requirement §8.1 MUST NOT

The agent domain MUST NOT be a subdomain of the domain it is reporting on; for example, if the authoritative server hosts foo.example, its agent domain MUST NOT end in foo.example.

dns

normative-requirement §6.2 MUST NOT

The authoritative server MUST NOT include more than one EDNS0 Report-Channel option in a single response.

dns

normative-requirement §4 MUST NOT

The authoritative server MUST NOT include the EDNS0 Report-Channel option in a response if the configured agent domain is empty or is the null label (which would indicate the DNS root).

dns

normative-requirement §6.1 MUST NOT

The EDNS0 Report-Channel option MUST NOT be included in queries; it is only sent unsolicited in responses by the authoritative server.

dns

normative-requirement §8.2 MUST NOT

The monitoring agent MUST NOT respond with NXDOMAIN for domains it is monitoring, because an NXDOMAIN response would inhibit subsequent error-report queries via negative caching per RFC 8020. A wildcard domain name in the agent zone is one method to avoid this.

dns

normative-requirement §6.3 SHOULD

The monitoring agent SHOULD respond to queries received over UDP that have no DNS Cookie set with a response having the TC (truncation) bit set, challenging the resolver to requery over TCP.

dns, security

privacy-consideration §9

DNS error reporting is performed without any authentication between the reporting resolver and the authoritative server of the agent domain. Query name minimization (RFC 9156) SHOULD be applied to error report queries to limit disclosure of the full QNAME to intermediate nameservers.

dns, privacy

protocol-element §3

A monitoring agent is an authoritative server that receives and responds to report queries; it is identified by the agent domain returned in the EDNS0 Report-Channel option. Responses from the monitoring agent can be cached by the reporting resolver to dampen repeated queries for the same problem.

dns

protocol-element §4

A report query is a DNS TXT record query sent by a reporting resolver to the monitoring agent; the error information is entirely encoded in the QNAME, so the act of sending the query constitutes the error report. No RCODE is included because the RCODE is not relevant to the extended DNS error code.

dns

protocol-element §4

The EDNS0 Report-Channel option (OPTION-CODE 18) is included unsolicited by the authoritative server in responses to indicate the agent domain to which validating resolvers should send error reports. Its presence in a response signals that the authoritative server supports DNS error reporting.

dns

registry §7

IANA has assigned the entry '_er' for RR type TXT in the 'Underscored and Globally Scoped DNS Node Names' registry, referencing RFC 9567.

dns, registry

registry §7

IANA has assigned value 18 with name 'Report-Channel' and status 'Standard' in the 'DNS EDNS0 Option Codes (OPT)' registry, referencing RFC 9567.

dns, registry

security-consideration §9

An adversary may create massive error report flooding to camouflage an attack. Monitoring agents that receive error reports over UDP should consider that the source addresses and report contents may be falsified.

dns, security

security-consideration §9

DNSSEC validation of responses from the monitoring agent is mandated even when the agent domain is recommended to remain unsigned, to prevent downgrade attacks where a legitimately signed domain is deceptively advertised as an agent domain by a malicious actor, which would otherwise expose the resolver to cache poisoning.

dns, security

security-consideration §9

This mechanism can be abused by intentionally deploying broken zones with agent domains delegated to victim nameservers, effectively using the reporting mechanism to generate a DNS query flood against victims. This is especially effective when used with open resolvers or globally distributed monitoring systems.

dns, security

security-consideration §9

Use of DNS error reporting may expose local configuration mistakes in the reporting resolver—such as stale DNSSEC trust anchors—to the monitoring agent, since the error codes are derived from local resolver state.

dns, security, privacy

wire-format §5

The EDNS0 Report-Channel option (OPTION-CODE 18) carries a 2-octet OPTION-CODE, a 2-octet OPTION-LENGTH, and a variable-length AGENT DOMAIN field encoded as a fully qualified, uncompressed DNS wire-format domain name.

dns, registry

wire-format §6.1.1

The report query QNAME is constructed by concatenating: the label '_er', the QTYPE as a decimal label, the non-null labels of the failed query name, the extended DNS error code as a decimal label, the label '_er' again, and finally the agent domain. If multiple QTYPEs are present they are represented as ordered decimal values separated by a hyphen in a single label (e.g., '1-28').

dns