draft-ietf-dnsop-nsec-aggressiveuse-02.txt   draft-ietf-dnsop-nsec-aggressiveuse-03.txt 
Network Working Group K. Fujiwara Network Working Group K. Fujiwara
Internet-Draft JPRS Internet-Draft JPRS
Updates: 4035 (if approved) A. Kato Updates: 4035 (if approved) A. Kato
Intended status: Standards Track Keio/WIDE Intended status: Standards Track Keio/WIDE
Expires: March 17, 2017 W. Kumari Expires: April 7, 2017 W. Kumari
Google Google
September 13, 2016 October 4, 2016
Aggressive use of NSEC/NSEC3 Aggressive use of NSEC/NSEC3
draft-ietf-dnsop-nsec-aggressiveuse-02 draft-ietf-dnsop-nsec-aggressiveuse-03
Abstract Abstract
The DNS relies upon caching to scale; however, the cache lookup The DNS relies upon caching to scale; however, the cache lookup
generally requires an exact match. This document specifies the use generally requires an exact match. This document specifies the use
of NSEC/NSEC3 resource records to generate negative answers within a of NSEC/NSEC3 resource records to allow DNSSEC validating resolvers
range. This increases performance / decreases latency, decreases to generate negative answers within a range. This increases
resource utilization on both authoritative and recursive servers, and performance / decreases latency, decreases resource utilization on
also increases privacy. It may also help increase resilience to both authoritative and recursive servers, and also increases privacy.
certain DoS attacks in some circumstances. It may also help increase resilience to certain DoS attacks in some
circumstances.
This document updates RFC4035 by allowing resolvers to generate This document updates RFC4035 by allowing validating resolvers to
negative answers based upon NSEC/NSEC3 records. generate negative answers based upon NSEC/NSEC3 records.
[ Ed note: Text inside square brackets ([]) is additional background [ Ed note: Text inside square brackets ([]) is additional background
information, answers to frequently asked questions, general musings, information, answers to frequently asked questions, general musings,
etc. They will be removed before publication.This document is being etc. They will be removed before publication.This document is being
collaborated on in Github at: https://github.com/wkumari/draft-ietf- collaborated on in Github at: https://github.com/wkumari/draft-ietf-
dnsop-nsec-aggressiveuse. The most recent version of the document, dnsop-nsec-aggressiveuse. The most recent version of the document,
open issues, etc should all be available here. The authors open issues, etc should all be available here. The authors
(gratefully) accept pull requests. (gratefully) accept pull requests.]
Known / open issues [To be moved to Github issue tracker]:
1. We say things like: "Currently the DNS does ..." - this will not
be true after this is deployed, but I'm having a hard time
rewording this. "Without the techniques described in this
document..." seems klunky. Perhaps "historically?!"
]
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on April 7, 2017.
This Internet-Draft will expire on March 17, 2017.
Copyright Notice Copyright Notice
Copyright (c) 2016 IETF Trust and the persons identified as the Copyright (c) 2016 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3
3. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 4 3. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 3
4. Background . . . . . . . . . . . . . . . . . . . . . . . . . 4 4. Background . . . . . . . . . . . . . . . . . . . . . . . . . 4
5. Proposed Solution . . . . . . . . . . . . . . . . . . . . . . 5 5. Aggressive Negative Caching . . . . . . . . . . . . . . . . . 5
5.1. Aggressive Negative Caching . . . . . . . . . . . . . . . 5 5.1. NSEC . . . . . . . . . . . . . . . . . . . . . . . . . . 5
5.2. NSEC . . . . . . . . . . . . . . . . . . . . . . . . . . 6 5.2. NSEC3 . . . . . . . . . . . . . . . . . . . . . . . . . . 6
5.3. NSEC3 . . . . . . . . . . . . . . . . . . . . . . . . . . 6 5.3. Consideration on TTL . . . . . . . . . . . . . . . . . . 6
5.4. Wildcard . . . . . . . . . . . . . . . . . . . . . . . . 6 6. Benefits . . . . . . . . . . . . . . . . . . . . . . . . . . 6
5.5. Consideration on TTL . . . . . . . . . . . . . . . . . . 7 7. Update to RFC 4035 . . . . . . . . . . . . . . . . . . . . . 7
6. Benefits . . . . . . . . . . . . . . . . . . . . . . . . . . 7 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7
7. Update to RFC 4035 . . . . . . . . . . . . . . . . . . . . . 8 9. Security Considerations . . . . . . . . . . . . . . . . . . . 8
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 10. Implementation Status . . . . . . . . . . . . . . . . . . . . 8
9. Security Considerations . . . . . . . . . . . . . . . . . . . 9 11. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 8
10. Implementation Status . . . . . . . . . . . . . . . . . . . . 9 12. Change History . . . . . . . . . . . . . . . . . . . . . . . 8
11. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 9 12.1. Version draft-fujiwara-dnsop-nsec-aggressiveuse-01 . . . 10
12. Change History . . . . . . . . . . . . . . . . . . . . . . . 9 12.2. Version draft-fujiwara-dnsop-nsec-aggressiveuse-02 . . . 10
12.1. Version draft-fujiwara-dnsop-nsec-aggressiveuse-01 . . . 11 12.3. Version draft-fujiwara-dnsop-nsec-aggressiveuse-03 . . . 10
12.2. Version draft-fujiwara-dnsop-nsec-aggressiveuse-02 . . . 11
12.3. Version draft-fujiwara-dnsop-nsec-aggressiveuse-03 . . . 11
13. References . . . . . . . . . . . . . . . . . . . . . . . . . 11 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 11
13.1. Normative References . . . . . . . . . . . . . . . . . . 11 13.1. Normative References . . . . . . . . . . . . . . . . . . 11
13.2. Informative References . . . . . . . . . . . . . . . . . 12 13.2. Informative References . . . . . . . . . . . . . . . . . 11
Appendix A. Detailed implementation notes . . . . . . . . . . . 12 Appendix A. Detailed implementation notes . . . . . . . . . . . 12
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 13 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 12
1. Introduction 1. Introduction
A DNS negative cache currently exists, and is used to cache the fact A DNS negative cache exists, and is used to cache the fact that a
that a name does not exist. This method of negative caching requires name does not exist. This method of negative caching requires exact
exact matching; this leads to unnecessary additional lookups, matching; this leads to unnecessary additional lookups, increases
increases latency, leads to extra resource utilization on both latency, leads to extra resource utilization on both authoritative
authoritative and recursive servers, and decreases privacy by leaking and recursive servers, and decreases privacy by leaking queries.
queries.
This document updates RFC 4035 to allow recursive resolvers to use This document updates RFC 4035 to allow recursive resolvers to use
NSEC/NSEC3 resource records to aggressively cache negative answers. NSEC/NSEC3 resource records to synthetize negative answers from the
This would allow such resolvers to respond with NXDOMAIN immediately information they have in the cache. This allows validating resolvers
if the name in question falls into a range expressed by a NSEC/NSEC3 to respond with NXDOMAIN immediately if the name in question falls
resource record already in the cache. into a range expressed by a NSEC/NSEC3 resource record already in the
cache.
Aggressive Negative Caching was first proposed in Section 6 of DNSSEC Aggressive Negative Caching was first proposed in Section 6 of DNSSEC
Lookaside Validation (DLV) [RFC5074] in order to find covering NSEC Lookaside Validation (DLV) [RFC5074] in order to find covering NSEC
records efficiently. records efficiently.
Section 3 of [I-D.vixie-dnsext-resimprove] "Stopping Downward Cache Section 3 of [I-D.vixie-dnsext-resimprove] "Stopping Downward Cache
Search on NXDOMAIN" and [I-D.ietf-dnsop-nxdomain-cut] proposed Search on NXDOMAIN" and [I-D.ietf-dnsop-nxdomain-cut] proposed
another approach to use NXDOMAIN information effectively. another approach to use NXDOMAIN information effectively.
2. Terminology 2. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119]. document are to be interpreted as described in RFC 2119 [RFC2119].
Many of the specialized terms used in this document are defined in Many of the specialized terms used in this document are defined in
DNS Terminology [RFC7719]. In this document we are using the terms DNS Terminology [RFC7719].
"recursive resolver" or "recursive server" as a more readable
alternative to the more formal[RFC7719] "full-service resolver"
The key words "Closest Encloser" and "Source of Synthesis" in this The key words "Closest Encloser" and "Source of Synthesis" in this
document are to be interpreted as described in[RFC4592]. document are to be interpreted as described in [RFC4592].
"Closest Encloser" is also defined in NSEC3 [RFC5155], as is "Next "Closest Encloser" is also defined in NSEC3 [RFC5155], as is "Next
closer name". closer name".
3. Problem Statement 3. Problem Statement
The current DNS negative cache caches negative (non-existent) The DNS negative cache caches negative (non-existent) information,
information, and requires an exact match in most instances [RFC2308]. and requires an exact match in most instances [RFC2308].
Assume that the (DNSSEC signed) "example.com" zone contains: Assume that the (DNSSEC signed) "example.com" zone contains:
apple.example.com IN A 192.0.2.1 apple.example.com IN A 192.0.2.1
elephant.example.com IN A 192.0.2.2 elephant.example.com IN A 192.0.2.2
zebra.example.com IN A 192.0.2.3 zebra.example.com IN A 192.0.2.3
If a recursive resolver gets a query for cat.example.com, it will If a validating resolver gets a query for cat.example.com, it will
query the example.com authoritative servers and will get back an NSEC query the example.com servers and will get back an NSEC (or NSEC3)
(or NSEC3) record starting that there are no records between apple record starting that there are no records between apple and elephant.
and elephant. The recursive resolver then knows that cat.example.com The resolver then knows that cat.example.com does not exist; however,
does not exist; however, it (currently) does not use the fact that it does not use the fact that the proof covers a range (apple to
the proof covers a range (apple to elephant) to suppress queries for elephant) to suppress queries for other labels that fall within this
other labels that fall within this range. This means that if the range. This means that if the validating resolver gets a query for
recursive resolvers gets a query for ball.example.com (or ball.example.com (or dog.example.com) it will once again go off and
dog.example.com) it will once again go off and query the example.com query the example.com servers for these names.
servers for these names.
Apart from wasting bandwidth, this also wastes resources on the Apart from wasting bandwidth, this also wastes resources on the
recursive server (it needs to keep state for outstanding queries), recursive server (it needs to keep state for outstanding queries),
wastes resources on the authoritative server (it has to answer wastes resources on the authoritative server (it has to answer
additional questions), increases latency (the end user has to wait additional questions), increases latency (the end user has to wait
longer than necessary to get back an NXDOMAIN answer), can be used by longer than necessary to get back an NXDOMAIN answer), can be used by
attackers to cause a DoS (see additional resources), and also has attackers to cause a DoS (see additional resources), and also has
privacy implications (e.g: typos leak out further than necessary). privacy implications (e.g: typos leak out further than necessary).
4. Background 4. Background
skipping to change at page 5, line 5 skipping to change at page 4, line 37
recursive server were to query for lion.example.com it would receive recursive server were to query for lion.example.com it would receive
a (signed) NSEC/NSEC3 record stating that there are no labels between a (signed) NSEC/NSEC3 record stating that there are no labels between
"elephant" and "zebra". This is a signed, cryptographic proof that "elephant" and "zebra". This is a signed, cryptographic proof that
these names are the ones before and after the queried for label. As these names are the ones before and after the queried for label. As
lion.example.com falls within this range, the recursive server knows lion.example.com falls within this range, the recursive server knows
that lion.example.com really does not exist. This document specifies that lion.example.com really does not exist. This document specifies
that this NSEC/NSEC3 record should be used to generate negative that this NSEC/NSEC3 record should be used to generate negative
answers for any queries that the recursive server receives that fall answers for any queries that the recursive server receives that fall
within the range covered by the record (for the TTL for the record). within the range covered by the record (for the TTL for the record).
[RFC4035]; Section 4.5 states: Section 4.5 of [RFC4035] says:
For a zone signed with NSEC, it would be possible to use the "In theory, a resolver could use wildcards or NSEC RRs to generate
information carried in NSEC resource records to indicate the non- positive and negative responses (respectively) until the TTL or
existence of a range of names. However, such use is discouraged by signatures on the records in question expire. However, it seems
Section 4.5 of RFC4035. It is recommended that readers read RFC4035 prudent for resolvers to avoid blocking new authoritative data or
in its entirety for a better understanding. At the root of the synthesizing new data on their own. Resolvers that follow this
concern is that new records could have been added to the zone during recommendation will have a more consistent view of the namespace."
the TTL of the NSEC record, and that generating negative responses and "The reason for these recommendations is that, between the
from the NSEC record would hide these. We believe this initial query and the expiration of the data from the cache, the
recommendation can be relaxed because lookups for the specific name authoritative data might have been changed (for example, via dynamic
could have come in during the normal negative cache time and so update).". In other words, if a resolver generates negative answers
operators should have no expectation that an added name would work from an NSEC record, it will not send any queries for names within
immediately. We think that the TTL of the NSEC record is the that NSEC range (for the TTL). If a new name is added to the zone
during this interval the resolver will not know this.
We believe this recommendation can be relaxed because, in the absense
of this technique, a lookup for the exact name could have come in
during this interval, and so this could already be cached (see
[RFC2308] for more background). This means that zone operators
should have no expectation that an added name would work immediately.
With DNSSEC and Aggressive NSEC, the TTL of the NSEC record is the
authoritative statement of how quickly a name can start working authoritative statement of how quickly a name can start working
within a zone. within a zone.
5. Proposed Solution 5. Aggressive Negative Caching
5.1. Aggressive Negative Caching
Section 4.5 of [RFC4035] shows that "In theory, a resolver could use Section 4.5 of [RFC4035] shows that "In theory, a resolver could use
wildcards or NSEC RRs to generate positive and negative responses wildcards or NSEC RRs to generate positive and negative responses
(respectively) until the TTL or signatures on the records in question (respectively) until the TTL or signatures on the records in question
expire. However, it seems prudent for resolvers to avoid blocking expire. However, it seems prudent for resolvers to avoid blocking
new authoritative data or synthesizing new data on their own. new authoritative data or synthesizing new data on their own.
Resolvers that follow this recommendation will have a more consistent Resolvers that follow this recommendation will have a more consistent
view of the namespace". view of the namespace".
This document relaxes this this restriction, as follows: This document relaxes this this restriction, as follows:
+--------------------------------------------------------------+ +--------------------------------------------------------------+
| Once the records are validated, DNSSEC enabled validating | | Once the records are validated, DNSSEC enabled validating |
| resolvers MAY use NSEC/NSEC3 resource records to generate | | resolvers SHOULD use NSEC/NSEC3 resource records to generate |
| negative responses until their effective TTLs or signatures | | negative responses until their effective TTLs or signatures |
| for those records expire. | | for those records expire. |
+--------------------------------------------------------------+ +--------------------------------------------------------------+
If the validating resolver's cache has sufficient information to If the validating resolver's cache has sufficient information to
validate the query, the resolver SHOULD use NSEC/NSEC3/wildcard validate the query, the resolver SHOULD use NSEC/NSEC3/wildcard
records aggressively. Otherwise, it MUST fall back to send the query records aggressively. Otherwise, it MUST fall back to send the query
to the authoritative DNS servers. to the authoritative DNS servers.
If the query name has the matching NSEC/NSEC3 RR proving the If the query name has the matching NSEC/NSEC3 RR proving the
information requested does not exist, the resolver may respond with a information requested does not exist, the validating resolver may
NODATA (empty) answer. respond with a NODATA (empty) answer.
5.2. NSEC 5.1. NSEC
Implementations SHOULD enable aggressive use of NSEC by default. Implementations which support aggressive use of NSEC SHOULD enable
Implementations SHOULD provide a configuration switch to disable this by default. Implementations MAY provide a configuration switch
aggressive use of NSEC and allow it to be enabled or disabled per to disable aggressive use of NSEC and allow it to be enabled or
domain. disabled per domain.
The validating resolver needs to check the existence of an NSEC RR The validating resolver needs to check the existence of an NSEC RR
matching/covering the source of synthesis and an NSEC RR covering the matching/covering the source of synthesis and an NSEC RR covering the
query name. query name.
If the validating resolver's cache contains an NSEC RR covering the If the validating resolver's cache contains an NSEC RR covering the
source of synthesis and the covering NSEC RR of the query name, the source of synthesis and the covering NSEC RR of the query name, the
resolver may respond with NXDOMAIN error immediately. validating resolver may respond with NXDOMAIN error immediately.
5.3. NSEC3 5.2. NSEC3
NSEC3 aggressive negative caching is more difficult. If the zone is NSEC3 aggressive negative caching is more difficult. If the zone is
signed with NSEC3, the validating resolver needs to check the signed with NSEC3, the validating resolver needs to check the
existence of non-terminals and wildcards which derive from query existence of non-terminals and wildcards which derive from query
names. names.
If the validating resolver's cache contains an NSEC3 RR matching the If the validating resolver's cache contains an NSEC3 RR matching the
closest encloser, an NSEC3 RR covering the next closer name, and an closest encloser, an NSEC3 RR covering the next closer name, and an
NSEC3 RR covering the source of synthesis, it is possible for the NSEC3 RR covering the source of synthesis, it is possible for the
resolver to respond with NXDOMAIN immediately. validating resolver to respond with NXDOMAIN immediately.
If a covering NSEC3 RR has Opt-Out flag, the covering NSEC3 RR does If a covering NSEC3 RR has Opt-Out flag, the covering NSEC3 RR does
not prove the non-existence of the domain name and the aggressive not prove the non-existence of the domain name and the aggressive
negative caching is not possible for the domain name. negative caching is not possible for the domain name.
A validating resolver implementation MAY support aggressive use of A validating resolver implementation MAY support aggressive use of
NSEC3. If it does aggressive use of NSEC3, it SHOULD provide a NSEC3. If it does aggressive use of NSEC3, it MAY provide a
configuration switch to disable aggressive use of NSEC3 and allow it configuration switch to disable aggressive use of NSEC3 and allow it
to be enabled or disabled for specific zones. to be enabled or disabled for specific zones.
5.4. Wildcard 5.3. Consideration on TTL
The last paragraph of RFC 4035 Section 4.5 discusses aggressive use
of a cached deduced wildcard (as well as aggressive use of NSEC) and
recommends that it is not relied upon.
Just like the case for the aggressive use of NSEC discussed in this
draft, we revise this recommendation. As long as the resolver knows
a name would not exist without the wildcard match, it can answer a
query for that name using the cached deduced wildcard, and it may be
justified for performance and other benefits.
Such aggressive use of cached deduced wildcard can be employed
independently from aggressive use of NSEC. But, it will be more
effective when both are enabled since the resolver can determine the
name subject to wildcard would not otherwise exist more efficiently.
Furthermore, when aggressive use of NSEC is enabled, the aggressive
use of cached deduced wildcard will be more effective.
An implementation MAY support aggressive use of wildcards. It SHOULD
provide a configuration switch to disable aggressive use of
wildcards.
5.5. Consideration on TTL
The TTL value of negative information is especially important, The TTL value of negative information is especially important,
because newly added domain names cannot be used while the negative because newly added domain names cannot be used while the negative
information is effective. Section 5 of RFC 2308 states that the information is effective. Section 5 of RFC 2308 states that the
maximum number of negative cache TTL value is 3 hours (10800). It is maximum number of negative cache TTL value is 3 hours (10800). It is
RECOMMENDED that resolvers limit the maximum effective TTL value of RECOMMENDED that validating resolvers limit the maximum effective TTL
negative responses (NSEC/NSEC3 RRs) to this same value. value of negative responses (NSEC/NSEC3 RRs) to this same value.
6. Benefits 6. Benefits
The techniques described in this document provide a number of The techniques described in this document provide a number of
benefits, including (in no specific order): benefits, including (in no specific order):
Latency By answering directly from cache, recursive resolvers can Reduced latency By answering directly from cache, validating
immediately inform clients that the name they are looking for does resolvers can immediately inform clients that the name they are
not exist, improving the user experience. looking for does not exist, improving the user experience.
Decreased recursive server load By answering negative queries from Decreased recursive server load By answering negative queries from
the cache, recursive servers avoid having send a query and wait the cache, validating servers avoid having send a query and wait
for a response. In addition to decreasing the bandwidth used, it for a response. In addition to decreasing the bandwidth used, it
also means that the server does not need to allocate and maintain also means that the server does not need to allocate and maintain
state, thereby decreasing memory and CPU load. state, thereby decreasing memory and CPU load.
Decreased authorative server load Because recursive servers can Decreased authorative server load Because recursive servers can
answer (negative) queries without asking the authoritative server, answer (negative) queries without asking the authoritative server,
the authoritative servers receive less queries. This decreases the authoritative servers receive less queries. This decreases
the authoritative server bandwidth, queries per second and CPU the authoritative server bandwidth, queries per second and CPU
utilization. utilization.
The scale of the benefit depends upon multiple factors, including the The scale of the benefit depends upon multiple factors, including the
query distribution. For example, currently around 65% of queries to query distribution. For example, currently around 65% of queries to
Root Name servers result in NXDOMAIN responses; this technique will Root Name servers result in NXDOMAIN responses; this technique will
eliminate a sizable quantity of these. eliminate a sizable quantity of these.
[ Editor note: There has been some discussion on if this document
should discuss this attack and mitigation. The authors think that
this is useful / important, but some participants feel that it
oversells the DoS mitigation benefit. Please let us know if the
below is helpful. Also, the below description is not as clear as it
could be - it's been tricky to balance readability, correctness and
conciseness. Text gratefully accepted... ]
The technique described in this document may also mitigate so-called The technique described in this document may also mitigate so-called
"random QNAME attacks", in which attackers send many queries for "random QNAME attacks", in which attackers send many queries for
random sub-domains to recursive resolvers. As the recursive server random sub-domains to resolvers. As the resolver will not have the
will not have the answers cached it has to ask the authoritative answers cached it has to ask external servers for each random query,
servers for each random query, leading to a DoS on the authoritative leading to a DoS on the authoritative servers (and often resolvers).
(and often recursive) servers. Aggressive NSEC may help mitigate Aggressive NSEC may help mitigate these attacks by allowing the
these attacks by allowing the recursive to answer directly from cache resolver to answer directly from cache for any random queries which
for any random queries which fall within already requested ranges. fall within already requested ranges. It will not always work as an
The effectiveness of this depends upon a number of factors, including effective defense, not least because not many zones are DNSSEC signed
if the attacker is making his queries through recursive resolvers at all, but it will still provide an additional layer of defense.
(e.g to hide his source), the number of entries in the zone, the TTL,
if the zone is using NSEC, if the attacker is setting the CD bit,
etc. In the ideal case, authoritative servers under attack will need
to answer somewhere between number_of_entries_in_zone queries and 2 *
number_of_entries_in_zone queries from each recursive server. This
is because there are as many "holes" between labels as there are
labels in a zone. If the random query falls in range for which
recursive server does not have an NSEC record cached, it will send a
query to the authoritative server, and so it will send approximately
the same number of queries as there are "holes" between entries. If
the random queries happen to be for names which exist in the zone,
the recursive will send those as well.
7. Update to RFC 4035 7. Update to RFC 4035
Section 4.5 of [RFC4035] shows that "In theory, a resolver could use Section 4.5 of [RFC4035] shows that "In theory, a resolver could use
wildcards or NSEC RRs to generate positive and negative responses wildcards or NSEC RRs to generate positive and negative responses
(respectively) until the TTL or signatures on the records in question (respectively) until the TTL or signatures on the records in question
expire. However, it seems prudent for resolvers to avoid blocking expire. However, it seems prudent for resolvers to avoid blocking
new authoritative data or synthesizing new data on their own. new authoritative data or synthesizing new data on their own.
Resolvers that follow this recommendation will have a more consistent Resolvers that follow this recommendation will have a more consistent
view of the namespace". view of the namespace".
The paragraph is updated as follows: The paragraph is updated as follows:
+--------------------------------------------------------------+ +--------------------------------------------------------------+
| Once the records are validated, DNSSEC enabled recursive | | Once the records are validated, DNSSEC enabled validating |
| resolvers MAY use wildcards and NSEC/NSEC3 resource records | | resolvers MAY use wildcards and NSEC/NSEC3 resource records |
| to generate (positive and) negative responses until their | | to generate negative responses until their effective TTLs |
| effective TTLs or signatures for those records expire. | | or signatures for those records expire. |
+--------------------------------------------------------------+ +--------------------------------------------------------------+
8. IANA Considerations 8. IANA Considerations
This document has no IANA actions. This document has no IANA actions.
9. Security Considerations 9. Security Considerations
Newly registered resource records may not be used immediately. Newly registered resource records may not be used immediately.
However, choosing suitable TTL value and negative cache TTL value However, choosing suitable TTL value and negative cache TTL value
(SOA MINIMUM field) will mitigate the delay concern, and it is not a (SOA MINIMUM field) will mitigate the delay concern, and it is not a
security problem. security problem.
It is also suggested to limit the maximum TTL value of NSEC / NSEC3 It is also suggested to limit the maximum TTL value of NSEC / NSEC3
resource records in the negative cache to, for example, 10800 seconds resource records in the negative cache to, for example, 10800 seconds
(3hrs), to mitigate this issue. Implementations which comply with (3hrs), to mitigate this issue. Implementations which comply with
this proposal are recommended to have a configurable maximum value of this proposal are recommended to have a configurable maximum value of
NSEC RRs in the negative cache. NSEC RRs in the negative cache.
Aggressive use of NSEC / NSEC3 resource records without DNSSEC Aggressive use of NSEC / NSEC3 resource records without DNSSEC
validation may cause security problems. It is highly recommended to validation may create serious security issues, and so this technique
apply DNSSEC validation. requires DNSSEC validation.
10. Implementation Status 10. Implementation Status
Unbound supports aggressive negative caching. Unbound currenty implements aggressive negative caching, as does
Google Public DNS.
11. Acknowledgments 11. Acknowledgments
The authors gratefully acknowledge DLV [RFC5074] author Samuel Weiler The authors gratefully acknowledge DLV [RFC5074] author Samuel Weiler
and the Unbound developers. and the Unbound developers.
The authors would like to specifically thank Tatuya JINMEI for The authors would like to specifically thank Tatuya JINMEI for
extensive review and comments, and also Mark Andrews, Stephane extensive review and comments, and also Mark Andrews, Stephane
Bortzmeyer, Casey Deccio, Alexander Dupuy, Olafur Gudmundsson, Bob Bortzmeyer, Casey Deccio, Alexander Dupuy, Olafur Gudmundsson, Bob
Harold, Shumon Huque, Pieter Lexis and Matthijs Mekking. Harold, Shumon Huque, John Levine, Pieter Lexis and Matthijs Mekking
(who even sent pull requests!).
12. Change History 12. Change History
RFC Editor: Please remove this section prior to publication. RFC Editor: Please remove this section prior to publication.
-02 to -03:
o Integrated a bunch of comments from Matthijs Mekking - details in:
https://github.com/wkumari/draft-ietf-dnsop-nsec-aggressiveuse/
pull/1. I decided to keep "Aggressive Negative Caching" instead
of "Aggressive USE OF Negative Caching" for readability.
o Attempted to address Bob Harold's comment on the readability
issues with "But, it will be more effective when both are
enabled..." in Section 5.4 - https://www.ietf.org/mail-
archive/web/dnsop/current/msg17997.html
o MAYs and SHOULD drifted in the text block. Fixed - thanks to
https://mailarchive.ietf.org/arch/msg/
dnsop/2ljmmzxtIMCFMLOZmWcSbTYVOy4
o A number of good edits from Stephane in: https://www.ietf.org/
mail-archive/web/dnsop/current/msg18109.html
o A bunch more edits from Jinmei, as in: https://www.ietf.org/mail-
archive/web/dnsop/current/msg18206.html
-01 to -02: -01 to -02:
o Added Section 6 - Benefits (as suggested by Jinmei). o Added Section 6 - Benefits (as suggested by Jinmei).
o Removed Appendix B (Jinmei) o Removed Appendix B (Jinmei)
o Replaced "full-service" with "validating" (where applicable) o Replaced "full-service" with "validating" (where applicable)
o Integrated other comments from Jinmei from https://www.ietf.org/ o Integrated other comments from Jinmei from https://www.ietf.org/
mail-archive/web/dnsop/current/msg17875.html mail-archive/web/dnsop/current/msg17875.html
 End of changes. 41 change blocks. 
165 lines changed or deleted 137 lines changed or added

This html diff was produced by rfcdiff 1.45. The latest version is available from http://tools.ietf.org/tools/rfcdiff/