draft-ietf-dnsop-nsec-aggressiveuse-00.txt   draft-ietf-dnsop-nsec-aggressiveuse-01.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: Informational Keio/WIDE Intended status: Standards Track Keio/WIDE
Expires: December 29, 2016 W. Kumari Expires: February 3, 2017 W. Kumari
Google Google
June 27, 2016 August 02, 2016
Aggressive use of NSEC/NSEC3 Aggressive use of NSEC/NSEC3
draft-ietf-dnsop-nsec-aggressiveuse-00 draft-ietf-dnsop-nsec-aggressiveuse-01
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 generate negative answers within a
range. This increases resilience to DoS attacks, increases range. This increases resilience to DoS attacks, increases
performance / decreases latency, decreases resource utilization on performance / decreases latency, decreases resource utilization on
both authoritative and recursive servers, and also increases privacy. both authoritative and recursive servers, and also increases privacy.
skipping to change at page 1, line 41 skipping to change at page 1, line 41
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]: Known / open issues [To be moved to Github issue tracker]:
1. We say things like: "Currently the DNS does ..." - this will not 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 be true after this is deployed, but I'm having a hard time
rewording this. "Without the techniques described in this rewording this. "Without the techniques described in this
document..." seems klunky. Perhaps "historically?!" document..." seems klunky. Perhaps "historically?!"
2. We currently say this SHOULD be enabled by default. Is that what
the working group wants, or should this be an implementation
choice?
] ]
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 December 29, 2016. This Internet-Draft will expire on February 3, 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 . . . . . . . . . . . . . . . . . . . . . . . . 3
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. Proposed Solution . . . . . . . . . . . . . . . . . . . . . . 5
5.1. Aggressive Negative Caching . . . . . . . . . . . . . . . 5 5.1. Aggressive Negative Caching . . . . . . . . . . . . . . . 5
5.2. NSEC . . . . . . . . . . . . . . . . . . . . . . . . . . 6 5.2. NSEC . . . . . . . . . . . . . . . . . . . . . . . . . . 5
5.3. NSEC3 . . . . . . . . . . . . . . . . . . . . . . . . . . 6 5.3. NSEC3 . . . . . . . . . . . . . . . . . . . . . . . . . . 6
5.4. Wildcard . . . . . . . . . . . . . . . . . . . . . . . . 7 5.4. Wildcard . . . . . . . . . . . . . . . . . . . . . . . . 6
5.5. Consideration on TTL . . . . . . . . . . . . . . . . . . 7 5.5. Consideration on TTL . . . . . . . . . . . . . . . . . . 7
6. Effects . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 6. Update to RFC 4035 . . . . . . . . . . . . . . . . . . . . . 7
6.1. Decrease of root DNS server queries . . . . . . . . . . . 7 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7
6.2. Mitigation of random subdomain attacks . . . . . . . . . 8 8. Security Considerations . . . . . . . . . . . . . . . . . . . 7
7. Additional proposals . . . . . . . . . . . . . . . . . . . . 8 9. Implementation Status . . . . . . . . . . . . . . . . . . . . 8
7.1. Partial implementation . . . . . . . . . . . . . . . . . 8 10. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 8
7.2. Aggressive negative caching flag idea . . . . . . . . . . 9 11. Change History . . . . . . . . . . . . . . . . . . . . . . . 8
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 11.1. Version draft-fujiwara-dnsop-nsec-aggressiveuse-01 . . . 9
9. Security Considerations . . . . . . . . . . . . . . . . . . . 9 11.2. Version draft-fujiwara-dnsop-nsec-aggressiveuse-02 . . . 9
10. Implementation Status . . . . . . . . . . . . . . . . . . . . 9 11.3. Version draft-fujiwara-dnsop-nsec-aggressiveuse-03 . . . 9
11. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 10 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 9
12. Change History . . . . . . . . . . . . . . . . . . . . . . . 10 12.1. Normative References . . . . . . . . . . . . . . . . . . 10
12.1. Version draft-fujiwara-dnsop-nsec-aggressiveuse-01 . . . 10 12.2. Informative References . . . . . . . . . . . . . . . . . 10
12.2. Version draft-fujiwara-dnsop-nsec-aggressiveuse-02 . . . 10 Appendix A. Detailed implementation idea . . . . . . . . . . . . 11
12.3. Version draft-fujiwara-dnsop-nsec-aggressiveuse-03 . . . 11 Appendix B. Side effect: mitigation of random subdomain attacks 11
13. References . . . . . . . . . . . . . . . . . . . . . . . . . 11 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 12
13.1. Normative References . . . . . . . . . . . . . . . . . . 11
13.2. Informative References . . . . . . . . . . . . . . . . . 12
Appendix A. Aggressive negative caching from RFC 5074 . . . . . 12
Appendix B. Detailed implementation idea . . . . . . . . . . . . 13
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 15
1. Introduction 1. Introduction
A DNS negative cache currently exists, and is used to cache the fact A DNS negative cache currently exists, and is used to cache the fact
that a name does not exist. This method of negative caching requires that a name does not exist. This method of negative caching requires
exact matching; this leads to unnecessary additional lookups, which exact matching; this leads to unnecessary additional lookups, which
have negative implications for DoS survivability, increases latency, have negative implications for DoS survivability, increases latency,
leads to extra resource utilization on both authoritative and leads to extra resource utilization on both authoritative and
recursive servers, and decreases privacy by leaking queries. recursive servers, and decreases privacy by leaking queries.
skipping to change at page 5, line 25 skipping to change at page 5, line 14
existence of a range of names. However, such use is discouraged by existence of a range of names. However, such use is discouraged by
Section 4.5 of RFC4035. It is recommended that readers read RFC4035 Section 4.5 of RFC4035. It is recommended that readers read RFC4035
in its entirety for a better understanding. At the root of the in its entirety for a better understanding. At the root of the
concern is that new records could have been added to the zone during concern is that new records could have been added to the zone during
the TTL of the NSEC record, and that generating negative responses the TTL of the NSEC record, and that generating negative responses
from the NSEC record would hide these. We believe this from the NSEC record would hide these. We believe this
recommendation can be relaxed because lookups for the specific name recommendation can be relaxed because lookups for the specific name
could have come in during the normal negative cache time and so could have come in during the normal negative cache time and so
operators should have no expectation that an added name would work operators should have no expectation that an added name would work
immediately. We think that the TTL of the NSEC record is the immediately. We think that the TTL of the NSEC record is the
authoritive statement of how quickly a name can start working within authoritative statement of how quickly a name can start working
a zone. within a zone.
5. Proposed Solution 5. Proposed Solution
5.1. 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".
To reduce non-existent queries sent to authoritative DNS servers, This document relaxes this this restriction, as follows:
this restriction could be relaxed, as follows:
+--------------------------------------------------------------+ +--------------------------------------------------------------+
| Once the records are validated, DNSSEC enabled full-service | | Once the records are validated, DNSSEC enabled full-service |
| resolvers MAY use NSEC/NSEC3 resource records to generate | | resolvers MAY 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 full-service resolver's cache have enough information to If the full-service resolver's cache has sufficient information to
validate the query, the full-service resolver MAY use NSEC/NSEC3/ validate the query, the full-service resolver MAY use NSEC/NSEC3/
wildcard records aggressively. Otherwise, the full-service resolver wildcard records aggressively. Otherwise, the full-service resolver
MUST fall back to send the query to the authoritative DNS servers. MUST fall back to send the query to the authoritative DNS servers.
If the query name has the matching NSEC/NSEC3 RR and it proves the If the query name has the matching NSEC/NSEC3 RR proving the
information requested does not exist, the full-service resolver may information requested does not exist, the full-service resolver may
respond with a NODATA (empty) answer. respond with a NODATA (empty) answer.
5.2. NSEC 5.2. NSEC
If a full-service resolver implementation supports aggressive If a full-service resolver implementation supports aggressive
negative caching, then it SHOULD support aggressive use of NSEC and negative caching, then it SHOULD support aggressive use of NSEC and
enable it by default. It SHOULD provide a configuration switch to enable it by default. It SHOULD provide a configuration switch to
disable aggressive use of NSEC and allow it to be enabled or disabled disable aggressive use of NSEC and allow it to be enabled or disabled
for specific zones. for specific zones.
skipping to change at page 6, line 44 skipping to change at page 6, line 32
If the full-service resolver's cache contains an NSEC3 RR matching If the full-service resolver's cache contains an NSEC3 RR matching
the closest encloser, an NSEC3 RR covering the next closer name, and the closest encloser, an NSEC3 RR covering the next closer name, and
an NSEC3 RR covering the source of synthesis, it is possible for the an NSEC3 RR covering the source of synthesis, it is possible for the
full-service resolver to respond with NXDOMAIN immediately. full-service 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 full-service resolver implementation MAY support aggressive use of A full-service resolver implementation MAY support aggressive use of
NSEC3. It SHOULD provide a configuration switch to disable NSEC3. If it does aggressive use of NSEC3, it SHOULD provide a
aggressive use of NSEC3 and allow it to be enabled or disabled for configuration switch to disable aggressive use of NSEC3 and allow it
specific zones. to be enabled or disabled for specific zones.
5.4. Wildcard 5.4. Wildcard
The last paragraph of RFC 4035 Section 4.5 discusses aggressive use 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 of a cached deduced wildcard (as well as aggressive use of NSEC) and
recommends that it is not relied upon. recommends that it is not relied upon.
Just like the case for the aggressive use of NSEC discussed in this Just like the case for the aggressive use of NSEC discussed in this
draft, we could revisit this recommendation. As long as the full- draft, we revise this recommendation. As long as the full-service
service resolver knows a name would not exist without the wildcard resolver knows a name would not exist without the wildcard match, it
match, it could answer a query for that name using the cached deduced can answer a query for that name using the cached deduced wildcard,
wildcard, and it may be justified for performance and other benefits. and it may be justified for performance and other benefits. (Note
(Note that, so far, this is orthogonal to "when aggressive use (of that, so far, this is orthogonal to "when aggressive use (of NSEC) is
NSEC) is enabled"). enabled").
Furthermore, when aggressive use of NSEC is enabled, the aggressive Furthermore, when aggressive use of NSEC is enabled, the aggressive
use of cached deduced wildcard will be more effective. use of cached deduced wildcard will be more effective.
A full-service resolver implementation MAY support aggressive use of A full-service resolver implementation MAY support aggressive use of
wildcards. It SHOULD provide a configuration switch to disable wildcards. It SHOULD provide a configuration switch to disable
aggressive use of wildcards. aggressive use of wildcards.
5.5. Consideration on TTL 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 the maximum information is effective. Section 5 of RFC 2308 states that the
number of negative cache TTL value is 3 hours (10800). So the full- maximum number of negative cache TTL value is 3 hours (10800). It is
service resolver SHOULD limit the maximum effective TTL value of RECOMMENDED that full-service resolvers limit the maximum effective
negative responses (NSEC/NSEC3 RRs) to 10800 (3 hours). It is TTL value of negative responses (NSEC/NSEC3 RRs) to this same value.
reasonably small but still effective for the purpose of this
document, since it can eliminate significant amount of DNS attacks
with randomly generated names.
6. Effects
6.1. Decrease of root DNS server queries
Aggressive use of NSEC/NSEC3 resource records results in a decrease
of queries to the root - this decreases load on the root servers (the
majority of queries currently result in NXDOMAIN responses), and
increases privacy.
People may generate many typos in TLD, and they will result in
unnecessary DNS queries. Some implementations leak non-existent TLD
queries whose second level domain are different each other. Well
observed examples are ".local" and ".belkin". With this proposal, it
is possible to return NXDOMAIN immediately to such queries without
further DNS recursive resolution process. It may reduces round trip
time, as well as reduces the DNS queries to corresponding
authoritative servers, including Root DNS servers.
6.2. Mitigation of random subdomain attacks
Random sub-domain attacks (referred to as "Water Torture" attacks or
NXDomain attacks) send many queries for non-existent information to
full-service resolvers. Their query names consist of random prefixes
and a target domain name. The negative cache does not work well, and
thus targeted full-service resolvers end up sending queries to
authoritative DNS servers of the target domain name.
When the number of queries is large, the full-service resolvers drop
queries from both legitimate users and attackers as their outstanding
queues are filled up.
For example, BIND 9.10.2 [BIND9] full-service resolvers answer
SERVFAIL and Unbound 1.5.2 full-service resolvers drop most of
queries under 10,000 queries per second attack.
The countermeasures implemented at this moment are rate limiting and
disabling name resolution of target domain names in ad-hoc manner.
If the full-service resolver supports aggressive negative caching and
the target domain name is signed with NSEC/NSEC3 (without Opt-Out),
it may be used as a possible countermeasure of random subdomain
attacks.
However, attackers can set the CD bit to their attack queries. The
CD bit disables signature validation and the aggressive negative
caching will be of no use.
7. Additional proposals
There are additional proposals to the aggressive negative caching.
7.1. Partial implementation
It is possible to implement aggressive negative caching partially.
DLV aggressive negative caching [RFC5074] is an implementation of
NSEC aggressive negative caching which targets DLV domain names.
NSEC3 is somewhat more complex to implement, and some implementations
may choose to only implement aggressive negative caching for NSEC.
Root only aggressive negative caching is also possible. It uses NSEC 6. Update to RFC 4035
and RRSIG resource records whose signer domain name is root.
[I-D.wkumari-dnsop-cheese-shop] proposed root only aggressive Section 4.5 of [RFC4035] shows that "In theory, a resolver could use
negative caching in order to decrease defects and standardize wildcards or NSEC RRs to generate positive and negative responses
quickly. The root zone has certain properties that make it a special (respectively) until the TTL or signatures on the records in question
case: It is DNSSEC signed and uses NSEC, the majority of the queries expire. However, it seems prudent for resolvers to avoid blocking
are "junk" queries, the rate of change is relatively slow, and there new authoritative data or synthesizing new data on their own.
are no corner cases such as wildcards. Because of these properties, Resolvers that follow this recommendation will have a more consistent
we know that generated negative answers will work. view of the namespace".
7.2. Aggressive negative caching flag idea (If approved, ) The paragraph is updated as follows:
Authoritative DNS servers that dynamically generate NSEC records +--------------------------------------------------------------+
normally generate minimally covering NSEC Records [RFC4470]. | Once the records are validated, DNSSEC enabled full-service |
Aggressive negative caching does not work with minimally covering | resolvers MAY use wildcards and NSEC/NSEC3 resource records |
NSEC records. Most of DNS operators don't want zone enumeration and | to generate (positive and) negative responses until their |
zone information leaks. They prefer NSEC resource records with | effective TTLs or signatures for those records expire. |
narrow ranges. When a flag shows a full-service resolver supporting +--------------------------------------------------------------+
the aggressive negative caching and a query has the aggressive
negative caching flag, authoritative DNS servers can generate NSEC
resource records with wider range under random subdomain attacks.
However, anyone (including attackers) can always use the flag..
8. IANA Considerations 7. IANA Considerations
This document has no IANA actions. This document has no IANA actions.
9. Security Considerations 8. 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 will mitigate the delay concern, However, choosing suitable TTL value and negative cache TTL value
and it is not a security problem. (SOA MINIMUM field) will mitigate the delay concern, and it is not a
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 cause security problems. It is highly recommended to
apply DNSSEC validation. apply DNSSEC validation.
10. Implementation Status 9. Implementation Status
Unbound has aggressive negative caching code in its DLV validator. Unbound has aggressive negative caching code in its DLV validator.
The author implemented NSEC aggressive caching using Unbound and its The author implemented NSEC aggressive caching using Unbound and its
DLV validator code. DLV validator code.
11. Acknowledgments 10. Acknowledgments
The authors gratefully acknowledge DLV [RFC5074] author Samuel Weiler The authors gratefully acknowledge DLV [RFC5074] author Samuel Weiler
and Unbound developers. Olafur Gudmundsson and Pieter Lexis proposed and Unbound developers. Valuable comments were provided by Alexander
aggressive negative caching flag idea. Valuable comments were Dupuy, Olafur Gudmundsson, Pieter Lexis, Bob Harold, Tatuya JINMEI,
provided by Bob Harold, Tatuya JINMEI, Shumon Huque, Mark Andrews, Shumon Huque, Mark Andrews, Casey Deccio, Bob Harold, Stephane
Casey Deccio, Bob Harold, Stephane Bortzmeyer and Matthijs Mekking. Bortzmeyer and Matthijs Mekking.
12. Change History 11. Change History
This section is used for tracking the update of this document. Will RFC Editor: Please remove this section prior to publication.
be removed after finalize.
-00 to -01:
o Comments from DNSOP meeting in Berlin.
o Changed intended status to Standards Track (updates RFC 4035)
o Added a section "Updates to RFC 4035"
o Some language clarification / typo / cleanup
o Cleaned up the TTL section a bit.
o Removed Effects section, Additional proposal section, and pseudo
code.
o Moved "mitigaton of random subdomain attacks" to Appendix.
From draft-fujiwara-dnsop-nsec-aggressiveuse-03 -> draft-ietf-dnsop- From draft-fujiwara-dnsop-nsec-aggressiveuse-03 -> draft-ietf-dnsop-
nsec-aggressiveuse nsec-aggressiveuse
o Document adopted by DNSOP WG. o Document adopted by DNSOP WG.
o Adoption comments o Adoption comments
o Changed main purpose to performance o Changed main purpose to performance
o Use NSEC3/Wildcard keywords o Use NSEC3/Wildcard keywords
o Improved wordings (from good comments) o Improved wordings (from good comments)
o Simplified pseudo code for NSEC3 o Simplified pseudo code for NSEC3
o Added Warren as co-author. o Added Warren as co-author.
o Reworded much of the problem statement o Reworded much of the problem statement
skipping to change at page 10, line 39 skipping to change at page 9, line 16
o Improved wordings (from good comments) o Improved wordings (from good comments)
o Simplified pseudo code for NSEC3 o Simplified pseudo code for NSEC3
o Added Warren as co-author. o Added Warren as co-author.
o Reworded much of the problem statement o Reworded much of the problem statement
o Reworked examples to better explain the problem / solution. o Reworked examples to better explain the problem / solution.
12.1. Version draft-fujiwara-dnsop-nsec-aggressiveuse-01 11.1. Version draft-fujiwara-dnsop-nsec-aggressiveuse-01
o Added reference to DLV [RFC5074] and imported some sentences. o Added reference to DLV [RFC5074] and imported some sentences.
o Added Aggressive Negative Caching Flag idea. o Added Aggressive Negative Caching Flag idea.
o Added detailed algorithms. o Added detailed algorithms.
12.2. Version draft-fujiwara-dnsop-nsec-aggressiveuse-02 11.2. Version draft-fujiwara-dnsop-nsec-aggressiveuse-02
o Added reference to [I-D.vixie-dnsext-resimprove] o Added reference to [I-D.vixie-dnsext-resimprove]
o Added considerations for the CD bit o Added considerations for the CD bit
o Updated detailed algorithms. o Updated detailed algorithms.
o Moved Aggressive Negative Caching Flag idea into Additional o Moved Aggressive Negative Caching Flag idea into Additional
Proposals Proposals
12.3. Version draft-fujiwara-dnsop-nsec-aggressiveuse-03 11.3. Version draft-fujiwara-dnsop-nsec-aggressiveuse-03
o Added "Partial implementation" o Added "Partial implementation"
o Section 4,5,6 reorganized for better representation o Section 4,5,6 reorganized for better representation
o Added NODATA answer in Section 4 o Added NODATA answer in Section 4
o Trivial updates o Trivial updates
o Updated pseudo code o Updated pseudo code
13. References 12. References
12.1. Normative References
13.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/ Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/
RFC2119, March 1997, RFC2119, March 1997,
<http://www.rfc-editor.org/info/rfc2119>. <http://www.rfc-editor.org/info/rfc2119>.
[RFC2308] Andrews, M., "Negative Caching of DNS Queries (DNS [RFC2308] Andrews, M., "Negative Caching of DNS Queries (DNS
NCACHE)", RFC 2308, DOI 10.17487/RFC2308, March 1998, NCACHE)", RFC 2308, DOI 10.17487/RFC2308, March 1998,
<http://www.rfc-editor.org/info/rfc2308>. <http://www.rfc-editor.org/info/rfc2308>.
[RFC4035] Arends, R., Austein, R., Larson, M., Massey, D., and S. [RFC4035] Arends, R., Austein, R., Larson, M., Massey, D., and S.
Rose, "Protocol Modifications for the DNS Security Rose, "Protocol Modifications for the DNS Security
Extensions", RFC 4035, DOI 10.17487/RFC4035, March 2005, Extensions", RFC 4035, DOI 10.17487/RFC4035, March 2005,
<http://www.rfc-editor.org/info/rfc4035>. <http://www.rfc-editor.org/info/rfc4035>.
[RFC4470] Weiler, S. and J. Ihren, "Minimally Covering NSEC Records
and DNSSEC On-line Signing", RFC 4470, DOI 10.17487/
RFC4470, April 2006,
<http://www.rfc-editor.org/info/rfc4470>.
[RFC4592] Lewis, E., "The Role of Wildcards in the Domain Name [RFC4592] Lewis, E., "The Role of Wildcards in the Domain Name
System", RFC 4592, DOI 10.17487/RFC4592, July 2006, System", RFC 4592, DOI 10.17487/RFC4592, July 2006,
<http://www.rfc-editor.org/info/rfc4592>. <http://www.rfc-editor.org/info/rfc4592>.
[RFC5074] Weiler, S., "DNSSEC Lookaside Validation (DLV)", RFC 5074, [RFC5074] Weiler, S., "DNSSEC Lookaside Validation (DLV)", RFC 5074,
DOI 10.17487/RFC5074, November 2007, DOI 10.17487/RFC5074, November 2007,
<http://www.rfc-editor.org/info/rfc5074>. <http://www.rfc-editor.org/info/rfc5074>.
[RFC5155] Laurie, B., Sisson, G., Arends, R., and D. Blacka, "DNS [RFC5155] Laurie, B., Sisson, G., Arends, R., and D. Blacka, "DNS
Security (DNSSEC) Hashed Authenticated Denial of Security (DNSSEC) Hashed Authenticated Denial of
Existence", RFC 5155, DOI 10.17487/RFC5155, March 2008, Existence", RFC 5155, DOI 10.17487/RFC5155, March 2008,
<http://www.rfc-editor.org/info/rfc5155>. <http://www.rfc-editor.org/info/rfc5155>.
[RFC7719] Hoffman, P., Sullivan, A., and K. Fujiwara, "DNS [RFC7719] Hoffman, P., Sullivan, A., and K. Fujiwara, "DNS
Terminology", RFC 7719, DOI 10.17487/RFC7719, December Terminology", RFC 7719, DOI 10.17487/RFC7719, December
2015, <http://www.rfc-editor.org/info/rfc7719>. 2015, <http://www.rfc-editor.org/info/rfc7719>.
13.2. Informative References 12.2. Informative References
[BIND9] Internet Systems Consortium, Inc., "Name Server Software",
2000, <https://www.isc.org/downloads/bind/>.
[I-D.ietf-dnsop-nxdomain-cut] [I-D.ietf-dnsop-nxdomain-cut]
Bortzmeyer, S. and S. Huque, "NXDOMAIN really means there Bortzmeyer, S. and S. Huque, "NXDOMAIN really means there
is nothing underneath", draft-ietf-dnsop-nxdomain-cut-03 is nothing underneath", draft-ietf-dnsop-nxdomain-cut-03
(work in progress), May 2016. (work in progress), May 2016.
[I-D.vixie-dnsext-resimprove] [I-D.vixie-dnsext-resimprove]
Vixie, P., Joffe, R., and F. Neves, "Improvements to DNS Vixie, P., Joffe, R., and F. Neves, "Improvements to DNS
Resolvers for Resiliency, Robustness, and Responsiveness", Resolvers for Resiliency, Robustness, and Responsiveness",
draft-vixie-dnsext-resimprove-00 (work in progress), June draft-vixie-dnsext-resimprove-00 (work in progress), June
2010. 2010.
[I-D.wkumari-dnsop-cheese-shop] Appendix A. Detailed implementation idea
Kumari, W. and G. Huston, "Believing NSEC records in the
DNS root.", draft-wkumari-dnsop-cheese-shop-01 (work in
progress), February 2016.
[UNBOUND] NLnet Labs, "Unbound DNS validating resolver", 2006,
<http://www.unbound.net/>.
Appendix A. Aggressive negative caching from RFC 5074
Imported from Section 6 of [RFC5074].
Previously, cached negative responses were indexed by QNAME, QCLASS,
QTYPE, and the setting of the CD bit (see RFC 4035, Section 4.7), and
only queries matching the index key would be answered from the cache.
With aggressive negative caching, the validator, in addition to
checking to see if the answer is in its cache before sending a query,
checks to see whether any cached and validated NSEC record denies the
existence of the sought record(s).
Using aggressive negative caching, a validator will not make queries
for any name covered by a cached and validated NSEC record.
Furthermore, a validator answering queries from clients will
synthesize a negative answer whenever it has an applicable validated
NSEC in its cache unless the CD bit was set on the incoming query.
Imported from Section 6.1 of [RFC5074].
Implementing aggressive negative caching suggests that a validator
will need to build an ordered data structure of NSEC records in order
to efficiently find covering NSEC records. Only NSEC records from
DLV domains need to be included in this data structure.
Appendix B. Detailed implementation idea
Section 6.1 of [RFC5074] is expanded as follows.
Implementing aggressive negative caching suggests that a validator
will need to build an ordered data structure of NSEC and NSEC3
records for each signer domain name of NSEC / NSEC3 records in order
to efficiently find covering NSEC / NSEC3 records. Call the table as
NSEC_TABLE.
The aggressive negative caching may be inserted at the cache lookup
part of the full-service resolvers.
If errors happen in aggressive negative caching algorithm, resolvers
MUST fall back to resolve the query as usual. "Resolve the query as
usual" means that the full-resolver resolve the query in Recursive-
mode as if the full-service resolver does not implement aggressive
negative caching.
To implement aggressive negative caching, resolver algorithm near
cache lookup will be changed as follows:
QNAME = the query name;
QTYPE = the query type;
if ({QNAME,QTYPE} entry exists in the cache) {
// the resolver responds the RRSet from the cache
resolve the query as usual;
}
// if NSEC* exists, QTYPE existence is proved by type bitmap
if (matching NSEC/NSEC3 of QNAME exists in the cache) {
if (QTYPE exists in type bitmap of NSEC/NSEC3 of QNAME) {
// the entry exists, however, it is not in the cache.
// need to iterate QNAME/QTYPE.
resolve the query as usual;
} else {
// QNAME exists, QTYPE does not exist.
the resolver can generate NODATA response;
}
}
// Find closest enclosing NS RRset in the cache.
// The owner of this NS RRset will be a suffix of the QNAME
// - the longest suffix of any NS RRset in the cache.
SIGNER = closest enclosing NS RRSet of QNAME in the cache;
// Check the NS RR of the SIGNER
if (NS RR of SIGNER and its RRSIG RR do not exist in the cache
or SIGNER zone is not signed or not validated) {
Resolve the query as usual;
}
if (SIGNER zone does not have NSEC_TABLE) {
Resolve the query as usual;
}
if (SIGNER zone is signed with NSEC) { // NSEC mode
// Check the non-existence of QNAME
CoveringNSEC = Find the covering NSEC of QNAME from NSEC_TABLE;
if (Covering NSEC doesn't exist in the cache and NSEC_TABLE) {
Resolve the query as usual.
}
// Select the longest existing name of QNAME from covering NSEC o Previously, cached negative responses were indexed by QNAME,
ClosestEncloser = common part of both owner name and QCLASS, QTYPE, and the setting of the CD bit (see RFC 4035,
next domain name of CoveringNSEC; Section 4.7), and only queries matching the index key would be
answered from the cache. With aggressive negative caching, the
validator, in addition to checking to see if the answer is in its
cache before sending a query, checks to see whether any cached and
validated NSEC record denies the existence of the sought
record(s). Using aggressive negative caching, a validator will
not make queries for any name covered by a cached and validated
NSEC record. Furthermore, a validator answering queries from
clients will synthesize a negative answer whenever it has an
applicable validated NSEC in its cache unless the CD bit was set
on the incoming query. (Imported from Section 6 of [RFC5074]).
if (*.LongestExistName entry exists in the cache) { o Implementing aggressive negative caching suggests that a validator
the resolver can generate positive response will need to build an ordered data structure of NSEC and NSEC3
// synthesize the wildcard *.TEST records for each signer domain name of NSEC / NSEC3 records in
} order to efficiently find covering NSEC / NSEC3 records. Call the
if covering NSEC RR of "*.LongestExistName" at SIGNER zone exists table as NSEC_TABLE. (Imported from Section 6.1 of [RFC5074] and
in the cache { expanded.)
the resolver can generate negative response;
}
//*.LongestExistName may exist. cannot generate negative response
Resolve the query as usual.
} else o The aggressive negative caching may be inserted at the cache
if (SIGNER zone is signed with NSEC3) { lookup part of the full-service resolvers.
// NSEC3 mode
ClosestEncloser = Find the closest encloser of QNAME o If errors happen in aggressive negative caching algorithm,
from the cache resolvers MUST fall back to resolve the query as usual. "Resolve
// to prove the non-existence of QNAME, the query as usual" means that the full-resolver resolve the query
// closest encloser of QNAME must be in the cache in Recursive-mode as if the full-service resolver does not
implement aggressive negative caching.
NextCloserName = the next closer name of QNAME Appendix B. Side effect: mitigation of random subdomain attacks
SourceOfSyhthesis = *.ClosestEncloser
if (matching NSEC3 of ClosestEncloser exists in the cache Random sub-domain attacks (referred to as "Water Torture" attacks or
and NXDomain attacks) send many queries for non-existent information to
covering NSEC3 of NextCloserName exists in the cache full-service resolvers. Their query names consist of random prefixes
and covering NSEC3 is not Opt-Out flag set) { and a target domain name. The negative cache does not work well, and
thus targeted full-service resolvers end up sending queries to
authoritative DNS servers of the target domain name.
// ClosestEncloser exists, and NextCloserName does not exist The aggressive negative caching is one of possible countermeasures to
// then we need to check *.ClosestEncloser random subdomain attacks. If the full-service resolver supports
aggressive negative caching and the target domain name is signed with
NSEC/NSEC3 (without Opt-Out), the aggressive negative caching is one
of countermeasures of random subdomain attacks.
if (*.ClosestEncloser entry exists in the cache) { However, attackers can set the CD bit to their attack queries. The
if (*.ClosestEncloser/QTYPE entry exists in the cache) { CD bit disables signature validation and the aggressive negative
the resolver can generate positive response caching will be of no use.
} else {
// lack of *.ClosestEncloser/QTYPE information
Resolve the query as usual
}
} else
if (covering NSEC3 of *.ClosestEncloser exists
and covering NSEC3 is not Opt-Out flag set) {
the resolver can generate negative response;
}
}
// no matching/covering NSEC3 of QNAME information
Resolve the query as usual
}
Authors' Addresses Authors' Addresses
Kazunori Fujiwara Kazunori Fujiwara
Japan Registry Services Co., Ltd. Japan Registry Services Co., Ltd.
Chiyoda First Bldg. East 13F, 3-8-1 Nishi-Kanda Chiyoda First Bldg. East 13F, 3-8-1 Nishi-Kanda
Chiyoda-ku, Tokyo 101-0065 Chiyoda-ku, Tokyo 101-0065
Japan Japan
Phone: +81 3 5215 8451 Phone: +81 3 5215 8451
 End of changes. 45 change blocks. 
305 lines changed or deleted 135 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/