idnits 2.17.1 draft-ietf-dnsop-rfc5011-security-considerations-01.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 : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (May 20, 2017) is 2532 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) ** Obsolete normative reference: RFC 7719 (Obsoleted by RFC 8499) Summary: 1 error (**), 0 flaws (~~), 1 warning (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 dnsop W. Hardaker 3 Internet-Draft USC/ISI 4 Intended status: Standards Track W. Kumari 5 Expires: November 21, 2017 Google 6 May 20, 2017 8 Security Considerations for RFC5011 Publishers 9 draft-ietf-dnsop-rfc5011-security-considerations-01 11 Abstract 13 This document describes the math behind the minimum time-length that 14 a DNS zone publisher must wait before using a new DNSKEY to sign 15 records when supporting the RFC5011 rollover strategies. 17 Status of This Memo 19 This Internet-Draft is submitted in full conformance with the 20 provisions of BCP 78 and BCP 79. 22 Internet-Drafts are working documents of the Internet Engineering 23 Task Force (IETF). Note that other groups may also distribute 24 working documents as Internet-Drafts. The list of current Internet- 25 Drafts is at http://datatracker.ietf.org/drafts/current/. 27 Internet-Drafts are draft documents valid for a maximum of six months 28 and may be updated, replaced, or obsoleted by other documents at any 29 time. It is inappropriate to use Internet-Drafts as reference 30 material or to cite them other than as "work in progress." 32 This Internet-Draft will expire on November 21, 2017. 34 Copyright Notice 36 Copyright (c) 2017 IETF Trust and the persons identified as the 37 document authors. All rights reserved. 39 This document is subject to BCP 78 and the IETF Trust's Legal 40 Provisions Relating to IETF Documents 41 (http://trustee.ietf.org/license-info) in effect on the date of 42 publication of this document. Please review these documents 43 carefully, as they describe your rights and restrictions with respect 44 to this document. Code Components extracted from this document must 45 include Simplified BSD License text as described in Section 4.e of 46 the Trust Legal Provisions and are provided without warranty as 47 described in the Simplified BSD License. 49 Table of Contents 51 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 52 1.1. Document History and Motivation . . . . . . . . . . . . . 2 53 1.2. Safely Rolling the Root Zone's KSK in 2017/2018 . . . . . 3 54 1.3. Requirements notation . . . . . . . . . . . . . . . . . . 3 55 2. Background . . . . . . . . . . . . . . . . . . . . . . . . . 3 56 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 57 4. Timing Associated with RFC5011 Processing . . . . . . . . . . 4 58 4.1. Timing Associated with Publication . . . . . . . . . . . 4 59 4.2. Timing Associated with Revocation . . . . . . . . . . . . 4 60 5. Denial of Service Attack Considerations . . . . . . . . . . . 5 61 5.1. Enumerated Attack Example . . . . . . . . . . . . . . . . 5 62 5.1.1. Attack Timing Breakdown . . . . . . . . . . . . . . . 6 63 6. Minimum RFC5011 Timing Requirements . . . . . . . . . . . . . 7 64 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 65 8. Operational Considerations . . . . . . . . . . . . . . . . . 9 66 9. Security Considerations . . . . . . . . . . . . . . . . . . . 9 67 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 9 68 11. Normative References . . . . . . . . . . . . . . . . . . . . 9 69 Appendix A. Real World Example: The 2017 Root KSK Key Roll . . . 10 70 Appendix B. Changes / Author Notes. . . . . . . . . . . . . . . 11 71 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 12 73 1. Introduction 75 [RFC5011] defines a mechanism by which DNSSEC validators can extend 76 their list of trust anchors when they've seen a new key published in 77 a zone. However, RFC5011 [intentionally] provides no guidance to the 78 publishers of DNSKEYs about how long they must wait before switching 79 to a newly published key for signing records or how long they must 80 wait before removing a revoked key from a zone. Because of this lack 81 of guidance, zone publishers may derive incorrect assumptions about 82 safe usage of the RFC5011 DNSKEY advertising, rolling and revocation 83 process. This document describes the minimum security requirements 84 from a publisher's point of view and is intended to compliment the 85 guidance offered in RFC5011 (which is written to provide timing 86 guidance solely to a Validating Resolver's point of view). 88 1.1. Document History and Motivation 90 To verify this lack of understanding is wide-spread, the authors 91 reached out to 5 DNSSEC experts to ask them how long they thought 92 they must wait before signing a zone using a new KSK [RFC4033] that 93 was being rolled according to the 5011 process. All 5 experts 94 answered with an insecure value, and we determined that this lack of 95 operational guidance is causing security concerns today and wrote 96 this companion document to RFC5011. We hope that this document will 97 rectify this understanding and provide better guidance to zone 98 publishers that wish to make use of the RFC5011 rollover process. 100 1.2. Safely Rolling the Root Zone's KSK in 2017/2018 102 One important note about ICANN's [currently upcoming] 2017/2018 KSK 103 rollover plan for the root zone: the timing values chosen for rolling 104 the KSK in the root zone appear completely safe, and are not affected 105 by the timing concerns introduced by this draft 107 1.3. Requirements notation 109 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 110 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 111 document are to be interpreted as described in [RFC2119]. 113 2. Background 115 The RFC5011 process describes a process by which a Validating 116 Resolver may accept a newly published KSK as a trust anchor for 117 validating future DNSSEC signed records. It also describes the 118 process for publicly revoking a published KSK. This document 119 augments that information with additional constraints, as required 120 from the DNSKEY publication and revocation's points of view. Note 121 that it does not define any other operational guidance or 122 recommendations about the RFC5011 process and restricts itself to 123 solely the security and operational ramifications of switching to a 124 new key or removing a revoked key too soon. Failure of a DNSKEY 125 publisher to follow the minimum recommendations associated with this 126 draft will result in potential denial-of-service attack opportunities 127 against validating resolvers or in revoked old DNSKEYs remaining in 128 the trust anchor storage of validating resolvers beyond their 129 expected valid lifetime. 131 3. Terminology 133 Trust Anchor Publisher The entity responsible for publishing a 134 DNSKEY that can be used as a trust anchor. 136 Zone Signer The owner of a zone intending to publish a new Key- 137 Signing-Key (KSK) that will become a trust anchor by validators 138 following the RFC5011 process. 140 RFC5011 Validating Resolver A DNSSEC Validating Resolver that is 141 using the RFC5011 processes to track and update trust anchors. 142 Sometimes referred to as a "RFC5011 Resolver" 144 Attacker An attacker intent on foiling the RFC5011 Validator's 145 ability to successfully adopt the Zone Signer's new DNSKEY as a 146 new trust anchor or to prevent the RFC5011 Validator from removing 147 an old DNSKEY from its list of trust anchors. 149 Also see Section 2 of [RFC4033] and [RFC7719] for additional 150 terminology. 152 4. Timing Associated with RFC5011 Processing 154 4.1. Timing Associated with Publication 156 RFC5011's process of safely publishing a new key and then making use 157 of that key falls into a number of high-level steps to be performed 158 by the Trust Anchor Publisher: 160 1. Publish a new DNSKEY in the zone, but continue to sign the zone 161 with the old one. 163 2. Wait a period of time. 165 3. Begin using the new DNSKEY to sign the appropriate resource 166 records. 168 This document discusses step 2 of the above process. Some 169 interpretations of RFC5011 have erroneously determined that the wait 170 time is equal to RFC5011's "hold down time". 172 Section 5 describes an attack based on this (common) erroneous 173 belief, which results in a denial of service attack against the zone 174 if that value is used. 176 4.2. Timing Associated with Revocation 178 RFC5011's process of advertising that an old key is to be revoked 179 from RFC5011 validating resolvers falls into a number of high-level 180 steps: 182 1. Set the revoke bit on the DNSKEY to be revoked. 184 2. Sign the revoked DNSKEY with itself. 186 3. Wait a period of time. 188 4. Remove the revoked key from the zone. 190 This document discusses step 3 of the above process. Some 191 interpretations of RFC5011 have erroneously determined that the wait 192 time is equal to RFC5011's "hold down time". 194 This document describes an attack based on this (common) erroneous 195 belief, which results in a revoked DNSKEY potentially staying in a 196 RFC5011 validating resolver long past its expected usage. 198 5. Denial of Service Attack Considerations 200 If an attacker is able to provide a RFC5011 Validating Resolver with 201 past responses, such as when it is in-path or able to otherwise 202 perform any number of cache poisoning attacks, the attacker may be 203 able to leave compliant RFC5011-Validating Resolvers without an 204 appropriate DNSKEY trust anchor. This scenario will remain until an 205 administrator manually fixes the situation. 207 The following timeline illustrates this situation. 209 5.1. Enumerated Attack Example 211 The following example settings are used in the example scenario 212 within this section: 214 TTL (all records) 1 day 216 DNSKEY RRSIG Signature Validity 10 days 218 Zone resigned every 1 day 220 Given these settings, the sequence of events in Section 5.1.1 depicts 221 how a Trust Anchor Publisher that waits for only the RFC5011 hold 222 time timer length of 30 days subjects its users to a potential Denial 223 of Service attack. The timing schedule listed below is based on a 224 Trust Anchor Publisher publishing a new Key Signing Key (KSK), with 225 the intent that it will later become a trust anchor. We label this 226 publication time as "T+0". All numbers in this sequence refer to 227 days before and after this initial publication event. Thus, T-1 is 228 the day before the introduction of the new key, and T+15 is the 15th 229 day after the key was introduced into the fictitious zone being 230 discussed. 232 In this dialog, we consider two keys being published: 234 K_old An older KSK and Trust Anchor being replaced. 236 K_new A new KSK being transitioned into active use and becoming a 237 Trust Anchor via the RFC5011 process. 239 5.1.1. Attack Timing Breakdown 241 The following series of steps depicts the timeline in which an attack 242 occurs that foils the adoption of a new DNSKEY by a Trust Anchor 243 Publisher that starts signing with the new DNSKEY too quickly. 245 T-1 The last RRSIGs are published by the Zone Signer that signs only 246 K_old key using the K_old key itself. [It may also be signing 247 ZSKs as well, but they are not relevant to this event so we will 248 not talk further about them; we are only talking about RRSIGs that 249 cover the DNSKEYs.] The Attacker queries for, retrieves and 250 caches this DNSKEY set and corresponding RRSIG signatures. 252 T-0 The Zone Signer adds K_new to their zone and signs the zone's 253 key set with K_old. The RFC5011 Validator (later to be under 254 attack) retrieves this new key set and corresponding RRSIGs and 255 notices the publication of K_new. The RFC5011 Validator starts 256 the (30-day) hold-down timer for K_new. 258 T+5 The RFC5011 Validator queries for the zone's keyset per the 259 RFC5011 Active Refresh schedule, discussed in Section 2.3 of 260 RFC5011. Instead of receiving the intended published keyset, the 261 Attacker successfully replays the keyset and associated signatures 262 that they recorded at T-1. Because the signature lifetime is 10 263 days (in this example), the replayed signature and keyset is 264 accepted as valid (being only 6 days old) and the RFC5011 265 Validator cancels the hold-down timer for K_new, per the RFC5011 266 algorithm. 268 T+10 The RFC5011 Validator queries for the zone's keyset and 269 discovers the new kset which includes K_new (again), signed by 270 K_old. Note: the attacker is unable to replay the records cached 271 at T-1, because they have now expired. The RFC5011 Validator 272 starts (anew) the hold-timer for K_new. 274 T+15,T+20, and T+25 The RFC5011 Validator continues checking the 275 zone's key set at the prescribed regular intervals. The RFC5011 276 Validator's hold-down timer keep running without being reset 277 assuming all of the validations succeed (again: the attacker can 278 no longer replay traffic to their benefit). 280 T+30 The Zone Signer knows that this is the first time at which some 281 validators might accept K_new as a new trust anchor, since the 282 hold-down timer of a RFC5011 Validator not under attack that had 283 queried and retrieved K_new at T+0 would now have reached 30 days. 284 However, the hold-down timer of our attacked RFC5011 Validator is 285 only at 20 days. 287 T+35 The Zone Signer (mistakenly) believes that all validators 288 following the Active Refresh schedule (Section 2.3 of RFC5011) 289 should have accepted K_new as a the new trust anchor (since the 290 hold down time of 30 days + 1/2 the signature validity period 291 would have passed). However, the hold-down timer of our attacked 292 RFC5011 Validator is only at 25 days; The replay attack at T+5 293 means its new hold-time timer actually started at T+10, and thus 294 at this time it's real hold-down timer is at T+35 - T+10 = 25 295 days, which is less than the RFC5011 required 30 days and the 296 RFC5011 won't consider it a valid trust anchor addition yet. 298 T+36 The Zone Signer, believing K_new is safe to use, switches their 299 active signing KSK to K_new and publishes a new RRSIG, signed with 300 K_new, and covering the DNSKEY set. Non-attacked RFC5011 301 validators, with a hold-down timer of at least 30 days, would have 302 accepted K_new into their set of trusted keys. But, because our 303 attacked RFC5011 Validator has a hold-down timer for K_new at only 304 26 days, it will fail to accept K_new as a trust anchor. Since 305 K_old is no longer being used, all the DNSKEY records from the 306 zone signed by K_new will be treated as invalid. Subsequently, 307 all keys in the key set are now unusable, invalidating all of the 308 records in the zone of any type and name. 310 6. Minimum RFC5011 Timing Requirements 312 Given the attack description in Section 5, the correct minimum length 313 of time required for the Zone Signer to wait before using K_new is: 315 waitTime = addHoldDownTime 316 + (DNSKEY RRSIG Signature Validity) 317 + MAX(MIN((DNSKEY RRSIG Signature Validity) / 2, 318 MAX(original TTL of K_old DNSKEY RRSet) / 2, 319 15 days), 320 1 hour) 321 + 2 * MAX(TTL of all records) 323 The RFC5011 "Active Refresh" requirements state that: 325 A resolver that has been configured for an automatic update 326 of keys from a particular trust point MUST query that trust 327 point (e.g., do a lookup for the DNSKEY RRSet and related 328 RRSIG records) no less often than the lesser of 15 days, half 329 the original TTL for the DNSKEY RRSet, or half the RRSIG 330 expiration interval and no more often than once per hour. 332 The important timing constraint introduced by this memo relates to 333 the last point at which a validating resolver may have received a 334 replayed the original DNSKEY set (K_old) without the new key. It's 335 the next query of the RFC5011 validator that the assured K_new will 336 be seen without a potential replay afterward. Thus, the latest time 337 a RFC5011 validator may begin their hold down timer is an "Active 338 Refresh" period after the last point that an attacker can replay the 339 K_old DNSKEY set. 341 The "Active Refresh" interval used by a RFC5011 validator is 342 determined by the larger of (DNSKEY RRSIG Signature Validity) and 343 (original TTL for the DNSKEY RRSet). The Following text assumes that 344 (DNSKEY RRSIG Signature Validity) is larger of the two, which is 345 operationally more common today. 347 Thus, the worst case scenario of this attack is when the attacker can 348 replay K_old just before (DNSKEY RRSIG Signature Validity). If a 349 RFC5011 validator picks up K_old at this this point, it will not have 350 a hold down timer started as it will have been reset by previous 351 replays. It's not until the next "Active Refresh" time that they'll 352 pick up K_new with assurance, and thus start their (final) hold down 353 timer. Thus, this is not at (DNSKEY RRSIG Signature Validity) time 354 past publication but may be significantly longer based on the zone's 355 DNSSEC parameters. 357 The extra 2 * MAX(TTL of all records) is the standard added safety 358 margin when dealing with DNSSEC due to caching that can take place. 359 Because the 5011 steps require direct validation using the signature 360 validity, the authors aren't yet convinced it is needed in this 361 particular case, but it is prudent to include it for added assurance. 363 For the parameters listed in Section 5.1, our example: 365 waitTime = 30 366 + 10 367 + 10 / 2 368 + 2 * (1) (days) 370 waitTime = 47 (days) 372 This hold-down time of 47 days is 12 days longer than the (frequently 373 perceived) 35 days in the example at T+35 above. 375 It is important to note that this value affects not just the 376 publication of new DNSKEYs intended to be used as trust anchors, but 377 also the length of time required to publish a DNSKEY with the revoke 378 bit set. Both of these publication timing requirements are affected 379 by the attacks described in this document. 381 7. IANA Considerations 383 This document contains no IANA considerations. 385 8. Operational Considerations 387 A companion document to RFC5011 was expected to be published that 388 describes the best operational practice considerations from the 389 perspective of a zone publisher and Trust Anchor Publisher. However, 390 this companion document has yet to be published. The authors of this 391 document hope that it will at some point in the future, as RFC5011 392 timing can be tricky as we have shown and we do not suggest "good 393 operational practice" that might be associated with a BCP on the 394 subject. This document is intended only to fill a single operational 395 void that results in security ramifications (specifically a denial of 396 service attack against an RFC5011 Validator). This document does not 397 attempt to document any other missing operational guidance for zone 398 publishers. 400 9. Security Considerations 402 This document, is solely about the security considerations with 403 respect to the Trust Anchor Publisher of RFC5011 trust anchors / 404 keys. Thus the entire document is a discussion of Security 405 Considerations when rolling DNSKEYs using the RFC5011 process. 407 10. Acknowledgements 409 The authors would like to especially thank to Michael StJohns for his 410 help and advice and the care and thought he put into RFC5011 itself. 411 We would also like to thank Bob Harold, Shane Kerr, Matthijs Mekking, 412 Duane Wessels, Petr Petr Spacek, and the dnsop working group who have 413 assisted with this document. 415 11. Normative References 417 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 418 Requirement Levels", BCP 14, RFC 2119, 419 DOI 10.17487/RFC2119, March 1997, 420 . 422 [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S. 423 Rose, "DNS Security Introduction and Requirements", 424 RFC 4033, DOI 10.17487/RFC4033, March 2005, 425 . 427 [RFC5011] StJohns, M., "Automated Updates of DNS Security (DNSSEC) 428 Trust Anchors", STD 74, RFC 5011, DOI 10.17487/RFC5011, 429 September 2007, . 431 [RFC7719] Hoffman, P., Sullivan, A., and K. Fujiwara, "DNS 432 Terminology", RFC 7719, DOI 10.17487/RFC7719, December 433 2015, . 435 Appendix A. Real World Example: The 2017 Root KSK Key Roll 437 In 2017, ICANN expects to (or has, depending on when you're reading 438 this) roll the key signing key (KSK) for the root zone. The relevant 439 parameters associated with the root zone at the time of this writing 440 is as follows: 442 addHoldDownTime: 30 days 443 Old DNSKEY RRSIG Signature Validity: 21 days 444 Old DNSKEY TTL: 2 days 446 Thus, sticking this information into the equation in 447 Section Section 6 yields (in days): 449 waitTime = addHoldDownTime 450 + (DNSKEY RRSIG Signature Validity) 451 + MAX(MIN((DNSKEY RRSIG Signature Validity) / 2, 452 MAX(original TTL of K_old DNSKEY RRSet) / 2, 453 15 days), 454 1 hour) 455 + 2 * MAX(TTL of all records) 457 waitTime = 30 458 + (21) 459 + MAX(MIN((21) / 2, 460 MAX(2 / 2, 461 15 days)), 462 1 hour) 463 + 2 * MAX(2) 465 waitTime = 30 + 21 + MAX(MIN(11.5, MAX( 1, 15)), 1 hour) + 4 467 waitTime = 30 + 21 + 11.5 + 4 469 waitTime = 66.5 days 471 Thus, ICANN should wait 66.5 days before switching to the newly 472 published KSK and before removing the old revoked key once it is 473 published as revoked. ICANN's current plans are to wait 70 days 474 before using the new KEY and 69 days before removing the old, revoked 475 key. Thus, their current rollover plans are sufficiently secure from 476 the attack discussed in this memo. 478 Appendix B. Changes / Author Notes. 480 From Individual-00 to DNSOP-00: 482 o Filename change. 484 From -00 to -01: 486 o Added Revocation processing (including "Timing Associated with 487 Revocation") 489 o Added real world example. 491 o Fixed some typoes and missing references. 493 From Ind-00 to -02: 495 Additional background and clarifications in abstract. 497 Better separation in attack description between attacked and non- 498 attacked resolvers. 500 Some language cleanup. 502 Clarified that this is maths ( and math is hard, let's go 503 shopping!) 505 Changed to " " style references. 507 From -02 to -03: 509 Minor changes from Bob Harold 511 Clarified why 3/2 signature validity is needed 513 Changed min wait time math to include TTL value as well 515 From -03 to -04: 517 Fixed the waitTime equation to handle the difference between the 518 usage of the expiration time and the Active Refresh time. 520 More clarification text and text changes proposed by Petr Spacek 522 From hardaker-04 to ietf-00: 524 Just rebranding. 526 From ietf-00 to ietf-01: 528 Added discussion surrounding revocation everywhere 530 Fixed the text about the formula 532 Another complete re-read for word-smithing 534 Authors' Addresses 536 Wes Hardaker 537 USC/ISI 538 P.O. Box 382 539 Davis, CA 95617 540 US 542 Email: ietf@hardakers.net 544 Warren Kumari 545 Google 546 1600 Amphitheatre Parkway 547 Mountain View, CA 94043 548 US 550 Email: warren@kumari.net