idnits 2.17.1 draft-petithuguenin-avtcore-rfc5764-mux-fixes-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 abstract seems to contain references ([RFC5764]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. -- The draft header indicates that this document updates RFC5764, but the abstract doesn't seem to directly say this. It does mention RFC5764 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 == The document doesn't use any RFC 2119 keywords, yet has text resembling RFC 2119 boilerplate text. (Using the creation date from RFC5764, updated by this document, for RFC5378 checks: 2007-07-03) -- 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 (March 6, 2015) is 3338 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 5245 (Obsoleted by RFC 8445, RFC 8839) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 5389 (Obsoleted by RFC 8489) ** Obsolete normative reference: RFC 5766 (Obsoleted by RFC 8656) ** Obsolete normative reference: RFC 6347 (Obsoleted by RFC 9147) -- Obsolete informational reference (is this intentional?): RFC 6982 (Obsoleted by RFC 7942) == Outdated reference: A later version (-54) exists of draft-ietf-mmusic-sdp-bundle-negotiation-12 Summary: 6 errors (**), 0 flaws (~~), 3 warnings (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 AVTCORE M. Petit-Huguenin 3 Internet-Draft Impedance Mismatch 4 Updates: 5764 (if approved) G. Salgueiro 5 Intended status: Standards Track Cisco Systems 6 Expires: September 7, 2015 March 6, 2015 8 Multiplexing Scheme Updates for Secure Real-time Transport Protocol 9 (SRTP) Extension for Datagram Transport Layer Security (DTLS) 10 draft-petithuguenin-avtcore-rfc5764-mux-fixes-02 12 Abstract 14 This document defines how Datagram Transport Layer Security (DTLS), 15 Real-time Transport Protocol (RTP), Real-time Transport Control 16 Protocol (RTCP), Session Traversal Utilities for NAT (STUN), and 17 Traversal Using Relays around NAT (TURN) packets are multiplexed on a 18 single receiving socket. It overrides the guidance from SRTP 19 Extension for DTLS [RFC5764], which suffered from three issues 20 described and fixed in this document. 22 Status of This Memo 24 This Internet-Draft is submitted in full conformance with the 25 provisions of BCP 78 and BCP 79. 27 Internet-Drafts are working documents of the Internet Engineering 28 Task Force (IETF). Note that other groups may also distribute 29 working documents as Internet-Drafts. The list of current Internet- 30 Drafts is at http://datatracker.ietf.org/drafts/current/. 32 Internet-Drafts are draft documents valid for a maximum of six months 33 and may be updated, replaced, or obsoleted by other documents at any 34 time. It is inappropriate to use Internet-Drafts as reference 35 material or to cite them other than as "work in progress." 37 This Internet-Draft will expire on September 7, 2015. 39 Copyright Notice 41 Copyright (c) 2015 IETF Trust and the persons identified as the 42 document authors. All rights reserved. 44 This document is subject to BCP 78 and the IETF Trust's Legal 45 Provisions Relating to IETF Documents 46 (http://trustee.ietf.org/license-info) in effect on the date of 47 publication of this document. Please review these documents 48 carefully, as they describe your rights and restrictions with respect 49 to this document. Code Components extracted from this document must 50 include Simplified BSD License text as described in Section 4.e of 51 the Trust Legal Provisions and are provided without warranty as 52 described in the Simplified BSD License. 54 Table of Contents 56 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 57 1.1. Implicit Allocation of Codepoints for New STUN Methods . 3 58 1.2. Implicit Allocation of New Codepoints for TLS 59 ContentTypes . . . . . . . . . . . . . . . . . . . . . . 4 60 1.3. Multiplexing of TURN Channels . . . . . . . . . . . . . . 4 61 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 62 3. RFC 5764 Updates . . . . . . . . . . . . . . . . . . . . . . 6 63 4. Implementation Status . . . . . . . . . . . . . . . . . . . . 7 64 5. Security Considerations . . . . . . . . . . . . . . . . . . . 8 65 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 66 6.1. STUN Methods . . . . . . . . . . . . . . . . . . . . . . 8 67 6.2. TLS ContentType . . . . . . . . . . . . . . . . . . . . . 8 68 6.3. TURN Channel Numbers . . . . . . . . . . . . . . . . . . 9 69 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 9 70 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 71 8.1. Normative References . . . . . . . . . . . . . . . . . . 9 72 8.2. Informative References . . . . . . . . . . . . . . . . . 10 73 Appendix A. Release notes . . . . . . . . . . . . . . . . . . . 10 74 A.1. Modifications between draft-petithuguenin-avtcore-rfc5764 75 -mux-fixes-00 and draft-petithuguenin-avtcore-rfc5764 76 -mux-fixes-01 . . . . . . . . . . . . . . . . . . . . . . 10 77 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 79 1. Introduction 81 Section 5.1.2 of Secure Real-time Transport Protocol (SRTP) Extension 82 for DTLS [RFC5764] defines a scheme for a Real-time Transport 83 Protocol (RTP) [RFC3550] receiver to demultiplex Datagram Transport 84 Layer Security (DTLS) [RFC6347], Session Traversal Utilities for NAT 85 (STUN) [RFC5389] and Secure Real-time Transport Protocol 86 (SRTP)/Secure Real-time Transport Control Protocol (SRTCP) [RFC3711] 87 packets that are arriving on the RTP port. Unfortunately, this 88 demultiplexing scheme has created three problematic issues: 90 1. It implicitly allocated codepoints for new STUN methods without 91 an IANA registry reflecting these new allocations. 93 2. It implicitly allocated codepoints for new Transport Layer 94 Security (TLS) ContentTypes without an IANA registry reflecting 95 these new allocations. 97 3. It did not take into account the fact that the Traversal Using 98 Relays around NAT (TURN) usage of STUN can create TURN channels 99 that also need to be demultiplexed with the other packet types 100 explicitly mentioned in Section 5.1.2 of RFC 5764. 102 These flaws in the demultiplexing scheme were unavoidably inherited 103 by other documents, such as [RFC7345] and 104 [I-D.ietf-mmusic-sdp-bundle-negotiation]. These will need to be 105 corrected with the updates this document provides when it become 106 normative. 108 1.1. Implicit Allocation of Codepoints for New STUN Methods 110 The demultiplexing scheme in [RFC5764] states that the receiver can 111 identify the packet type by looking at the first byte. If the value 112 of this first byte is 0 or 1, the packet is identified to be STUN. 113 The problem that arises as a result of this implicit allocation is 114 that this restricts the codepoints for STUN methods (as described in 115 Section 18.1 of [RFC5389]) to values between 0x000 and 0x07F, which 116 in turn reduces the number of possible STUN method codepoints 117 assigned by IETF Review (i.e., the range from (0x000 - 0x7FF) from 118 2048 to only 128 and entirely obliterating those STUN method 119 codepoints assigned by Designated Expert (i.e., the range 0x800 - 120 0xFFF). In fact, RFC 5764 implicitly (and needlessly) allocated a 121 very large range of STUN methods, but at a minimum the IANA STUN 122 Methods registry should properly reflect this. 124 There are only a few STUN method codepoints currently allocated. For 125 this reason, simply marking the implicit allocations made by RFC 5764 126 in the STUN Method registry may create a shortage of codepoints at a 127 time when interest in STUN and STUN Usages (especially TURN) is 128 growing rapidly. Consequently, this document also changes the RFC 129 5764 packet identification algorithm to expand the range assigned to 130 the STUN protocol from 0 - 1 to 0 - 19, as the values 2-19 are 131 unused. 133 In addition to explicitly allocating STUN methods codepoints from 134 0x500 to 0xFFF as Reserved values, this document also updates the 135 IANA registry such that the STUN method codepoints assigned via IETF 136 Review are in the 0x000-0x27F range and those assigned via Designated 137 Expert are in the 0x280-0x4FF range. The proposed changes to the 138 STUN Method Registry is: 140 OLD: 142 0x000-0x7FF IETF Review 143 0x800-0xFFF Designated Expert 144 NEW: 146 0x000-0x27F IETF Review 147 0x280-0x4FF Designated Expert 148 0x500-0xFFF Reserved 150 1.2. Implicit Allocation of New Codepoints for TLS ContentTypes 152 The demultiplexing scheme in [RFC5764] dictates that if the value of 153 the first byte is between 20 and 63 (inclusive), then the packet is 154 identified to be DTLS. The problem that arises is that this 155 restricts the TLS ContentType codepoints (as defined in Section 12 of 156 [RFC5246]) to this range, and by extension implicitly allocates 157 ContentType codepoints 0 to 19 and 64 to 255. Unlike STUN, TLS is a 158 mature protocol that is already well established and widely 159 implemented and thus we expect only relatively few new codepoints to 160 be assigned in the future. With respect to TLS packet 161 identification, this document simply explicitly reserves the 162 codepoints from 0 to 19 and from 64 to 255 so they are not 163 inadvertently assigned in the future. 165 1.3. Multiplexing of TURN Channels 167 When used with ICE [RFC5245], an RFC 5764 implementation can receive 168 packets on the same socket from three different paths, as shown in 169 Figure 1: 171 1. Directly from the source 173 2. Through a NAT 175 3. Relayed by a TURN server 176 +------+ 177 | TURN |<------------------------+ 178 +------+ | 179 | | 180 | +-------------------------+ | 181 | | | | 182 v v | | 183 NAT ----------- | | 184 | | +---------------------+ | | 185 | | | | | | 186 v v v | | | 187 +----------+ +----------+ 188 | RFC 5764 | | RFC 5764 | 189 +----------+ +----------+ 191 Figure 1: Packet Reception by an RFC 5764 Implementation 193 Even if the ICE algorithm succeeded in selecting a non-relayed path, 194 it is still possible to receive data from the TURN server. For 195 instance, when ICE is used with aggressive nomination the media path 196 can quickly change until it stabilizes. Also, freeing ICE candidates 197 is optional, so the TURN server can restart forwarding STUN 198 connectivity checks during an ICE restart. 200 TURN channels are an optimization where data packets are exchanged 201 with a 4-byte prefix, instead of the standard 36-byte STUN overhead 202 (see Section 2.5 of [RFC5766]). The problem is that the RFC 5764 203 demultiplexing scheme does not define what to do with packets 204 received over a TURN channel since these packets will start with a 205 first byte whose value will be between 64 and 127 (inclusive). If 206 the TURN server was instructed to send data over a TURN channel, then 207 the current RFC 5764 demultiplexing scheme will reject these packets. 208 Current implementations violate RFC 5764 for values 64 to 127 209 (inclusive) and they instead parse packets with such values as TURN. 210 In order to prevent future documents from assigning values from the 211 unused range to a new protocol, this document modifies the RFC 5764 212 demultiplexing algorithm to properly account for TURN channels. 214 2. Terminology 216 The key words "MUST", "MUST NOT", "REQUIRED", "MAY", and "OPTIONAL" 217 in this document are to be interpreted as described in [RFC2119] when 218 they appear in ALL CAPS. When these words are not in ALL CAPS (such 219 as "must" or "Must"), they have their usual English meanings, and are 220 not to be interpreted as RFC 2119 key words. 222 3. RFC 5764 Updates 224 This document updates the text in Section 5.1.2 of [RFC5764] as 225 follows: 227 OLD TEXT 229 The process for demultiplexing a packet is as follows. The receiver 230 looks at the first byte of the packet. If the value of this byte is 231 0 or 1, then the packet is STUN. If the value is in between 128 and 232 191 (inclusive), then the packet is RTP (or RTCP, if both RTCP and 233 RTP are being multiplexed over the same destination port). If the 234 value is between 20 and 63 (inclusive), the packet is DTLS. This 235 process is summarized in Figure 3. 237 +----------------+ 238 | 127 < B < 192 -+--> forward to RTP 239 | | 240 packet --> | 19 < B < 64 -+--> forward to DTLS 241 | | 242 | B < 2 -+--> forward to STUN 243 +----------------+ 245 Figure 3: The DTLS-SRTP receiver's packet demultiplexing algorithm. 246 Here the field B denotes the leading byte of the packet. 248 END OLD TEXT 250 NEW TEXT 252 The process for demultiplexing a packet is as follows. The receiver 253 looks at the first byte of the packet. If the value of this byte is 254 in between 0 and 19 (inclusive), then the packet is STUN. If the 255 value is in between 128 and 191 (inclusive), then the packet is RTP 256 (or RTCP, if both RTCP and RTP are being multiplexed over the same 257 destination port). If the value is between 20 and 63 (inclusive), 258 the packet is DTLS. If the value is between 64 and 127 (inclusive), 259 the packet is TURN Channel. This process is summarized in Figure 3. 261 +----------------+ 262 | 127 < B < 192 -+--> forward to RTP 263 | | 264 | 63 < B < 128 -+--> forward to TURN Channel 265 packet --> | | 266 | 19 < B < 64 -+--> forward to DTLS 267 | | 268 | B < 20 -+--> forward to STUN 269 +----------------+ 271 Figure 3: The DTLS-SRTP receiver's packet demultiplexing algorithm. 272 Here the field B denotes the leading byte of the packet. 274 END NEW TEXT 276 [[Note: we may want to use "<=" instead of "<" to make it easier on 277 implementers.]] 279 4. Implementation Status 281 [[Note to RFC Editor: Please remove this section and the reference to 282 [RFC6982] before publication.]] 284 This section records the status of known implementations of the 285 protocol defined by this specification at the time of posting of this 286 Internet-Draft, and is based on a proposal described in [RFC6982]. 287 The description of implementations in this section is intended to 288 assist the IETF in its decision processes in progressing drafts to 289 RFCs. Please note that the listing of any individual implementation 290 here does not imply endorsement by the IETF. Furthermore, no effort 291 has been spent to verify the information presented here that was 292 supplied by IETF contributors. This is not intended as, and must not 293 be construed to be, a catalog of available implementations or their 294 features. Readers are advised to note that other implementations may 295 exist. 297 According to [RFC6982], "this will allow reviewers and working groups 298 to assign due consideration to documents that have the benefit of 299 running code, which may serve as evidence of valuable experimentation 300 and feedback that have made the implemented protocols more mature. 301 It is up to the individual working groups to use this information as 302 they see fit". 304 Note that there is currently no implementation declared in this 305 section, but the intent is to add RFC 6982 templates here from 306 implementers that support the modifications in this document. 308 5. Security Considerations 310 This document simply updates existing IANA registries and does not 311 introduce any specific security considerations beyond those detailed 312 in [RFC5764]. 314 6. IANA Considerations 316 6.1. STUN Methods 318 This specification contains the registration information for 2816 319 STUN Methods codepoints, as explained in Section 1.1 and in 320 accordance with the procedures defined in Section 18.1 of [RFC5389]. 322 Value: 0x500-0xFFF 324 Name: Reserved 326 Reference: RFC5764, RFCXXXX 328 This specification also reassigns the ranges in the STUN Methods 329 Registry as follow: 331 Range: 0x000-0x27F 333 Registration Procedures: IETF Review 335 Range: 0x280-0x4FF 337 Registration Procedures: Designated Expert 339 6.2. TLS ContentType 341 This specification contains the registration information for 212 TLS 342 ContentType codepoints, as explained in Section 1.2 and in accordance 343 with the procedures defined in Section 12 of [RFC5246]. 345 Value: 0-19 347 Description: Reserved 349 DTLS-OK: N/A 351 Reference: RFC5764, RFCXXXX 353 Value: 64-255 355 Description: Reserved 356 DTLS-OK: N/A 358 Reference: RFC5764, RFCXXXX 360 6.3. TURN Channel Numbers 362 This specification contains the registration information for 32768 363 TURN Channel Numbers codepoints, as explained in Section 1.3 and in 364 accordance with the procedures defined in Section 18 of [RFC5766]. 366 Value: 0x8000-0xFFFF 368 Name: Reserved 370 Reference: RFCXXXX 372 [RFC EDITOR NOTE: Please replace RFCXXXX with the RFC number of this 373 document.] 375 7. Acknowledgements 377 The implicit STUN Method codepoint allocations problem was first 378 reported by Martin Thomson in the RTCWEB mailing-list and discussed 379 further with Magnus Westerlund. 381 Thanks to Simon Perreault, Colton Shields and Cullen Jennings for the 382 comments, suggestions, and questions that helped improve this 383 document. 385 8. References 387 8.1. Normative References 389 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 390 Requirement Levels", BCP 14, RFC 2119, March 1997. 392 [RFC3550] Schulzrinne, H., Casner, S., Frederick, R., and V. 393 Jacobson, "RTP: A Transport Protocol for Real-Time 394 Applications", STD 64, RFC 3550, July 2003. 396 [RFC3711] Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K. 397 Norrman, "The Secure Real-time Transport Protocol (SRTP)", 398 RFC 3711, March 2004. 400 [RFC5245] Rosenberg, J., "Interactive Connectivity Establishment 401 (ICE): A Protocol for Network Address Translator (NAT) 402 Traversal for Offer/Answer Protocols", RFC 5245, April 403 2010. 405 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 406 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 408 [RFC5389] Rosenberg, J., Mahy, R., Matthews, P., and D. Wing, 409 "Session Traversal Utilities for NAT (STUN)", RFC 5389, 410 October 2008. 412 [RFC5764] McGrew, D. and E. Rescorla, "Datagram Transport Layer 413 Security (DTLS) Extension to Establish Keys for the Secure 414 Real-time Transport Protocol (SRTP)", RFC 5764, May 2010. 416 [RFC5766] Mahy, R., Matthews, P., and J. Rosenberg, "Traversal Using 417 Relays around NAT (TURN): Relay Extensions to Session 418 Traversal Utilities for NAT (STUN)", RFC 5766, April 2010. 420 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 421 Security Version 1.2", RFC 6347, January 2012. 423 8.2. Informative References 425 [RFC6982] Sheffer, Y. and A. Farrel, "Improving Awareness of Running 426 Code: The Implementation Status Section", RFC 6982, July 427 2013. 429 [RFC7345] Holmberg, C., Sedlacek, I., and G. Salgueiro, "UDP 430 Transport Layer (UDPTL) over Datagram Transport Layer 431 Security (DTLS)", RFC 7345, August 2014. 433 [I-D.ietf-mmusic-sdp-bundle-negotiation] 434 Holmberg, C., Alvestrand, H., and C. Jennings, 435 "Negotiating Media Multiplexing Using the Session 436 Description Protocol (SDP)", draft-ietf-mmusic-sdp-bundle- 437 negotiation-12 (work in progress), October 2014. 439 Appendix A. Release notes 441 This section must be removed before publication as an RFC. 443 A.1. Modifications between draft-petithuguenin-avtcore-rfc5764-mux- 444 fixes-00 and draft-petithuguenin-avtcore-rfc5764-mux-fixes-01 446 o Change affiliation. 448 Authors' Addresses 449 Marc Petit-Huguenin 450 Impedance Mismatch 452 Email: marc@petit-huguenin.org 454 Gonzalo Salgueiro 455 Cisco Systems 456 7200-12 Kit Creek Road 457 Research Triangle Park, NC 27709 458 US 460 Email: gsalguei@cisco.com