idnits 2.17.1 draft-ietf-tls-dtls-rrc-02.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 document seems to lack a Security Considerations section. -- The draft header indicates that this document updates RFC6347, but the abstract doesn't seem to mention this, which it should. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 234 has weird spacing: '... + rrc v...' (Using the creation date from RFC6347, updated by this document, for RFC5378 checks: 2008-06-09) -- The document seems to contain a disclaimer for pre-RFC5378 work, and may have content which was first submitted before 10 November 2008. The disclaimer is necessary when there are original authors that you have been unable to contact, or if some do not wish to grant the BCP78 rights to the IETF Trust. If you are able to get all authors (current and original) to grant those rights, you can and should remove the disclaimer; otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (26 November 2021) is 880 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. 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: 1 error (**), 0 flaws (~~), 2 warnings (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 TLS H. Tschofenig, Ed. 3 Internet-Draft T. Fossati 4 Updates: 6347 (if approved) Arm Limited 5 Intended status: Standards Track 26 November 2021 6 Expires: 30 May 2022 8 Return Routability Check for DTLS 1.2 and DTLS 1.3 9 draft-ietf-tls-dtls-rrc-02 11 Abstract 13 This document specifies a return routability check for use in context 14 of the Connection ID (CID) construct for the Datagram Transport Layer 15 Security (DTLS) protocol versions 1.2 and 1.3. 17 Discussion Venues 19 This note is to be removed before publishing as an RFC. 21 Discussion of this document takes place on the Transport Layer 22 Security Working Group mailing list (tls@ietf.org), which is archived 23 at https://mailarchive.ietf.org/arch/browse/tls/. 25 Source for this draft and an issue tracker can be found at 26 https://github.com/tlswg/dtls-rrc. 28 Status of This Memo 30 This Internet-Draft is submitted in full conformance with the 31 provisions of BCP 78 and BCP 79. 33 Internet-Drafts are working documents of the Internet Engineering 34 Task Force (IETF). Note that other groups may also distribute 35 working documents as Internet-Drafts. The list of current Internet- 36 Drafts is at https://datatracker.ietf.org/drafts/current/. 38 Internet-Drafts are draft documents valid for a maximum of six months 39 and may be updated, replaced, or obsoleted by other documents at any 40 time. It is inappropriate to use Internet-Drafts as reference 41 material or to cite them other than as "work in progress." 43 This Internet-Draft will expire on 30 May 2022. 45 Copyright Notice 47 Copyright (c) 2021 IETF Trust and the persons identified as the 48 document authors. All rights reserved. 50 This document is subject to BCP 78 and the IETF Trust's Legal 51 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 52 license-info) in effect on the date of publication of this document. 53 Please review these documents carefully, as they describe your rights 54 and restrictions with respect to this document. Code Components 55 extracted from this document must include Revised BSD License text as 56 described in Section 4.e of the Trust Legal Provisions and are 57 provided without warranty as described in the Revised BSD License. 59 This document may contain material from IETF Documents or IETF 60 Contributions published or made publicly available before November 61 10, 2008. The person(s) controlling the copyright in some of this 62 material may not have granted the IETF Trust the right to allow 63 modifications of such material outside the IETF Standards Process. 64 Without obtaining an adequate license from the person(s) controlling 65 the copyright in such materials, this document may not be modified 66 outside the IETF Standards Process, and derivative works of it may 67 not be created outside the IETF Standards Process, except to format 68 it for publication as an RFC or to translate it into languages other 69 than English. 71 Table of Contents 73 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 74 2. Conventions and Terminology . . . . . . . . . . . . . . . . . 3 75 3. RRC Extension . . . . . . . . . . . . . . . . . . . . . . . . 3 76 4. The Return Routability Check Message . . . . . . . . . . . . 4 77 5. Example . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 78 6. Security and Privacy Considerations . . . . . . . . . . . . . 8 79 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 80 8. Open Issues . . . . . . . . . . . . . . . . . . . . . . . . . 8 81 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 8 82 10. Normative References . . . . . . . . . . . . . . . . . . . . 8 83 Appendix A. History . . . . . . . . . . . . . . . . . . . . . . 9 84 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 86 1. Introduction 88 In "classical" DTLS, selecting a security context of an incoming DTLS 89 record is accomplished with the help of the 5-tuple, i.e. source IP 90 address, source port, transport protocol, destination IP address, and 91 destination port. Changes to this 5 tuple can happen for a variety 92 reasons over the lifetime of the DTLS session. In the IoT context, 93 NAT rebinding is common with sleepy devices. Other examples include 94 end host mobility and multi-homing. Without CID, if the source IP 95 address and/or source port changes during the lifetime of an ongoing 96 DTLS session then the receiver will be unable to locate the correct 97 security context. As a result, the DTLS handshake has to be re-run. 99 Of course, it is not necessary to re-run the full handshake if 100 session resumption is supported and negotiated. 102 A CID is an identifier carried in the record layer header of a DTLS 103 datagram that gives the receiver additional information for selecting 104 the appropriate security context. The CID mechanism has been 105 specified in [I-D.ietf-tls-dtls-connection-id] for DTLS 1.2 and in 106 [I-D.ietf-tls-dtls13] for DTLS 1.3. 108 Section 6 of [I-D.ietf-tls-dtls-connection-id] describes how the use 109 of CID increases the attack surface by providing both on-path and 110 off-path attackers an opportunity for (D)DoS. It then goes on 111 describing the steps a DTLS principal must take when a record with a 112 CID is received that has a source address (and/or port) different 113 from the one currently associated with the DTLS connection. However, 114 the actual mechanism for ensuring that the new peer address is 115 willing to receive and process DTLS records is left open. This 116 document standardizes a return routability check (RRC) as part of the 117 DTLS protocol itself. 119 The return routability check is performed by the receiving peer 120 before the CID-to-IP address/port binding is updated in that peer's 121 session state database. This is done in order to provide more 122 confidence to the receiving peer that the sending peer is reachable 123 at the indicated address and port. 125 2. Conventions and Terminology 127 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 128 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 129 "OPTIONAL" in this document are to be interpreted as described in 130 BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all 131 capitals, as shown here. 133 This document assumes familiarity with the CID format and protocol 134 defined for DTLS 1.2 [I-D.ietf-tls-dtls-connection-id] and for DTLS 135 1.3 [I-D.ietf-tls-dtls13]. The presentation language used in this 136 document is described in Section 4 of [RFC8446]. 138 3. RRC Extension 140 The use of RRC is negotiated via the rrc DTLS-only extension. On 141 connecting, the client includes the rrc extension in its ClientHello 142 if it wishes to use RRC. If the server is capable of meeting this 143 requirement, it responds with a rrc extension in its ServerHello. 144 The extension_type value for this extension is TBD1 and the 145 extension_data field of this extension is empty. The client and 146 server MUST NOT use RRC unless both sides have successfully exchanged 147 rrc extensions. 149 Note that the RRC extension applies to both DTLS 1.2 and DTLS 1.3. 151 4. The Return Routability Check Message 153 When a record with CID is received that has the source address of the 154 enclosing UDP datagram different from the one previously associated 155 with that CID, the receiver MUST NOT update its view of the peer's IP 156 address and port number with the source specified in the UDP datagram 157 before cryptographically validating the enclosed record(s) but 158 instead perform a return routability check. 160 enum { 161 invalid(0), 162 change_cipher_spec(20), 163 alert(21), 164 handshake(22), 165 application_data(23), 166 heartbeat(24), /* RFC 6520 */ 167 return_routability_check(TBD2), /* NEW */ 168 (255) 169 } ContentType; 171 uint64 Cookie; 173 enum { 174 path_challenge(0), 175 path_response(1), 176 reserved(2..255) 177 } rrc_msg_type; 179 struct { 180 rrc_msg_type msg_type; 181 select (return_routability_check.msg_type) { 182 case path_challenge: Cookie; 183 case path_response: Cookie; 184 }; 185 } return_routability_check; 187 The newly introduced return_routability_check message contains a 188 cookie. The cookie is a 8-byte field containing arbitrary data. 190 The return_routability_check message MUST be authenticated and 191 encrypted using the currently active security context. 193 The receiver that observes the peer's address and or port update MUST 194 stop sending any buffered application data (or limit the data sent to 195 a TBD threshold) and initiate the return routability check that 196 proceeds as follows: 198 1. A cookie is placed in a return_routability_check message of type 199 path_challenge; 201 2. The message is sent to the observed new address and a timeout T 202 is started; 204 3. The peer endpoint, after successfully verifying the received 205 return_routability_check message echoes the cookie value in a 206 return_routability_check message of type path_response; 208 4. When the initiator receives and verifies the 209 return_routability_check message contains the sent cookie, it 210 updates the peer address binding; 212 5. If T expires, or the address confirmation fails, the peer address 213 binding is not updated. 215 After this point, any pending send operation is resumed to the bound 216 peer address. 218 5. Example 220 The example TLS 1.3 handshake shown in Figure 1 shows a client and a 221 server negotiating the support for CID and for the RRC extension. 223 Client Server 225 Key ^ ClientHello 226 Exch | + key_share 227 | + signature_algorithms 228 | + rrc 229 v + connection_id=empty 230 --------> 231 ServerHello ^ Key 232 + key_share | Exch 233 + connection_id=100 | 234 + rrc v 235 {EncryptedExtensions} ^ Server 236 {CertificateRequest} v Params 237 {Certificate} ^ 238 {CertificateVerify} | Auth 239 <-------- {Finished} v 241 ^ {Certificate} 242 Auth | {CertificateVerify} 243 v {Finished} --------> 244 [Application Data] <-------> [Application Data] 246 + Indicates noteworthy extensions sent in the 247 previously noted message. 249 * Indicates optional or situation-dependent 250 messages/extensions that are not always sent. 252 {} Indicates messages protected using keys 253 derived from a [sender]_handshake_traffic_secret. 255 [] Indicates messages protected using keys 256 derived from [sender]_application_traffic_secret_N. 258 Figure 1: Message Flow for Full TLS Handshake 260 Once a connection has been established the client and the server 261 exchange application payloads protected by DTLS with an unilaterally 262 used CIDs. In our case, the client is requested to use CID 100 for 263 records sent to the server. 265 At some point in the communication interaction the IP address used by 266 the client changes and, thanks to the CID usage, the security context 267 to interpret the record is successfully located by the server. 268 However, the server wants to test the reachability of the client at 269 his new IP address. 271 Client Server 272 ------ ------ 274 Application Data ========> 275 276 Src-IP=A 277 Dst-IP=Z 278 <======== Application Data 279 Src-IP=Z 280 Dst-IP=A 282 <<------------->> 283 << Some >> 284 << Time >> 285 << Later >> 286 <<------------->> 288 Application Data ========> 289 290 Src-IP=B 291 Dst-IP=Z 293 <<< Unverified IP 294 Address B >> 296 <-------- Return Routability Check 297 path_challenge(cookie) 298 Src-IP=Z 299 Dst-IP=B 301 Return Routability Check --------> 302 path_response(cookie) 303 Src-IP=B 304 Dst-IP=Z 306 <<< IP Address B 307 Verified >> 309 <======== Application Data 310 Src-IP=Z 311 Dst-IP=B 313 Figure 2: Return Routability Example 315 6. Security and Privacy Considerations 317 Note that the return routability checks do not protect against 318 flooding of third-parties if the attacker is on-path, as the attacker 319 can redirect the return routability checks to the real peer (even if 320 those datagrams are cryptographically authenticated). On-path 321 adversaries can, in general, pose a harm to connectivity. 323 7. IANA Considerations 325 IANA is requested to allocate an entry to the TLS ContentType 326 registry, for the return_routability_check(TBD2) defined in this 327 document. The return_routability_check content type is only 328 applicable to DTLS 1.2 and 1.3. 330 IANA is requested to allocate the extension code point (TBD1) for the 331 rrc extension to the TLS ExtensionType Values registry as described 332 in Table 1. 334 +=======+===========+=====+===========+=============+===========+ 335 | Value | Extension | TLS | DTLS-Only | Recommended | Reference | 336 | | Name | 1.3 | | | | 337 +=======+===========+=====+===========+=============+===========+ 338 | TBD1 | rrc | CH, | Y | N | RFC-THIS | 339 | | | SH | | | | 340 +-------+-----------+-----+-----------+-------------+-----------+ 342 Table 1: rrc entry in the TLS ExtensionType Values registry 344 8. Open Issues 346 Issues against this document are tracked at https://github.com/tlswg/ 347 dtls-rrc/issues 349 9. Acknowledgments 351 We would like to thank Achim Kraus, Hanno Becker, Hanno Boeck, Manuel 352 Pegourie-Gonnard, Mohit Sahni and Rich Salz for their input to this 353 document. 355 10. Normative References 357 [I-D.ietf-tls-dtls-connection-id] 358 Rescorla, E., Tschofenig, H., Fossati, T., and A. Kraus, 359 "Connection Identifiers for DTLS 1.2", Work in Progress, 360 Internet-Draft, draft-ietf-tls-dtls-connection-id-13, 22 361 June 2021, . 364 [I-D.ietf-tls-dtls13] 365 Rescorla, E., Tschofenig, H., and N. Modadugu, "The 366 Datagram Transport Layer Security (DTLS) Protocol Version 367 1.3", Work in Progress, Internet-Draft, draft-ietf-tls- 368 dtls13-43, 30 April 2021, 369 . 372 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 373 Requirement Levels", BCP 14, RFC 2119, 374 DOI 10.17487/RFC2119, March 1997, 375 . 377 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 378 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 379 May 2017, . 381 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 382 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 383 . 385 Appendix A. History 387 // RFC EDITOR: PLEASE REMOVE THIS SECTION 389 draft-ietf-tls-dtls-rrc-02 391 * Undo the TLS flags extension for negotiating RRC, use a new 392 extension type 394 draft-ietf-tls-dtls-rrc-01 396 * Use the TLS flags extension for negotiating RRC 398 * Enhanced IANA consideration section 400 * Expanded example section 402 * Revamp message layout: 404 - Use 8-byte fixed size cookies 406 - Explicitly separate path challenge from response 408 draft-ietf-tls-dtls-rrc-00 410 * Draft name changed after WG adoption 411 * Removed text that overlapped with draft-ietf-tls-dtls-connection- 412 id 414 draft-tschofenig-tls-dtls-rrc-00 416 * Initial version 418 Authors' Addresses 420 Hannes Tschofenig (editor) 421 Arm Limited 423 Email: hannes.tschofenig@arm.com 425 Thomas Fossati 426 Arm Limited 428 Email: thomas.fossati@arm.com