Internet-Draft | Considerations-Large-Auth-DNS-Ops | November 2021 |
Moura, et al. | Expires 12 May 2022 | [Page] |
This document updates guidance about detecting DNS loops in recursive resolver algorithms with new requirements to require recursive resolvers to detect loops and to implement negative caches.¶
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 12 May 2022.¶
Copyright (c) 2021 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.¶
Loops are a well-known configuration error in DNS zones. CNAME loops were first documented in [RFC1034], and can occur when two domains point to each other. For example:¶
.org zone file:¶
example.org CNAME example.com¶
.com zone file:¶
example.com CNAME example.org¶
[RFC1536] states that "a set of servers might form a loop wherein A refers to B and B refers to A". Although RFC1536 did not explicitly define other types of loops, others can also occur using NS records, as shown in the example below:¶
.org zone file:¶
example.org NS ns1.example.com example.org NS ns2.example.com¶
.com zone file:¶
example.com NS ns1.example.org example.com NS ns2.example.org¶
In both the CNAME and NS loop cases, recursive resolvers will not be able to resolve these domain names, or any child domains underneath these zones.¶
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.¶
Recent research[Moura21b] has shown how NS configuration loops can lead to significant increases in traffic: New Zealand's .nz country-code top-level domain (a ccTLD) experienced a 50% traffic surge when two domains were misconfigured with NS loops. Another anonymous European ccTLD saw its traffic grow by 10-fold when two subdomains were also miscofigured with NS loops. [Moura21b] also reproduced the experiments under multiple controlled scenarios.¶
If existing RFCs already provide solution for looping misconfiguration (Section 2), how come recent research [Moura21b] still showed that these loops exist in the wild and lead to such traffic surges?¶
[Moura21b] documents two main sources of amplification in the presence of NS loops:¶
To illustrate this, consider Figure 1. The Current RFCs provide solutions to prevent recursive resolvers from looping. Assume a client sends a query to its stub resolver, which they will forward to one of its locally configured recursive resovlers (Re1 and Re2). Assuming Re2 receives the query, it will then carry out the recursive recursion tasks. The current solutions limit the number of queries that Re2 will send to authoritative servers (AT2) when resolving the domain -- so the recursive resolver itself prevents looping. The recursive resolver should answer the client with a SERVFAIL error code in response.¶
However, this does not protect clients, stubs, or DNS forwarders (as Re1, which forwards to Re3) to start to repeatedly asking the same query. If, for example, Re2 sends up to 20 queries when resolving a domain name, every new incoming client query can trigger up to new 20 queries. This was exactly the problem the researchers found in Google Public DNS' implementation.¶
Besides following the recommendations from RFC1034, RFC1035 and RFC2181 for handling loops, this memo requires that recursive resolvers MUST detect loop and MUST cache these records (negative caching)[RFC2308]. Recursive resolvers need to refrain from forwarding queries from clients/stub/forwarders to misconfigured domain names when a negative answer can be answered from its cache.¶
How long these loops should be cached for is an implementation choice; however, recursive results MUST answer from it's cache for at least 15 minutes, given that most looping NS/CNAME record situations will require human intervention.¶
This document does not add any practical new privacy issues, aside from possible benefits in deploying longer TTLs which in turn requires less traffic to be sent and thus preserves privacy by query omission: longer TTLs may help preserve a user's privacy by reducing the number of requests that get transmitted in both the client-to-resolver and resolver-to-authoritative cases.¶
This document has no IANA actions.¶
The requirements in this document have been implemented and deployed by:¶