idnits 2.17.1 draft-ietf-dnsop-nsec-ttl-05.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- -- The draft header indicates that this document updates RFC8198, but the abstract doesn't seem to directly say this. It does mention RFC8198 though, so this could be OK. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year (Using the creation date from RFC4034, updated by this document, for RFC5378 checks: 2002-02-26) -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (20 May 2021) is 1070 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) No issues found here. Summary: 0 errors (**), 0 flaws (~~), 1 warning (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 dnsop P. van Dijk 3 Internet-Draft PowerDNS 4 Updates: 4034, 4035, 5155, 8198 (if approved) 20 May 2021 5 Intended status: Standards Track 6 Expires: 21 November 2021 8 NSEC and NSEC3 TTLs and NSEC Aggressive Use 9 draft-ietf-dnsop-nsec-ttl-05 11 Abstract 13 Due to a combination of unfortunate wording in earlier documents, 14 aggressive use of NSEC and NSEC3 records may deny the existence of 15 names far beyond the intended lifetime of a denial. This document 16 changes the definition of the NSEC and NSEC3 TTL (Time To Live) to 17 correct that situation. This document updates RFC 4034, RFC 4035, 18 RFC 5155, and RFC 8198. 20 Status of This Memo 22 This Internet-Draft is submitted in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at https://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on 21 November 2021. 37 Copyright Notice 39 Copyright (c) 2021 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 44 license-info) in effect on the date of publication of this document. 45 Please review these documents carefully, as they describe your rights 46 and restrictions with respect to this document. Code Components 47 extracted from this document must include Simplified BSD License text 48 as described in Section 4.e of the Trust Legal Provisions and are 49 provided without warranty as described in the Simplified BSD License. 51 Table of Contents 53 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 54 2. Conventions and Definitions . . . . . . . . . . . . . . . . . 4 55 3. NSEC and NSEC3 TTL changes . . . . . . . . . . . . . . . . . 4 56 3.1. Updates to RFC4034 . . . . . . . . . . . . . . . . . . . 4 57 3.2. Updates to RFC4035 . . . . . . . . . . . . . . . . . . . 5 58 3.3. Updates to RFC5155 . . . . . . . . . . . . . . . . . . . 5 59 3.4. Updates to RFC8198 . . . . . . . . . . . . . . . . . . . 6 60 4. Zone Operator Considerations . . . . . . . . . . . . . . . . 6 61 4.1. A Note On Wildcards . . . . . . . . . . . . . . . . . . . 7 62 5. Security Considerations . . . . . . . . . . . . . . . . . . . 7 63 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 64 7. Normative References . . . . . . . . . . . . . . . . . . . . 7 65 Appendix A. Implementation Status . . . . . . . . . . . . . . . 8 66 Appendix B. Document history . . . . . . . . . . . . . . . . . . 8 67 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 10 68 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 10 70 1. Introduction 72 [RFC editor: please remove this block before publication. 74 Earlier notes on this: 76 * https://indico.dns-oarc.net/event/29/sessions/98/#20181013 77 (https://indico.dns-oarc.net/event/29/sessions/98/#20181013) 79 * https://lists.dns-oarc.net/pipermail/dns-operations/2018-April/ 80 thread.html#17420 (https://lists.dns-oarc.net/pipermail/dns- 81 operations/2018-April/thread.html#17420) 83 * https://lists.dns-oarc.net/pipermail/dns- 84 operations/2018-March/017416.html (https://lists.dns- 85 oarc.net/pipermail/dns-operations/2018-March/017416.html) 87 This document lives on GitHub (https://github.com/PowerDNS/draft- 88 dnsop-nsec-ttl); proposed text and editorial changes are very much 89 welcomed there, but any functional changes should always first be 90 discussed on the IETF DNSOP WG mailing list. 92 ] 94 [RFC2308] defines the TTL of the SOA (Start Of Authority) record that 95 must be returned in negative answers (NXDOMAIN or NODATA): 97 | The TTL of this record is set from the minimum of the MINIMUM 98 | field of the SOA record and the TTL of the SOA itself, and 99 | indicates how long a resolver may cache the negative answer. 101 Thus, if the TTL of the SOA in the zone is lower than the SOA MINIMUM 102 value (the last number in the SOA record), the authoritative server 103 sends that lower value as the TTL of the returned SOA record. The 104 resolver always uses the TTL of the returned SOA record when setting 105 the negative TTL in its cache. 107 However, [RFC4034] section 4 has this unfortunate text: 109 | The NSEC RR SHOULD have the same TTL value as the SOA minimum TTL 110 | field. This is in the spirit of negative caching ([RFC2308]). 112 This text, while referring to RFC2308, can cause NSEC records to have 113 much higher TTLs than the appropriate negative TTL for a zone. 114 [RFC5155] contains equivalent text. 116 [RFC8198] section 5.4 tries to correct this: 118 | Section 5 of [RFC2308] also states that a negative cache entry TTL 119 | is taken from the minimum of the SOA.MINIMUM field and SOA's TTL. 120 | This can be less than the TTL of an NSEC or NSEC3 record, since 121 | their TTL is equal to the SOA.MINIMUM field (see [RFC4035], 122 | Section 2.3 and [RFC5155], Section 3). 123 | 124 | A resolver that supports aggressive use of NSEC and NSEC3 SHOULD 125 | reduce the TTL of NSEC and NSEC3 records to match the SOA.MINIMUM 126 | field in the authority section of a negative response, if 127 | SOA.MINIMUM is smaller. 129 But the NSEC and NSEC3 RRs should, according to RFC4034 and RFC5155, 130 already be at the value of the MINIMUM field in the SOA. Thus, the 131 advice from RFC8198 would not actually change the TTL used for the 132 NSEC and NSEC3 RRs for authoritative servers that follow the RFCs. 134 As a theoretical exercise, consider a TLD named ".example" with a SOA 135 record like this: 137 "example. 900 IN SOA primary.example. hostmaster.example. 1 1800 900 138 604800 86400" 140 The SOA record has a 900 second TTL, and a 86400 MINIMUM TTL. 141 Negative responses from this zone have a 900 second TTL, but the NSEC 142 or NSEC3 records in those negative responses have a 86400 TTL. If a 143 resolver were to use those NSEC or NSEC3 records aggressively, they 144 would be considered valid for a day, instead of the intended 15 145 minutes. 147 2. Conventions and Definitions 149 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 150 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 151 "OPTIONAL" in this document are to be interpreted as described in BCP 152 14 [RFC2119] [RFC8174] when, and only when, they appear in all 153 capitals, as shown here. 155 3. NSEC and NSEC3 TTL changes 157 The existing texts in [RFC4034], [RFC4035], and [RFC5155] use the 158 SHOULD requirement level, but they were written when [RFC4035] still 159 said 'However, it seems prudent for resolvers to avoid blocking new 160 authoritative data or synthesizing new data on their own'. [RFC8198] 161 updated that text to contain 'DNSSEC-enabled validating resolvers 162 SHOULD use wildcards and NSEC/NSEC3 resource records to generate 163 positive and negative responses until the effective TTLs or 164 signatures for those records expire'. This means that correctness of 165 NSEC and NSEC3 records, and their TTLs, has become much more 166 important. Because of that, the updates in this document upgrade the 167 requirement level to MUST. 169 3.1. Updates to RFC4034 171 Where [RFC4034] says: 173 | The NSEC RR SHOULD have the same TTL value as the SOA minimum TTL 174 | field. This is in the spirit of negative caching ([RFC2308]). 176 This is updated to say: 178 | The TTL of the NSEC RR that is returned MUST be the lesser of the 179 | MINIMUM field of the SOA record and the TTL of the SOA itself. 180 | This matches the definition of the TTL for negative responses in 181 | [RFC2308]. Because some signers incrementally update the NSEC 182 | chain, a transient inconsistency between the observed and expected 183 | TTL MAY exist. 185 3.2. Updates to RFC4035 187 Where [RFC4035] says: 189 | The TTL value for any NSEC RR SHOULD be the same as the minimum 190 | TTL value field in the zone SOA RR. 192 This is updated to say: 194 | The TTL of the NSEC RR that is returned MUST be the lesser of the 195 | MINIMUM field of the SOA record and the TTL of the SOA itself. 196 | This matches the definition of the TTL for negative responses in 197 | [RFC2308]. Because some signers incrementally update the NSEC 198 | chain, a transient inconsistency between the observed and expected 199 | TTL MAY exist. 201 3.3. Updates to RFC5155 203 Where [RFC5155] says: 205 | The NSEC3 RR SHOULD have the same TTL value as the SOA minimum TTL 206 | field. This is in the spirit of negative caching [RFC2308]. 208 This is updated to say: 210 | The TTL of the NSEC3 RR that is returned MUST be the lesser of the 211 | MINIMUM field of the SOA record and the TTL of the SOA itself. 212 | This matches the definition of the TTL for negative responses in 213 | [RFC2308]. Because some signers incrementally update the NSEC3 214 | chain, a transient inconsistency between the observed and expected 215 | TTL MAY exist. 217 Where [RFC5155] says: 219 | o The TTL value for any NSEC3 RR SHOULD be the same as the minimum 220 | TTL value field in the zone SOA RR. 222 This is updated to say: 224 | o The TTL value for each NSEC3 RR MUST be the lesser of the 225 | MINIMUM field of the zone SOA RR and the TTL of the zone SOA RR 226 | itself. Because some signers incrementally update the NSEC3 227 | chain, a transient inconsistency between the observed and expected 228 | TTL MAY exist. 230 3.4. Updates to RFC8198 232 [RFC8198] section 5.4 (Consideration on TTL) is completely replaced 233 by the following text: 235 | The TTL value of negative information is especially important, 236 | because newly added domain names cannot be used while the negative 237 | information is effective. 238 | 239 | Section 5 of [RFC2308] suggests a maximum default negative cache 240 | TTL value of 3 hours (10800). It is RECOMMENDED that validating 241 | resolvers limit the maximum effective TTL value of negative 242 | responses (NSEC/NSEC3 RRs) to this same value. 243 | 244 | A resolver that supports aggressive use of NSEC and NSEC3 MAY 245 | limit the TTL of NSEC and NSEC3 records to the lesser of the 246 | SOA.MINIMUM field and the TTL of the SOA in a response, if 247 | present. It MAY also use a previously cached SOA for a zone to 248 | find these values. 250 (The third paragraph of the original is removed, and the fourth 251 paragraph is updated to allow resolvers to also take the lesser of 252 the SOA TTL and SOA MINIMUM.) 254 4. Zone Operator Considerations 256 If signers and DNS servers for a zone cannot immediately be updated 257 to conform to this document, zone operators are encouraged to 258 consider setting their SOA record TTL and the SOA MINIMUM field to 259 the same value. That way, the TTL used for aggressive NSEC and NSEC3 260 use matches the SOA TTL for negative responses. 262 Note that some signers might use the SOA TTL or MINIMUM as a default 263 for other values, such as the TTL for DNSKEY records. Operators 264 should consult documentation before changing values. 266 4.1. A Note On Wildcards 268 Validating resolvers consider an expanded wildcard valid for the 269 wildcard's TTL, capped by the TTLs of the NSEC or NSEC3 proof that 270 shows that the wildcard expansion is legal. Thus, changing the TTL 271 of NSEC or NSEC3 records (explicitly, or by implementation of this 272 document, implicitly) might affect (shorten) the lifetime of 273 wildcards. 275 5. Security Considerations 277 An attacker can delay future records from appearing in a cache by 278 seeding the cache with queries that cause NSEC or NSEC3 responses to 279 be cached for aggressive use purposes. This document reduces the 280 impact of that attack in cases where the NSEC or NSEC3 TTL is higher 281 than the zone operator intended. 283 6. IANA Considerations 285 IANA is requested to add a reference to this document in the 286 "Resource Record (RR) TYPEs" subregistry of the "Domain Name System 287 (DNS) Parameters" registry, for the NSEC and NSEC3 types. 289 7. Normative References 291 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 292 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 293 May 2017, . 295 [RFC2308] Andrews, M., "Negative Caching of DNS Queries (DNS 296 NCACHE)", RFC 2308, DOI 10.17487/RFC2308, March 1998, 297 . 299 [RFC4034] Arends, R., Austein, R., Larson, M., Massey, D., and S. 300 Rose, "Resource Records for the DNS Security Extensions", 301 RFC 4034, DOI 10.17487/RFC4034, March 2005, 302 . 304 [RFC5155] Laurie, B., Sisson, G., Arends, R., and D. Blacka, "DNS 305 Security (DNSSEC) Hashed Authenticated Denial of 306 Existence", RFC 5155, DOI 10.17487/RFC5155, March 2008, 307 . 309 [RFC8198] Fujiwara, K., Kato, A., and W. Kumari, "Aggressive Use of 310 DNSSEC-Validated Cache", RFC 8198, DOI 10.17487/RFC8198, 311 July 2017, . 313 [RFC4035] Arends, R., Austein, R., Larson, M., Massey, D., and S. 314 Rose, "Protocol Modifications for the DNS Security 315 Extensions", RFC 4035, DOI 10.17487/RFC4035, March 2005, 316 . 318 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 319 Requirement Levels", BCP 14, RFC 2119, 320 DOI 10.17487/RFC2119, March 1997, 321 . 323 Appendix A. Implementation Status 325 [RFC Editor: please remove this section before publication] 327 Implemented in PowerDNS Authoritative Server 4.3.0 328 https://doc.powerdns.com/authoritative/dnssec/ 329 operational.html?highlight=ttl#some-notes-on-ttl-usage 330 (https://doc.powerdns.com/authoritative/dnssec/ 331 operational.html?highlight=ttl#some-notes-on-ttl-usage) . 333 Implemented in BIND 9.16 and up, to be released early 2021 334 https://mailarchive.ietf.org/arch/msg/dnsop/ga41J2PPUbmc21-- 335 dqf3i7_IY6M (https://mailarchive.ietf.org/arch/msg/dnsop/ 336 ga41J2PPUbmc21--dqf3i7_IY6M) https://gitlab.isc.org/isc-projects/ 337 bind9/-/merge_requests/4506 (https://gitlab.isc.org/isc-projects/ 338 bind9/-/merge_requests/4506) . 340 Implemented in Knot DNS 3.1, to be released in 2021 341 https://gitlab.nic.cz/knot/knot-dns/-/merge_requests/1219 342 (https://gitlab.nic.cz/knot/knot-dns/-/merge_requests/1219) . 344 Implemented in ldns, patch under review 345 https://github.com/NLnetLabs/ldns/pull/118 346 (https://github.com/NLnetLabs/ldns/pull/118) 348 Implementation status is tracked at 349 https://trac.ietf.org/trac/dnsop/wiki/draft-ietf-dnsop-nsec-ttl 350 (https://trac.ietf.org/trac/dnsop/wiki/draft-ietf-dnsop-nsec-ttl) 352 Appendix B. Document history 354 [RFC editor: please remove this section before publication.] 356 From draft-vandijk-dnsop-nsec-ttl-00 to draft-ietf-dnsop-nsec-ttl-00: 358 * document was adopted 360 * various minor editorial changes 361 * now also updates 4035 363 * use .example instead of .com for the example 365 * more words on 8198 367 * a note on wildcards 369 From draft-ietf-dnsop-nsec-ttl-00 to draft-ietf-dnsop-nsec-ttl-01: 371 * various wording improvements 373 * added Implementation note from Knot, expanded the BIND one with 374 the GitLab MR URL 376 * reduced requirement level from MUST to SHOULD, like the original 377 texts 379 From draft-ietf-dnsop-nsec-ttl-01 to draft-ietf-dnsop-nsec-ttl-02: 381 * updated the second bit of wrong text in 5155 383 From draft-ietf-dnsop-nsec-ttl-02 to draft-ietf-dnsop-nsec-ttl-03: 385 * document now updates resolver behaviour in 8198 387 * lots of extra text to clarify what behaviour goes where (thanks 388 Paul Hoffman) 390 * replace 'any' with 'each' (thanks Duane) 392 * upgraded requirement level to MUST, plus a note on incremental 393 signers 395 From draft-ietf-dnsop-nsec-ttl-03 to draft-ietf-dnsop-nsec-ttl-04: 397 * the 'incremental signer exception' is now part of all relevant 398 document updates 400 * added an explanation for the upgraded requirement level 402 From draft-ietf-dnsop-nsec-ttl-04 to draft-ietf-dnsop-nsec-ttl-05: 404 * various minor rewordings (from IESG review, and things I spotted 405 while handling IESG review comments) 407 * added a note on the secondary impact of changing the SOA TTL and/ 408 or MINIMUM (IESG review) 410 Acknowledgements 412 This document was made possible with the help of the following 413 people: 415 * Ralph Dolmans 417 * Warren Kumari 419 * Matthijs Mekking 421 * Vladimir Cunat 423 * Matt Nordhoff 425 * Josh Soref 427 * Tim Wicinski 429 The author would like to explicitly thank Paul Hoffman for extensive 430 reviews, text contributions, and help in navigating WG comments. 432 Author's Address 434 Peter van Dijk 435 PowerDNS 436 Den Haag 437 Netherlands 439 Email: peter.van.dijk@powerdns.com