idnits 2.17.1 draft-petithuguenin-avtcore-rfc5764-mux-fixes-00.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 (July 2, 2014) is 3557 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-07 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 Jive Communications 4 Updates: 5764 (if approved) G. Salgueiro 5 Intended status: Standards Track Cisco Systems 6 Expires: January 3, 2015 July 2, 2014 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-00 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 January 3, 2015. 39 Copyright Notice 41 Copyright (c) 2014 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 . . . . . . . . . . . . . . . . . . . . . . 5 63 4. Implementation Status . . . . . . . . . . . . . . . . . . . . 6 64 5. Security Considerations . . . . . . . . . . . . . . . . . . . 7 65 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 66 6.1. STUN Methods . . . . . . . . . . . . . . . . . . . . . . 7 67 6.2. TLS ContentType . . . . . . . . . . . . . . . . . . . . . 8 68 6.3. TURN Channel Numbers . . . . . . . . . . . . . . . . . . 8 69 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8 70 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 71 8.1. Normative References . . . . . . . . . . . . . . . . . . 9 72 8.2. Informative References . . . . . . . . . . . . . . . . . 9 73 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 75 1. Introduction 77 Section 5.1.2 of Secure Real-time Transport Protocol (SRTP) Extension 78 for DTLS [RFC5764] defines a scheme for a Real-time Transport 79 Protocol (RTP) [RFC3550] receiver to demultiplex Datagram Transport 80 Layer Security (DTLS) [RFC6347], Session Traversal Utilities for NAT 81 (STUN) [RFC5389] and Secure Real-time Transport Protocol 82 (SRTP)/Secure Real-time Transport Control Protocol (SRTCP) [RFC3711] 83 packets that are arriving on the RTP port. Unfortunately, this 84 demultiplexing scheme has created three problematic issues: 86 1. It implicitly allocated codepoints for new STUN methods without 87 an IANA registry reflecting these new allocations. 89 2. It implicitly allocated codepoints for new Transport Layer 90 Security (TLS) ContentTypes without an IANA registry reflecting 91 these new allocations. 93 3. It did not take into account the fact that the Traversal Using 94 Relays around NAT (TURN) usage of STUN can create TURN channels 95 that also need to be demultiplexed with the other packet types 96 explicitly mentioned in Section 5.1.2 of RFC 5764. 98 These flaws in the demultiplexing scheme were unavoidably inherited 99 by other documents, such as [I-D.ietf-mmusic-udptl-dtls] and 100 [I-D.ietf-mmusic-sdp-bundle-negotiation]. These will need to be 101 corrected with the updates this document provides when it become 102 normative. 104 1.1. Implicit Allocation of Codepoints for New STUN Methods 106 The demultiplexing scheme in [RFC5764] states that the receiver can 107 identify the packet type by looking at the first byte. If the value 108 of this first byte is 0 or 1, the packet is identified to be STUN. 109 The problem that arises as a result of this implicit allocation is 110 that this restricts the codepoints for STUN methods (as described in 111 Section 18.1 of [RFC5389]) to values between 0x000 and 0x07F, which 112 in turn reduces the number of possible STUN method codepoints 113 assigned by IETF Review (i.e., the range from (0x000 - 0x7FF) from 114 2048 to only 128 and entirely obliterating those STUN method 115 codepoints assigned by Designated Expert (i.e., the range 0x800 - 116 0xFFF). In fact, RFC 5764 implicitly (and needlessly) allocated a 117 very large range of STUN methods, but at a minimum the IANA STUN 118 Methods registry should properly reflect this. 120 There are only a few STUN method codepoints currently allocated, but 121 this is largely attributed to the fact that STUN did not see much 122 deployment until the development of WebRTC. For this reason, simply 123 marking the implicit allocations made by RFC 5764 in the STUN Method 124 registry may create a shortage of codepoints at a time when interest 125 in STUN and STUN Usages (especially TURN) is growing rapidly. 126 Consequently, this document also changes the RFC 5764 packet 127 identification algorithm to expand the range assigned to the STUN 128 protocol from 0 - 1 to 0 - 19, as the values 2-19 are unused. 130 In addition to explicitly allocating STUN methods codepoints from 131 0x500 to 0xFFF as Reserved values, this document also updates the 132 IANA registry such that the STUN method codepoints assigned via IETF 133 Review are in the 0x000-0x27F range and those assigned via Designated 134 Expert are in the 0x280-0x4FF range. The proposed changes to the 135 STUN Method Registry is: 137 OLD: 139 0x000-0x7FF IETF Review 140 0x800-0xFFF Designated Expert 142 NEW: 144 0x000-0x27F IETF Review 145 0x280-0x4FF Designated Expert 146 0x500-0xFFF Reserved 148 1.2. Implicit Allocation of New Codepoints for TLS ContentTypes 150 The demultiplexing scheme in [RFC5764] dictates that if the value of 151 the first byte is between 20 and 63 (inclusive), then the packet is 152 identified to be DTLS. The problem that arises is that this 153 restricts the TLS ContentType codepoints (as defined in Section 12 of 154 [RFC5246]) to this range, and by extension implicitly allocates 155 ContentType codepoints 0 to 19 and 64 to 255. Unlike STUN, TLS is a 156 mature protocol that is already well established and widely 157 implemented and thus we expect only relatively few new codepoints to 158 be assigned in the future. With respect to TLS packet 159 identification, this document simply explicitly reserves the 160 codepoints from 0 to 19 and from 64 to 255 so they are not 161 inadvertently assigned in the future. 163 1.3. Multiplexing of TURN Channels 165 When used with ICE [RFC5245], an RFC 5764 implementation can receive 166 packets on the same socket from three different paths, as shown in 167 Figure 1: 169 1. Directly from the source 171 2. Through a NAT 173 3. Relayed by a TURN server 175 +------+ 176 | TURN |<------------------------+ 177 +------+ | 178 | | 179 | +-------------------------+ | 180 | | | | 181 v v | | 182 NAT ----------- | | 183 | | +---------------------+ | | 184 | | | | | | 185 v v v | | | 186 +----------+ +----------+ 187 | RFC 5764 | | RFC 5764 | 188 +----------+ +----------+ 190 Figure 1: Packet Reception by an RFC 5764 Implementation 192 Even if the ICE algorithm succeeded in selecting a non-relayed path, 193 it is still possible to receive data from the TURN server. For 194 instance, when ICE is used with aggressive nomination the media path 195 can quickly change until it stabilizes. Also, freeing ICE candidates 196 is optional, so the TURN server can restart forwarding STUN 197 connectivity checks during an ICE restart. 199 TURN channels are an optimization where data packets are exchanged 200 with a 4-byte prefix, instead of the standard 36-byte STUN overhead 201 (see Section 2.5 of [RFC5766]). The problem is that the RFC 5764 202 demultiplexing scheme does not define what to do with packets 203 received over a TURN channel since these packets will start with a 204 first byte whose value will be between 64 and 127 (inclusive). If 205 the TURN server was instructed to send data over a TURN channel, then 206 the current RFC 5764 demultiplexing scheme will reject these packets. 207 Current implementations violate RFC 5764 for values 64 to 127 208 (inclusive) and they instead parse packets with such values as TURN. 209 In order to prevent future documents from assigning values from the 210 unused range to a new protocol, this document modifies the RFC 5764 211 demultiplexing algorithm to properly account for TURN channels. 213 2. Terminology 215 The key words "MUST", "MUST NOT", "REQUIRED", "MAY", and "OPTIONAL" 216 in this document are to be interpreted as described in [RFC2119] when 217 they appear in ALL CAPS. When these words are not in ALL CAPS (such 218 as "must" or "Must"), they have their usual English meanings, and are 219 not to be interpreted as RFC 2119 key words. 221 3. RFC 5764 Updates 223 This document updates the text in Section 5.1.2 of [RFC5764] as 224 follows: 226 OLD TEXT 228 The process for demultiplexing a packet is as follows. The receiver 229 looks at the first byte of the packet. If the value of this byte is 230 0 or 1, then the packet is STUN. If the value is in between 128 and 231 191 (inclusive), then the packet is RTP (or RTCP, if both RTCP and 232 RTP are being multiplexed over the same destination port). If the 233 value is between 20 and 63 (inclusive), the packet is DTLS. This 234 process is summarized in Figure 3. 236 +----------------+ 237 | 127 < B < 192 -+--> forward to RTP 238 | | 239 packet --> | 19 < B < 64 -+--> forward to DTLS 240 | | 241 | B < 2 -+--> forward to STUN 242 +----------------+ 244 Figure 3: The DTLS-SRTP receiver's packet demultiplexing algorithm. 245 Here the field B denotes the leading byte of the packet. 247 END OLD TEXT 249 NEW TEXT 251 The process for demultiplexing a packet is as follows. The receiver 252 looks at the first byte of the packet. If the value of this byte is 253 in between 0 and 19 (inclusive), then the packet is STUN. If the 254 value is in between 128 and 191 (inclusive), then the packet is RTP 255 (or RTCP, if both RTCP and RTP are being multiplexed over the same 256 destination port). If the value is between 20 and 63 (inclusive), 257 the packet is DTLS. If the value is between 64 and 127 (inclusive), 258 the packet is TURN Channel. This process is summarized in Figure 3. 260 +----------------+ 261 | 127 < B < 192 -+--> forward to RTP 262 | | 263 | 63 < B < 128 -+--> forward to TURN Channel 264 packet --> | | 265 | 19 < B < 64 -+--> forward to DTLS 266 | | 267 | B < 20 -+--> forward to STUN 268 +----------------+ 270 Figure 3: The DTLS-SRTP receiver's packet demultiplexing algorithm. 271 Here the field B denotes the leading byte of the packet. 273 END NEW TEXT 275 [[Note: we may want to use "<=" instead of "<" to make it easier on 276 implementers.]] 278 4. Implementation Status 280 [[Note to RFC Editor: Please remove this section and the reference to 281 [RFC6982] before publication.]] 282 This section records the status of known implementations of the 283 protocol defined by this specification at the time of posting of this 284 Internet-Draft, and is based on a proposal described in [RFC6982]. 285 The description of implementations in this section is intended to 286 assist the IETF in its decision processes in progressing drafts to 287 RFCs. Please note that the listing of any individual implementation 288 here does not imply endorsement by the IETF. Furthermore, no effort 289 has been spent to verify the information presented here that was 290 supplied by IETF contributors. This is not intended as, and must not 291 be construed to be, a catalog of available implementations or their 292 features. Readers are advised to note that other implementations may 293 exist. 295 According to [RFC6982], "this will allow reviewers and working groups 296 to assign due consideration to documents that have the benefit of 297 running code, which may serve as evidence of valuable experimentation 298 and feedback that have made the implemented protocols more mature. 299 It is up to the individual working groups to use this information as 300 they see fit". 302 Note that there is currently no implementation declared in this 303 section, but the intent is to add RFC 6982 templates here from 304 implementers that support the modifications in this document. 306 5. Security Considerations 308 This document simply updates existing IANA registries and does not 309 introduce any specific security considerations beyond those detailed 310 in [RFC5764]. 312 6. IANA Considerations 314 6.1. STUN Methods 316 This specification contains the registration information for 2816 317 STUN Methods codepoints, as explained in Section 1.1 and in 318 accordance with the procedures defined in Section 18.1 of [RFC5389]. 320 Value: 0x500-0xFFF 322 Name: Reserved 324 Reference: RFC5764, RFCXXXX 326 This specification also reassigns the ranges in the STUN Methods 327 Registry as follow: 329 Range: 0x000-0x27F 330 Registration Procedures: IETF Review 332 Range: 0x280-0x4FF 334 Registration Procedures: Designated Expert 336 6.2. TLS ContentType 338 This specification contains the registration information for 212 TLS 339 ContentType codepoints, as explained in Section 1.2 and in accordance 340 with the procedures defined in Section 12 of [RFC5246]. 342 Value: 0-19 344 Description: Reserved 346 DTLS-OK: N/A 348 Reference: RFC5764, RFCXXXX 350 Value: 64-255 352 Description: Reserved 354 DTLS-OK: N/A 356 Reference: RFC5764, RFCXXXX 358 6.3. TURN Channel Numbers 360 This specification contains the registration information for 32768 361 TURN Channel Numbers codepoints, as explained in Section 1.3 and in 362 accordance with the procedures defined in Section 18 of [RFC5766]. 364 Value: 0x8000-0xFFFF 366 Name: Reserved 368 Reference: RFCXXXX 370 [RFC EDITOR NOTE: Please replace RFCXXXX with the RFC number of this 371 document.] 373 7. Acknowledgements 375 The implicit STUN Method codepoint allocations problem was first 376 reported by Martin Thomson in the RTCWEB mailing-list and discussed 377 further with Magnus Westerlund. 379 Thanks to Simon Perreault and Colton Shields for the comments, 380 suggestions, and questions that helped improve this document. 382 8. References 384 8.1. Normative References 386 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 387 Requirement Levels", BCP 14, RFC 2119, March 1997. 389 [RFC3550] Schulzrinne, H., Casner, S., Frederick, R., and V. 390 Jacobson, "RTP: A Transport Protocol for Real-Time 391 Applications", STD 64, RFC 3550, July 2003. 393 [RFC3711] Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K. 394 Norrman, "The Secure Real-time Transport Protocol (SRTP)", 395 RFC 3711, March 2004. 397 [RFC5245] Rosenberg, J., "Interactive Connectivity Establishment 398 (ICE): A Protocol for Network Address Translator (NAT) 399 Traversal for Offer/Answer Protocols", RFC 5245, April 400 2010. 402 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 403 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 405 [RFC5389] Rosenberg, J., Mahy, R., Matthews, P., and D. Wing, 406 "Session Traversal Utilities for NAT (STUN)", RFC 5389, 407 October 2008. 409 [RFC5764] McGrew, D. and E. Rescorla, "Datagram Transport Layer 410 Security (DTLS) Extension to Establish Keys for the Secure 411 Real-time Transport Protocol (SRTP)", RFC 5764, May 2010. 413 [RFC5766] Mahy, R., Matthews, P., and J. Rosenberg, "Traversal Using 414 Relays around NAT (TURN): Relay Extensions to Session 415 Traversal Utilities for NAT (STUN)", RFC 5766, April 2010. 417 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 418 Security Version 1.2", RFC 6347, January 2012. 420 8.2. Informative References 422 [RFC6982] Sheffer, Y. and A. Farrel, "Improving Awareness of Running 423 Code: The Implementation Status Section", RFC 6982, July 424 2013. 426 [I-D.ietf-mmusic-udptl-dtls] 427 Holmberg, C., Sedlacek, I., and G. Salgueiro, "UDP 428 Transport Layer (UDPTL) over Datagram Transport Layer 429 Security (DTLS)", draft-ietf-mmusic-udptl-dtls-10 (work in 430 progress), June 2014. 432 [I-D.ietf-mmusic-sdp-bundle-negotiation] 433 Holmberg, C., Alvestrand, H., and C. Jennings, 434 "Negotiating Media Multiplexing Using the Session 435 Description Protocol (SDP)", draft-ietf-mmusic-sdp-bundle- 436 negotiation-07 (work in progress), April 2014. 438 Authors' Addresses 440 Marc Petit-Huguenin 441 Jive Communications 442 1275 West 1600 North, Suite 100 443 Orem, UT 84057 444 USA 446 Email: marcph@getjive.com 448 Gonzalo Salgueiro 449 Cisco Systems 450 7200-12 Kit Creek Road 451 Research Triangle Park, NC 27709 452 US 454 Email: gsalguei@cisco.com