idnits 2.17.1 draft-nir-ike-qcd-07.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 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 (July 11, 2010) is 5038 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) == Missing Reference: 'IDr' is mentioned on line 254, but not defined == Missing Reference: 'KEi' is mentioned on line 313, but not defined == Missing Reference: 'KEr' is mentioned on line 315, but not defined == Missing Reference: 'CERTREQ' is mentioned on line 586, but not defined ** Obsolete normative reference: RFC 4306 (Obsoleted by RFC 5996) ** Obsolete normative reference: RFC 4718 (Obsoleted by RFC 5996) Summary: 2 errors (**), 0 flaws (~~), 5 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group Y. Nir 3 Internet-Draft Check Point 4 Intended status: Standards Track F. Detienne 5 Expires: January 12, 2011 P. Sethi 6 Cisco 7 July 11, 2010 9 A Quick Crash Detection Method for IKE 10 draft-nir-ike-qcd-07 12 Abstract 14 This document describes an extension to the IKEv2 protocol that 15 allows for faster detection of SA desynchronization using a saved 16 token. 18 When an IPsec tunnel between two IKEv2 peers is disconnected due to a 19 restart of one peer, it can take as much as several minutes for the 20 other peer to discover that the reboot has occurred, thus delaying 21 recovery. In this text we propose an extension to the protocol, that 22 allows for recovery immediately following the restart. 24 Status of this Memo 26 This Internet-Draft is submitted in full conformance with the 27 provisions of BCP 78 and BCP 79. 29 Internet-Drafts are working documents of the Internet Engineering 30 Task Force (IETF). Note that other groups may also distribute 31 working documents as Internet-Drafts. The list of current Internet- 32 Drafts is at http://datatracker.ietf.org/drafts/current/. 34 Internet-Drafts are draft documents valid for a maximum of six months 35 and may be updated, replaced, or obsoleted by other documents at any 36 time. It is inappropriate to use Internet-Drafts as reference 37 material or to cite them other than as "work in progress." 39 This Internet-Draft will expire on January 12, 2011. 41 Copyright Notice 43 Copyright (c) 2010 IETF Trust and the persons identified as the 44 document authors. All rights reserved. 46 This document is subject to BCP 78 and the IETF Trust's Legal 47 Provisions Relating to IETF Documents 48 (http://trustee.ietf.org/license-info) in effect on the date of 49 publication of this document. Please review these documents 50 carefully, as they describe your rights and restrictions with respect 51 to this document. Code Components extracted from this document must 52 include Simplified BSD License text as described in Section 4.e of 53 the Trust Legal Provisions and are provided without warranty as 54 described in the Simplified BSD License. 56 Table of Contents 58 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 59 1.1. Conventions Used in This Document . . . . . . . . . . . . 4 60 2. RFC 4306 Crash Recovery . . . . . . . . . . . . . . . . . . . 5 61 3. Protocol Outline . . . . . . . . . . . . . . . . . . . . . . . 5 62 4. Formats and Exchanges . . . . . . . . . . . . . . . . . . . . 6 63 4.1. Notification Format . . . . . . . . . . . . . . . . . . . 6 64 4.2. Passing a Token in the AUTH Exchange . . . . . . . . . . . 7 65 4.3. Replacing Tokens After Rekey or Resumption . . . . . . . . 8 66 4.4. Replacing the Token for an Existing SA . . . . . . . . . . 9 67 4.5. Presenting the Token in an INFORMATIONAL Exchange . . . . 9 68 5. Token Generation and Verification . . . . . . . . . . . . . . 10 69 5.1. A Stateless Method of Token Generation . . . . . . . . . . 10 70 5.2. A Stateless Method with IP addresses . . . . . . . . . . . 11 71 5.3. Token Lifetime . . . . . . . . . . . . . . . . . . . . . . 11 72 6. Backup Gateways . . . . . . . . . . . . . . . . . . . . . . . 11 73 7. Alternative Solutions . . . . . . . . . . . . . . . . . . . . 12 74 7.1. Initiating a new IKE SA . . . . . . . . . . . . . . . . . 12 75 7.2. Birth Certificates . . . . . . . . . . . . . . . . . . . . 12 76 7.3. Reducing Liveness Check Length . . . . . . . . . . . . . . 13 77 8. Interaction with Session Resumption . . . . . . . . . . . . . 13 78 9. Operational Considerations . . . . . . . . . . . . . . . . . . 14 79 9.1. Who should implement this specification . . . . . . . . . 14 80 9.2. Response to unknown child SPI . . . . . . . . . . . . . . 15 81 9.3. Using Tokens that Depend on IP Addresses . . . . . . . . . 16 82 10. Security Considerations . . . . . . . . . . . . . . . . . . . 16 83 10.1. QCD Token Generation and Handling . . . . . . . . . . . . 16 84 10.2. QCD Token Transmission . . . . . . . . . . . . . . . . . . 17 85 10.3. QCD Token Enumeration . . . . . . . . . . . . . . . . . . 17 86 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18 87 12. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 18 88 13. Change Log . . . . . . . . . . . . . . . . . . . . . . . . . . 18 89 13.1. Changes from draft-nir-ike-qcd-03 and -04 . . . . . . . . 18 90 13.2. Changes from draft-nir-ike-qcd-02 . . . . . . . . . . . . 18 91 13.3. Changes from draft-nir-ike-qcd-01 . . . . . . . . . . . . 19 92 13.4. Changes from draft-nir-ike-qcd-00 . . . . . . . . . . . . 19 93 13.5. Changes from draft-nir-qcr-00 . . . . . . . . . . . . . . 19 94 14. References . . . . . . . . . . . . . . . . . . . . . . . . . . 19 95 14.1. Normative References . . . . . . . . . . . . . . . . . . . 19 96 14.2. Informative References . . . . . . . . . . . . . . . . . . 19 97 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 20 99 1. Introduction 101 IKEv2, as described in [RFC4306] has a method for recovering from a 102 reboot of one peer. As long as traffic flows in both directions, the 103 rebooted peer should re-establish the tunnels immediately. However, 104 in many cases the rebooted peer is a VPN gateway that protects only 105 servers, or else the non-rebooted peer has a dynamic IP address. In 106 such cases, the rebooted peer will not be able to re-establish the 107 tunnels. Section 2 describes how recovery works under RFC 4306, and 108 explains why it may take several minutes. 110 The method proposed here, is to send an octet string, called a "QCD 111 token" in the IKE_AUTH exchange that establishes the tunnel. That 112 token can be stored on the peer as part of the IKE SA. After a 113 reboot, the rebooted implementation can re-generate the token, and 114 send it to the peer, so as to delete the IKE SA. Deleting the IKE SA 115 results is a quick establishment of new IPsec tunnels. This is 116 described in Section 3. 118 1.1. Conventions Used in This Document 120 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 121 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 122 document are to be interpreted as described in [RFC2119]. 124 The term "token" refers to an octet string that an implementation can 125 generate using only the properties of a protected IKE message (such 126 as IKE SPIs) as input. A conforming implementation MUST be able to 127 generate the same token from the same input even after rebooting. 129 The term "token maker" refers to an implementation that generates a 130 token and sends it to the peer as specified in this document. 132 The term "token taker" refers to an implementation that stores such a 133 token or a digest thereof, in order to verify that a new token it 134 receives is identical to the old token it has stored. 136 The term "non-volatile storage" in this document refers to a data 137 storage module, that persists across restarts of the token maker. 138 Examples of such a storage module include an internal disk, an 139 internal flash memory module, an external disk and an external 140 database. A small non-volatile storage module is required for a 141 token maker, but a larger one can be used to enhance performance, as 142 described in Section 9.2. 144 2. RFC 4306 Crash Recovery 146 When one peer loses state or reboots, the other peer does not get any 147 notification, so unidirectional IPsec traffic can still flow. The 148 rebooted peer will not be able to decrypt it, however, and the only 149 remedy is to send an unprotected INVALID_SPI notification as 150 described in section 3.10.1 of [RFC4306]. That section also 151 describes the processing of such a notification: 153 "If this Informational Message is sent outside the 154 context of an IKE_SA, it should be used by the recipient 155 only as a "hint" that something might be wrong (because it 156 could easily be forged)." 158 Since the INVALID_SPI can only be used as a hint, the non-rebooted 159 peer has to determine whether the IPsec SA, and indeed the parent IKE 160 SA are still valid. The method of doing this is described in section 161 2.4 of [RFC4306]. This method, called "liveness check" involves 162 sending a protected empty INFORMATIONAL message, and awaiting a 163 response. This procedure is sometimes referred to as "Dead Peer 164 Detection" or DPD. 166 Section 2.4 does not mandate how many times the liveness check 167 message should be retransmitted, or for how long, but does recommend 168 the following: 170 "It is 171 suggested that messages be retransmitted at least a dozen times over 172 a period of at least several minutes before giving up on an SA..." 174 Those "at least several minutes" are a time during which both peers 175 are active, but IPsec cannot be used. 177 3. Protocol Outline 179 Supporting implementations will send a notification, called a "QCD 180 token", as described in Section 4.1 in the last IKE_AUTH exchange 181 messages. These are the final IKE_AUTH request and final IKE_AUTH 182 response that contain the AUTH payloads. The generation of these 183 tokens is a local matter for implementations, but considerations are 184 described in Section 5. Implementations that send such a token will 185 be called "token makers". 187 A supporting implementation receiving such a token MUST store it (or 188 a digest thereof) as part of the IKE SA. Implementations that 189 support this part of the protocol will be called "token takers". 190 Section 9.1 has considerations for which implementations need to be 191 token takers, and which should be token makers. Implementation that 192 are not token takers will silently ignore QCD tokens. 194 When a token maker receives a protected IKE request message with 195 unknown IKE SPIs, it MUST generate a new token that is identical to 196 the previous token, and send it to the requesting peer in an 197 unprotected IKE message as described in Section 4.5. 199 When a token taker receives the QCD token in an unprotected 200 notification, it MUST verify that the TOKEN_SECRET_DATA matches the 201 token stored in the matching IKE SA. If the verification fails, or 202 if the IKE SPIs in the message do not match any existing IKE SA, it 203 SHOULD log the event. If it succeeds, it MUST silently delete the 204 IKE SA associated with the IKE_SPI fields, and all dependant child 205 SAs. This event MAY also be logged. The token taker MUST accept 206 such tokens from any IP address and port combination, so as to allow 207 different kinds of high-availability configurations of the token 208 maker. 210 A supporting token taker MAY immediately create new SAs using an 211 Initial exchange, or it may wait for subsequent traffic to trigger 212 the creation of new SAs. 214 There is ongoing work on IKEv2 Session Resumption ([resumption]). 215 See Section 8 for a short discussion about this extensions's 216 interaction with session resumption. 218 4. Formats and Exchanges 220 4.1. Notification Format 222 The notification payload called "QCD token" is formatted as follows: 224 1 2 3 225 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 226 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 227 ! Next Payload !C! RESERVED ! Payload Length ! 228 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 229 ! Protocol ID ! SPI Size ! QCD Token Notify Message Type ! 230 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 231 ! ! 232 ~ TOKEN_SECRET_DATA ~ 233 ! ! 234 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 236 o Protocol ID (1 octet) MUST be 1, as this message is related to an 237 IKE SA. 238 o SPI Size (1 octet) MUST be zero, in conformance with section 3.10 239 of [RFC4306]. 240 o QCD Token Notify Message Type (2 octets) - MUST be xxxxx, the 241 value assigned for QCD token notifications. TBA by IANA. 242 o TOKEN_SECRET_DATA (16-128 octets) contains a generated token as 243 described in Section 5. 245 4.2. Passing a Token in the AUTH Exchange 247 For brevity, only the EAP version of an AUTH exchange will be 248 presented here. The non-EAP version is very similar. The figures 249 below are based on appendix A.3 of [RFC4718]. 251 first request --> IDi, 252 [N(INITIAL_CONTACT)], 253 [[N(HTTP_CERT_LOOKUP_SUPPORTED)], CERTREQ+], 254 [IDr], 255 [CP(CFG_REQUEST)], 256 [N(IPCOMP_SUPPORTED)+], 257 [N(USE_TRANSPORT_MODE)], 258 [N(ESP_TFC_PADDING_NOT_SUPPORTED)], 259 [N(NON_FIRST_FRAGMENTS_ALSO)], 260 SA, TSi, TSr, 261 [V+] 263 first response <-- IDr, [CERT+], AUTH, 264 EAP, 265 [V+] 267 / --> EAP 268 repeat 1..N times | 269 \ <-- EAP 271 last request --> AUTH 272 [N(QCD_TOKEN)] 274 last response <-- AUTH, 275 [N(QCD_TOKEN)] 276 [CP(CFG_REPLY)], 277 [N(IPCOMP_SUPPORTED)], 278 [N(USE_TRANSPORT_MODE)], 279 [N(ESP_TFC_PADDING_NOT_SUPPORTED)], 280 [N(NON_FIRST_FRAGMENTS_ALSO)], 281 SA, TSi, TSr, 282 [N(ADDITIONAL_TS_POSSIBLE)], 283 [V+] 285 Note that the QCD_TOKEN notification is marked as optional because it 286 is not required by this specification that every implementation be 287 both token maker and token taker. If only one peer sends the QCD 288 token, then a reboot of the other peer will not be recoverable by 289 this method. This may be acceptable if traffic typically originates 290 from the other peer. 292 In any case, the lack of a QCD_TOKEN notification MUST NOT be taken 293 as an indication that the peer does not support this standard. 294 Conversely, if a peer does not understand this notification, it will 295 simply ignore it. Therefore a peer MAY send this notification 296 freely, even if it does not know whether the other side supports it. 298 The QCD_TOKEN notification is related to the IKE SA and MUST follow 299 the AUTH payload and precede the Configuration payload and all 300 payloads related to the child SA. 302 4.3. Replacing Tokens After Rekey or Resumption 304 After rekeying an IKE SA, the IKE SPIs are replaced, so the new SA 305 also needs to have a token. If only the responder in the rekey 306 exchange is the token maker, this can be done within the 307 CREATE_CHILD_SA exchange. If the initiator is a token maker, then we 308 need an extra informational exchange. 310 The following figure shows the CREATE_CHILD_SA exchange for rekeying 311 the IKE SA. Only the responder sends a QCD token. 313 request --> SA, Ni, [KEi] 315 response <-- SA, Nr, [KEr], N(QCD_TOKEN) 317 If the initiator is also a token maker, it SHOULD soon initiate an 318 INFORMATIONAL exchange as follows: 320 request --> N(QCD_TOKEN) 322 response <-- 324 For session resumption, as specified in [resumption], the situation 325 is similar. The responder, which is necessarily the peer that has 326 crashed, SHOULD send a new ticket within the protected payload of the 327 IKE_SESSION_RESUME exchange. If the Initiator is also a token maker, 328 it needs to send a QCD_TOKEN in a separate INFORMATIONAL exchange. 330 The INFORMATIONAL exchange described in this section can also be used 331 if QCD tokens need to be replaced due to a key rollover. However, 332 since token takers are required to verify at least 4 QCD tokens, this 333 is only necessary if secret QCD keys are rolled over more than four 334 times as often as IKE SAs are rekeyed. 336 4.4. Replacing the Token for an Existing SA 338 With some token generation methods, such as that described in 339 Section 5.2, a QCD token may sometimes become invalid, although the 340 IKE SA is still perfectly valid. 342 In such a case, the token maker MUST send the new token in a 343 protected message under that IKE SA. That exchange could be a simple 344 INFORMATIONAL, such as in the last figure in the previous section, or 345 else it can be part of a MOBIKE INFORMATIONAL exchange such as in the 346 following figure taken from section 2.2 of [RFC4555] and modified by 347 adding a QCD_TOKEN notification: 349 (IP_I2:4500 -> IP_R1:4500) 350 HDR, SK { N(UPDATE_SA_ADDRESSES), 351 N(NAT_DETECTION_SOURCE_IP), 352 N(NAT_DETECTION_DESTINATION_IP) } --> 354 <-- (IP_R1:4500 -> IP_I2:4500) 355 HDR, SK { N(NAT_DETECTION_SOURCE_IP), 356 N(NAT_DETECTION_DESTINATION_IP) } 358 <-- (IP_R1:4500 -> IP_I2:4500) 359 HDR, SK { N(COOKIE2), [N(QCD_TOKEN)] } 361 (IP_I2:4500 -> IP_R1:4500) 362 HDR, SK { N(COOKIE2), [N(QCD_TOKEN)] } --> 364 A token taker MUST accept such gratuitous QCD_TOKEN notifications as 365 long as they are carried in protected exchanges. A token maker 366 SHOULD NOT generate them unless it is no longer able to generate the 367 old QCD_TOKEN. 369 4.5. Presenting the Token in an INFORMATIONAL Exchange 371 This QCD_TOKEN notification is unprotected, and is sent as a response 372 to a protected IKE request, which uses an IKE SA that is unknown. 374 request --> N(INVALID_IKE_SPI), N(QCD_TOKEN)+ 376 If child SPIs are persistently mapped to IKE SPIs as described in 377 Section 9.2, a token taker may get the following unprotected message 378 in response to an ESP or AH packet. 380 request --> N(INVALID_SPI), N(QCD_TOKEN)+ 382 The QCD_TOKEN and INVALID_IKE_SPI notifications are sent together to 383 support both implementations that conform to this specification and 384 implementations that don't. Similar to the description in section 385 2.21 of [RFC4306], The IKE SPI and message ID fields in the packet 386 headers are taken from the protected IKE request. 388 To support a periodic rollover of the secret used for token 389 generation, the token taker MUST support at least four QCD_TOKEN 390 notifications in a single packet. The token is considered verified 391 if any of the QCD_TOKEN notifications matches. The token maker MAY 392 generate up to four QCD_TOKEN notifications, based on several 393 generations of keys. 395 If the QCD_TOKEN verifies OK, an empty response MUST be sent. If the 396 QCD_TOKEN cannot be validated, a response MUST NOT be sent. 397 Section 5 defines token verification. 399 5. Token Generation and Verification 401 No token generation method is mandated by this document. Two method 402 are documented in the following sub-sections, but they only serve as 403 examples. 405 The following lists the requirements from a token generation 406 mechanism: 407 o Tokens MUST be at least 16 octets long, and no more than 128 408 octets long, to facilitate storage and transmission. Tokens 409 SHOULD be indistinguishable from random data. 410 o It should not be possible for an external attacker to guess the 411 QCD token generated by an implementation. Cryptographic 412 mechanisms such as PRNG and hash functions are RECOMMENDED. 413 o The token maker, MUST be able to re-generate or retrieve the token 414 based on the IKE SPIs even after it reboots. 416 5.1. A Stateless Method of Token Generation 418 This describes a stateless method of generating a token: 419 o At installation or immediately after the first boot of the token 420 maker, 32 random octets are generated using a secure random number 421 generator or a PRNG. 422 o Those 32 bytes, called the "QCD_SECRET", are stored in non- 423 volatile storage on the machine, and kept indefinitely. 424 o If key rollover is required by policy, the implementation MAY 425 periodically generate a new QCD_SECRET and keep up to 3 previous 426 generations. When sending an unprotected QCD_TOKEN, as many as 4 427 notification payloads may be sent, each from a different 428 QCD_SECRET. 430 o The TOKEN_SECRET_DATA is calculated as follows: 432 TOKEN_SECRET_DATA = HASH(QCD_SECRET | SPI-I | SPI-R) 434 5.2. A Stateless Method with IP addresses 436 This method is similar to the one in the previous section, except 437 that the IP address of the token taker is also added to the block 438 being hashed. This has the disadvantage that the token needs to be 439 replaced (as described in Section 4.4) whenever the token taker 440 changes its address. 442 The reason to use this method is described in Section 9.3. When 443 using this method, the TOKEN_SECRET_DATA field is calculated as 444 follows: 446 TOKEN_SECRET_DATA = HASH(QCD_SECRET | SPI-I | SPI-R | IPaddr-T) 448 The IPaddr-T field specifies the IP address of the token taker. 449 Secret rollover considerations are similar to those in the previous 450 section. 452 5.3. Token Lifetime 454 The token is associated with a single IKE SA, and SHOULD be deleted 455 by the token taker when the SA is deleted or expires. More formally, 456 the token is associated with the pair (SPI-I, SPI-R). 458 6. Backup Gateways 460 Making crash detection and recovery quick is a worthy goal, but since 461 rebooting a gateway takes a non-zero amount of time, many 462 implementations choose to have a stand-by gateway ready to take over 463 as soon as the primary gateway fails for any reason. 465 If such a configuration is available, it is RECOMMENDED that the 466 stand-by gateway be able to generate the same token as the active 467 gateway. if the method described in Section 5.1 is used, this means 468 that the QCD_SECRET field is identical in both gateways. This has 469 the effect of having the crash recovery available immediately. 471 Note that this refers to "high availability" configurations, where 472 only one gateway is active at any given moment. This is different 473 from "load sharing" configurations where more than one gateway is 474 active at the same time. This is also different from high 475 availability configurations where the SAs are synchronized. For load 476 sharing configurations, please see Section 10.2 for security 477 considerations. 479 7. Alternative Solutions 481 7.1. Initiating a new IKE SA 483 Instead of sending a QCD token, we could have the rebooted 484 implementation start an Initial exchange with the peer, including the 485 INITIAL_CONTACT notification. This would have the same effect, 486 instructing the peer to erase the old IKE SA, as well as establishing 487 a new IKE SA with fewer rounds. 489 The disadvantage here, is that in IKEv2 an authentication exchange 490 MUST have a piggy-backed Child SA set up. Since our use case is such 491 that the rebooted implementation does not have traffic flowing to the 492 peer, there are no good selectors for such a Child SA. 494 Additionally, when authentication is asymmetric, such as when EAP is 495 used, it is not possible for the rebooted implementation to initiate 496 IKE. 498 7.2. Birth Certificates 500 Birth Certificates is a method of crash detection that has never been 501 formally defined. Bill Sommerfeld suggested this idea in a mail to 502 the IPsec mailing list on August 7, 2000, in a thread discussing 503 methods of crash detection: 505 If we have the system sign a "birth certificate" when it 506 reboots (including a reboot time or boot sequence number), 507 we could include that with a "bad spi" ICMP error and in 508 the negotiation of the IKE SA. 510 We believe that this method would have some problems. First, it 511 requires Alice to store the certificate, so as to be able to compare 512 the public keys. That requires more storage than does a QCD token. 513 Additionally, the public-key operations needed to verify the self- 514 signed certificates are more expensive for Alice. 516 We believe that a symmetric-key operation such as proposed here is 517 more light-weight and simple than that implied by the Birth 518 Certificate idea. 520 7.3. Reducing Liveness Check Length 522 Some have suggested that the RFC 4306 procedure described in 523 Section 2 can be tweaked by requiring fewer retransmissions over a 524 shorter period of time for cases of liveness check started because of 525 an INVALID_SPI or INVALID_IKE_SPI notification. 527 We believe that the default retransmission policy should represent a 528 good balance between the need for a timely discovery of a dead peer, 529 and a low probability of false detection. We expect the policy to be 530 set to take the shortest time such that this probability achieves a 531 certain target. Therefore, reducing elapsed time and retransmission 532 count will create an unacceptably high probability of false 533 detection, and this can be triggered by a single INVALID_IKE_SPI 534 notification. 536 Additionally, even if the retransmission policy is reduced to, say, 537 one minute, it is still a very noticeable delay from a human 538 perspective, from the time that the gateway has come up until the 539 tunnels are active, or from the time the backup gateway has taken 540 over until the tunnels are active. 542 8. Interaction with Session Resumption 544 Session Resumption, specified in [resumption] proposes to make 545 setting up a new IKE SA consume less computing resources. This is 546 particularly useful in the case of a remote access gateway that has 547 many tunnels. A failure of such a gateway would require all these 548 many remote access clients to establish an IKE SA either with the 549 rebooted gateway or with a backup gateway. This tunnel re- 550 establishment should occur within a short period of time, creating a 551 burden on the remote access gateway. Session Resumption addresses 552 this problem by having the clients store an encrypted derivative of 553 the IKE SA for quick re-establishment. 555 What Session Resumption does not help, is the problem of detecting 556 that the peer gateway has failed. A failed gateway may go undetected 557 for as long as the lifetime of a child SA, because IPsec does not 558 have packet acknowledgement, and applications cannot signal the IPsec 559 layer that the tunnel "does not work". Before establishing a new IKE 560 SA using Session Resumption, a client should ascertain that the 561 gateway has indeed failed. This could be done using either a 562 liveness check (as in RFC 4306) or using the QCD tokens described in 563 this document. 565 A remote access client conforming to both specifications will store 566 QCD tokens, as well as the Session Resumption ticket, if provided by 567 the gateway. A remote access gateway conforming to both 568 specifications will generate a QCD token for the client. When the 569 gateway reboots, the client will discover this in either of two ways: 570 1. The client does regular liveness checks, or else the time for 571 some other IKE exchange has come. Since the gateway is still 572 down, the IKE exchange times out after several minutes. In this 573 case QCD does not help. 574 2. Either the primary gateway or a backup gateway (see Section 6) is 575 ready and sends a QCD token to the client. In that case the 576 client will quickly re-establish the IPsec tunnel, either with 577 the rebooted primary gateway or the backup gateway as described 578 in this document. 580 The full combined protocol looks like this: 582 Initiator Responder 583 ----------- ----------- 584 HDR, SAi1, KEi, Ni --> 586 <-- HDR, SAr1, KEr, Nr, [CERTREQ] 588 HDR, SK {IDi, [CERT,] 589 [CERTREQ,] [IDr,] 590 AUTH, N(QCD_TOKEN) 591 SAi2, TSi, TSr, 592 N(TICKET_REQUEST)} --> 593 <-- HDR, SK {IDr, [CERT,] AUTH, 594 N(QCD_TOKEN), SAr2, TSi, TSr, 595 N(TICKET_LT_OPAQUE) } 597 ---- Reboot ----- 599 HDR, {} --> 600 <-- HDR, N(QCD_TOKEN) 602 HDR, [N(COOKIE),] 603 Ni, N(TICKET_OPAQUE) 604 [,N+] --> 605 <-- HDR, Nr [,N+] 607 9. Operational Considerations 609 9.1. Who should implement this specification 611 Throughout this document, we have referred to reboot time 612 alternatingly as the time that the implementation crashes and the 613 time when it is ready to process IPsec packets and IKE exchanges. 614 Depending on the hardware and software platforms and the cause of the 615 reboot, rebooting may take anywhere from a few seconds to several 616 minutes. If the implementation is down for a long time, the benefit 617 of this protocol extension is reduced. For this reason critical 618 systems should implement backup gateways as described in Section 6. 620 Implementing the "token maker" side of QCD makes sense for IKE 621 implementation where protected connections originate from the peer, 622 such as inter-domain VPNs and remote access gateways. Implementing 623 the "token taker" side of QCD makes sense for IKE implementations 624 where protected connections originate, such as inter-domain VPNs and 625 remote access clients. 627 To clarify the requirements: 628 o A remote-access client MUST be a token taker and MAY be a token 629 maker. 630 o A remote-access gateway MAY be a token taker and MUST be a token 631 maker. 632 o An inter-domain VPN gateway MUST be both token maker and token 633 taker. 635 In order to limit the effects of DoS attacks, a token taker SHOULD 636 limit the rate of QCD_TOKENs verified from a particular source. 638 If excessive amounts of IKE requests protected with unknown IKE SPIs 639 arrive at a token maker, the IKE module SHOULD revert to the behavior 640 described in section 2.21 of [RFC4306] and either send an 641 INVALID_IKE_SPI notification, or ignore it entirely. 643 9.2. Response to unknown child SPI 645 After a reboot, it is more likely that an implementation receives 646 IPsec packets than IKE packets. In that case, the rebooted 647 implementation will send an INVALID_SPI notification, triggering a 648 liveness check. The token will only be sent in a response to the 649 liveness check, thus requiring an extra round-trip. 651 To avoid this, an implementation that has access to non-volatile 652 storage MAY store a mapping of child SPIs to owning IKE SPIs, or to 653 generated tokens. If such a mapping is available and persistent 654 across reboots, the rebooted implementation SHOULD respond to the 655 IPsec packet with an INVALID_SPI notification, along with the 656 appropriate QCD_Token notifications. A token taker SHOULD verify the 657 QCD token that arrives with an INVALID_SPI notification the same as 658 if it arrived with the IKE SPIs of the parent IKE SA. 660 However, a persistent storage module might not be updated in a timely 661 manner, and could be populated with tokens relating to IKE SPIs that 662 have already been rekeyed. A token taker MUST NOT take an invalid 663 QCD Token sent along with an INVALID_SPI notification as evidence 664 that the peer is either malfunctioning or attacking, but it SHOULD 665 limit the rate at which such notifications are processed. 667 9.3. Using Tokens that Depend on IP Addresses 669 This section describes the rationale for token generation methods 670 such as the one described in Section 5.2. Note that this section 671 merely provides a possible rationale, and does not specify or 672 recommend any kind of configuration. 674 Some configurations of security gateway use a load-sharing cluster of 675 hosts, all sharing the same IP addresses, where the SAs (IKE and 676 child) are not synchronized between the cluster members. In such a 677 configuration, a single member does not know about all the IKE SAs 678 that are active for the configuration. A load balancer (usually a 679 networking switch) sends IKE and IPsec packets to the several members 680 based on source IP address. 682 In such a configuration, an attacker can send a forged protected IKE 683 packet with the IKE SPIs of an existing IKE SA, but from a different 684 IP address. This packet will likely be processed by a different 685 cluster member from the one that owns the IKE SA. Since no IKE SA 686 state is stored on this member, it will send a QCD token to the 687 attacker. If the QCD token does not depend on IP address, this token 688 can immediately be used to tell the token taker to tear down the IKE 689 SA using an unprotected QCD_TOKEN notification. 691 To thwart this possible attack, such configurations should use a 692 method that considers the taker's IP address, such as the method 693 described in Section 5.2. 695 10. Security Considerations 697 10.1. QCD Token Generation and Handling 699 Tokens MUST be hard to guess. This is critical, because if an 700 attacker can guess the token associated with an IKE SA, she can tear 701 down the IKE SA and associated tunnels at will. When the token is 702 delivered in the IKE_AUTH exchange, it is encrypted. When it is sent 703 again in an unprotected notification, it is not, but that is the last 704 time this token is ever used. 706 An aggregation of some tokens generated by one maker together with 707 the related IKE SPIs MUST NOT give an attacker the ability to guess 708 other tokens. Specifically, if one taker does not properly secure 709 the QCD tokens and an attacker gains access to them, this attacker 710 MUST NOT be able to guess other tokens generated by the same maker. 711 This is the reason that the QCD_SECRET in Section 5.1 needs to be 712 sufficiently long. 714 The token taker MUST store the token in a secure manner. No attacker 715 should be able to gain access to a stored token. 717 The QCD_SECRET MUST be protected from access by other parties. 718 Anyone gaining access to this value will be able to delete all the 719 IKE SAs for this token maker. 721 The QCD token is sent by the rebooted peer in an unprotected message. 722 A message like that is subject to modification, deletion and replay 723 by an attacker. However, these attacks will not compromise the 724 security of either side. Modification is meaningless because a 725 modified token is simply an invalid token. Deletion will only cause 726 the protocol not to work, resulting in a delay in tunnel re- 727 establishment as described in Section 2. Replay is also meaningless, 728 because the IKE SA has been deleted after the first transmission. 730 10.2. QCD Token Transmission 732 A token maker MUST NOT send a QCD token in an unprotected message for 733 an existing IKE SA. This implies that a conforming QCD token maker 734 MUST be able to tell whether a particular pair of IKE SPIs represent 735 a valid IKE SA. 737 This requirement is obvious and easy in the case of a single gateway. 738 However, some implementations use a load balancer to divide the load 739 between several physical gateways. It MUST NOT be possible even in 740 such a configuration to trick one gateway into sending a QCD token 741 for an IKE SA which is valid on another gateway. 743 This document does not specify how a load sharing sharing 744 configuration of IPsec gateways would work, but in order to support 745 this specification, all members MUST be able to tell whether a 746 particular IKE SA is active anywhere in the cluster. One way to do 747 it is to synchronize a list of active IKE SPIs among all the cluster 748 members. 750 10.3. QCD Token Enumeration 752 An attacker may try to attack QCD if the generation algorithm 753 described in Section 5.1 is used. The attacker will send several 754 fake IKE requests to the gateway under attack, receiving and 755 recording the QCD Tokens in the responses. This will allow the 756 attacker to create a dictionary of IKE SPIs to QCD Tokens, which can 757 later be used to tear down any IKE SA. 759 Three factors mitigate this threat: 760 o The space of all possible IKE SPI pairs is huge: 2^128, so making 761 such a dictionary is impractical. Even if we assume that one 762 implementation is faulty and always generates predictable IKE 763 SPIs, the space is still at least 2^64 entries, so making the 764 dictionary is extremely hard. 765 o Throttling the amount of QCD_TOKEN notifications sent out, as 766 discussed in Section 9.1, especially when not soon after a crash 767 will limit the attacker's ability to construct a dictionary. 768 o The methods in Section 5.1 and Section 5.2 allow for a periodic 769 change of the QCD_SECRET. Any such change invalidates the entire 770 dictionary. 772 11. IANA Considerations 774 IANA is requested to assign a notify message type from the status 775 types range (16406-40959) of the "IKEv2 Notify Message Types" 776 registry with name "QUICK_CRASH_DETECTION". 778 12. Acknowledgements 780 We would like to thank Hannes Tschofenig and Yaron Sheffer for their 781 comments about Session Resumption. 783 13. Change Log 785 This section lists all changes in this document 787 NOTE TO RFC EDITOR : Please remove this section in the final RFC 789 13.1. Changes from draft-nir-ike-qcd-03 and -04 791 Mostly editorial changes and cleaning up. 793 13.2. Changes from draft-nir-ike-qcd-02 795 o Described QCD token enumeration, following a question by 796 Lakshminath Dondeti. 797 o Added the ability to replace the QCD token for an existing IKE SA. 798 o Added tokens dependant on peer IP address and their interaction 799 with MOBIKE. 801 13.3. Changes from draft-nir-ike-qcd-01 803 o Removed stateless method. 804 o Added discussion of rekeying and resumption. 805 o Added discussion of non-synchronized load-balanced clusters of 806 gateways in the security considerations. 807 o Other wording fixes. 809 13.4. Changes from draft-nir-ike-qcd-00 811 o Merged proposal with draft-detienne-ikev2-recovery [recovery] 812 o Changed the protocol so that the rebooted peer generates the 813 token. This has the effect, that the need for persistent storage 814 is eliminated. 815 o Added discussion of birth certificates. 817 13.5. Changes from draft-nir-qcr-00 819 o Changed name to reflect that this relates to IKE. Also changed 820 from quick crash recovery to quick crash detection to avoid 821 confusion with IFARE. 822 o Added more operational considerations. 823 o Added interaction with IFARE. 824 o Added discussion of backup gateways. 826 14. References 828 14.1. Normative References 830 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 831 Requirement Levels", BCP 14, RFC 2119, March 1997. 833 [RFC4306] Kaufman, C., "Internet Key Exchange (IKEv2) Protocol", 834 RFC 4306, December 2005. 836 [RFC4555] Eronen, P., "IKEv2 Mobility and Multihoming Protocol 837 (MOBIKE)", RFC 4555, June 2006. 839 [RFC4718] Eronen, P. and P. Hoffman, "IKEv2 Clarifications and 840 Implementation Guidelines", RFC 4718, October 2006. 842 14.2. Informative References 844 [recovery] 845 Detienne, F., Sethi, P., and Y. Nir, "Safe IKE Recovery", 846 draft-detienne-ikev2-recovery (work in progress), 847 August 2008. 849 [resumption] 850 Sheffer, Y. and H. Tschofenig, "IKEv2 Session Resumption", 851 draft-ietf-ipsecme-ikev2-resumption (work in progress), 852 June 2009. 854 Authors' Addresses 856 Yoav Nir 857 Check Point Software Technologies Ltd. 858 5 Hasolelim st. 859 Tel Aviv 67897 860 Israel 862 Email: ynir@checkpoint.com 864 Frederic Detienne 865 Cisco Systems, Inc. 866 De Kleetlaan, 7 867 Diegem B-1831 868 Belgium 870 Phone: +32 2 704 5681 871 Email: fd@cisco.com 873 Pratima Sethi 874 Cisco Systems, Inc. 875 O'Shaugnessy Road, 11 876 Bangalore, Karnataka 560027 877 India 879 Phone: +91 80 4154 1654 880 Email: psethi@cisco.com