idnits 2.17.1 draft-ietf-rtcweb-stun-consent-freshness-14.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (June 8, 2015) is 3216 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) == Outdated reference: A later version (-12) exists of draft-ietf-rtcweb-security-08 == Outdated reference: A later version (-20) exists of draft-ietf-rtcweb-security-arch-11 ** Obsolete normative reference: RFC 5245 (Obsoleted by RFC 8445, RFC 8839) ** Obsolete normative reference: RFC 5389 (Obsoleted by RFC 8489) == Outdated reference: A later version (-18) exists of draft-ietf-tsvwg-rtcweb-qos-03 Summary: 2 errors (**), 0 flaws (~~), 4 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 RTCWEB M. Perumal 3 Internet-Draft Ericsson 4 Intended status: Standards Track D. Wing 5 Expires: December 10, 2015 R. Ravindranath 6 T. Reddy 7 Cisco Systems 8 M. Thomson 9 Mozilla 10 June 8, 2015 12 STUN Usage for Consent Freshness 13 draft-ietf-rtcweb-stun-consent-freshness-14 15 Abstract 17 To prevent WebRTC applications, such as browsers, from launching 18 attacks by sending media to unwilling victims, periodic consent to 19 send needs to be obtained from remote endpoints. 21 This document describes a consent mechanism using a new Session 22 Traversal Utilities for NAT (STUN) usage. 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 December 10, 2015. 41 Copyright Notice 43 Copyright (c) 2015 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 . . . . . . . . . . . . . . . . . . . . . . . . 2 59 2. Applicability . . . . . . . . . . . . . . . . . . . . . . . . 3 60 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 61 4. Design Considerations . . . . . . . . . . . . . . . . . . . . 3 62 5. Solution . . . . . . . . . . . . . . . . . . . . . . . . . . 4 63 5.1. Expiration of Consent . . . . . . . . . . . . . . . . . . 4 64 5.2. Immediate Revocation of Consent . . . . . . . . . . . . . 6 65 6. DiffServ Treatment for Consent . . . . . . . . . . . . . . . 7 66 7. DTLS applicability . . . . . . . . . . . . . . . . . . . . . 7 67 8. Security Considerations . . . . . . . . . . . . . . . . . . . 7 68 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 69 10. Acknowledgement . . . . . . . . . . . . . . . . . . . . . . . 7 70 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 71 11.1. Normative References . . . . . . . . . . . . . . . . . . 8 72 11.2. Informative References . . . . . . . . . . . . . . . . . 8 73 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9 75 1. Introduction 77 To prevent attacks on peers, endpoints have to ensure the remote peer 78 is willing to receive traffic. This is performed both when the 79 session is first established to the remote peer using Interactive 80 Connectivity Establishment ICE [RFC5245] connectivity checks, and 81 periodically for the duration of the session using the procedures 82 defined in this document. 84 When a session is first established, ICE implementations obtain an 85 initial consent to send by performing STUN connectivity checks. This 86 document describes a new STUN usage with exchange of request and 87 response messages that verifies the remote peer's ongoing consent to 88 receive traffic. This consent expires after a period of time and 89 needs to be continually renewed, which ensures that consent can be 90 terminated. 92 This document defines what it takes to obtain, maintain, and lose 93 consent to send. Consent to send applies to a single 5-tuple. How 94 applications react to changes in consent is not described in this 95 document. The consent mechanism does not update the ICE procedures 96 defined in [RFC5245]. 98 Consent is obtained only by full ICE implementations. An ICE-lite 99 agent (as defined in Section 2.7 of [RFC5245]) does not generate 100 connectivity checks or run the ICE state machine. An ICE-lite agent 101 does not generate consent checks, it will only respond to any checks 102 that it receives. No changes are required to ICE-lite 103 implementations in order to respond to consent checks, as they are 104 processed as normal ICE connectivity checks. 106 2. Applicability 108 This document defines what it takes to obtain, maintain, and lose 109 consent to send using ICE. Verification of peer consent before 110 sending traffic is necessary in deployments like WebRTC to ensure 111 that a malicious JavaScript cannot use the browser as a platform for 112 launching attacks. Section 4.4 and Section 5.3 of 113 [I-D.ietf-rtcweb-security-arch] further explains the value of 114 obtaining and maintaining consent. 116 Other Applications that have similar security requirements to verify 117 peer's consent before sending non-ICE packets can use the consent 118 mechanism described in this document. The mechanism of how 119 applications are made aware of consent expiration is outside the 120 scope of the document. 122 3. Terminology 124 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 125 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 126 document are to be interpreted as described in [RFC2119]. 128 Consent: The mechanism of obtaining permission from the remote 129 endpoint to send non-ICE traffic to a remote transport address. 130 Consent is obtained using ICE. 132 Consent Freshness: Maintaining and renewing consent over time. 134 Transport Address: The remote peer's IP address and UDP or TCP port 135 number. 137 4. Design Considerations 139 Although ICE requires periodic keepalive traffic to keep NAT bindings 140 alive (Section 10 of [RFC5245], [RFC6263]), those keepalives are sent 141 as STUN Indications which are send-and-forget, and do not evoke a 142 response. A response is necessary for consent to continue sending 143 traffic. Thus, we need a request/response mechanism for consent 144 freshness. ICE can be used for that mechanism because ICE 145 implementations are already required to continue listening for ICE 146 messages, as described in Section 10 of [RFC5245]. STUN binding 147 requests sent for consent freshness also serve the keepalive purpose 148 (i.e to keep NAT bindings alive). Because of that, dedicated 149 keepalives (e.g. STUN Binding Indications) are not sent on candidate 150 pairs where consent requests are sent, in accordance with 151 Section 20.2.3 of [RFC5245]. 153 When Secure Real-time Transport Protocol (SRTP) is used, the 154 following considerations are applicable. SRTP is encrypted and 155 authenticated with symmetric keys; that is, both sender and receiver 156 know the keys. With two party sessions, receipt of an authenticated 157 packet from the single remote party is a strong assurance the packet 158 came from that party. However, when a session involves more than two 159 parties, all of whom know each other's keys, any of those parties 160 could have sent (or spoofed) the packet. Such shared key 161 distributions are possible with some MIKEY [RFC3830] modes, Security 162 Descriptions [RFC4568], and EKT [I-D.ietf-avtcore-srtp-ekt]. Thus, 163 in such shared keying distributions, receipt of an authenticated SRTP 164 packet is not sufficient to verify consent. 166 The mechanism proposed in the document is an optional extension to 167 the ICE protocol, it can be deployed at one end of the two-party 168 communication session without impact on the other party. 170 5. Solution 172 Initial consent to send traffic is obtained using ICE [RFC5245]. An 173 endpoint gains consent to send on a candidate pair when the pair 174 enters the Succeeded ICE state. This document establishes a 30 175 second expiry time on consent. 30 seconds was chosen to balance the 176 need to minimize the time taken to respond to a loss of consent with 177 the desire to reduce the occurrence of spurious failures. 179 ICE does not identify when consent to send traffic ends. This 180 document describes two ways in which consent to send ends: expiration 181 of consent and immediate revocation of consent, which are discussed 182 in the following sections. 184 5.1. Expiration of Consent 186 A full ICE implementation obtains consent to send using ICE. After a 187 successful ICE connectivity check on a particular transport address 188 (i.e., a candidate pair has been marked as Succeeded), consent MUST 189 be maintained following the procedure described in this document. 191 An endpoint MUST NOT send data other than the messages used to 192 establish consent unless the receiving endpoint has consented to 193 receive data. Connectivity checks that are paced as described in 194 Section 16 of [RFC5245] and responses to connectivity checks are 195 permitted. That is, no application data (e.g., RTP or Datagram 196 Transport Layer Security (DTLS)) can be sent until consent is 197 obtained. 199 Explicit consent to send is obtained and maintained by sending an 200 STUN binding request to the remote peer's transport address and 201 receiving a matching, authenticated, non-error STUN binding response 202 from the remote peer's transport address. These STUN binding 203 requests and responses are authenticated using the same short-term 204 credentials as the initial ICE exchange. 206 Note: Although TCP has its own consent mechanism (TCP 207 acknowledgements), consent is necessary over a TCP connection 208 because it could be translated to a UDP connection (e.g., 209 [RFC6062]). 211 Consent expires after 30 seconds. That is, if a valid STUN binding 212 response has not been received from the remote peer's transport 213 address in 30 seconds, the endpoint MUST cease transmission on that 214 5-tuple. STUN consent responses received after consent expiry do not 215 re-establish consent, and may be discarded or cause an ICMP error. 217 To prevent expiry of consent, a STUN binding request can be sent 218 periodically. To prevent synchronization of consent checks, each 219 interval MUST be randomized from between 0.8 and 1.2 times the basic 220 period. Implementations SHOULD set a default interval of 5 seconds, 221 resulting in a period between checks of 4 to 6 seconds. 222 Implementations MUST NOT set the period between checks to less than 4 223 seconds. This timer is independent of the consent expiry timeout. 225 Each STUN binding request for consent MUST use a new STUN transaction 226 identifier for every consent binding request, as described in 227 Section 6 of [RFC5389]. Each STUN binding request for consent is 228 transmitted once only. A sender therefore cannot assume that it will 229 receive a response for every consent request, and a response might be 230 for a previous request (rather than for the most recently sent 231 request). 233 An endpoint SHOULD await a binding response for each request it sends 234 for a time based on the estimated round-trip time (RTT) (see 235 Section 7.2.1 of [RFC5389]) with an allowance for variation in 236 network delay. The RTT value can be updated as described in 237 [RFC5389]. All outstanding STUN consent transactions for a candidate 238 pair MUST be discarded when consent expires. 240 To meet the security needs of consent, an untrusted application 241 (e.g., JavaScript or signaling servers) MUST NOT be able to obtain or 242 control the STUN transaction identifier, because that enables 243 spoofing of STUN responses, falsifying consent. 245 To prevent attacks on the peer during ICE restart, an endpoint that 246 continues to send traffic on the previously validated candidate pair 247 during ICE restart MUST continue to perform consent freshness on that 248 candidate pair as described earlier. 250 While TCP affords some protection from off-path attackers ([RFC5961], 251 [RFC4953]), there is still a risk an attacker could cause a TCP 252 sender to send forever by spoofing ACKs. To prevent such an attack, 253 consent checks MUST be performed over all transport connections, 254 including TCP. In this way, an off-path attacker spoofing TCP 255 segments cannot cause a TCP sender to send once the consent timer 256 expires (30 seconds). 258 An endpoint that is not sending any application data does not need to 259 maintain consent. However, not sending any traffic could cause NAT 260 or firewall mappings to expire. Furthermore, having one peer unable 261 to send is detrimental to many protocols. Absent better information 262 about the network, if an endpoint needs to ensure its NAT or firewall 263 mappings do not expire, it can be done using keepalive or other 264 techniques (see Section 10 of [RFC5245] and see [RFC6263]). 266 After consent is lost, the same ICE credentials MUST NOT be used on 267 the affected 5-tuple again. That means that a new session, or an ICE 268 restart, is needed to obtain consent to send on the affected 269 candidate pair. 271 5.2. Immediate Revocation of Consent 273 In some cases it is useful to signal that consent is terminated 274 rather than relying on a timeout. 276 Consent for sending application data is immediately revoked by 277 receipt of an authenticated message that closes the connection (e.g., 278 a TLS fatal alert) or receipt of a valid and authenticated STUN 279 response with error code Forbidden (403). Note however that consent 280 revocation messages can be lost on the network, so an endpoint could 281 resend these messages, or wait for consent to expire. 283 Receipt of an unauthenticated message that closes a connection (e.g., 284 TCP FIN) does not indicate revocation of consent. Thus, an endpoint 285 receiving an unauthenticated end-of-session message SHOULD continue 286 sending media (over connectionless transport) or attempt to re- 287 establish the connection (over connection-oriented transport) until 288 consent expires or it receives an authenticated message revoking 289 consent. 291 Note that an authenticated SRTCP BYE does not terminate consent; it 292 only indicates the associated SRTP source has quit. 294 6. DiffServ Treatment for Consent 296 It is RECOMMENDED that STUN consent checks use the same Diffserv 297 Codepoint markings as the ICE connectivity checks described in 298 Section 7.1.2.4 of [RFC5245] for a given 5-tuple. 300 Note: It is possible that different Diffserv Codepoints are used by 301 different media over the same transport address 302 [I-D.ietf-tsvwg-rtcweb-qos]. Such a case is outside the scope of 303 this document. 305 7. DTLS applicability 307 The DTLS applicability is identical to what is described in 308 Section 4.2 of [RFC7350]. 310 8. Security Considerations 312 This document describes a security mechanism, details of which are 313 mentioned in Section 4.1 and Section 4.2. Consent requires 96 bits 314 transaction ID to be uniformly and randomly chosen from the interval 315 0 .. 2**96-1, and be cryptographically strong. This is good enough 316 security against an off-path attacker replaying old STUN consent 317 responses. Consent Verification to avoid attacks using a browser as 318 an attack platform against machines is discussed in Sections 3.3 and 319 4.2 of [I-D.ietf-rtcweb-security]. 321 The security considerations discussed in [RFC5245] should also be 322 taken into account. 324 9. IANA Considerations 326 This document does not require any action from IANA. 328 10. Acknowledgement 330 Thanks to Eric Rescorla, Harald Alvestrand, Bernard Aboba, Magnus 331 Westerland, Cullen Jennings, Christer Holmberg, Simon Perreault, Paul 332 Kyzivat, Emil Ivov, Jonathan Lennox, Inaki Baz Castillo, Rajmohan 333 Banavi, Christian Groves, Meral Shirazipour and David Black for their 334 valuable inputs and comments. Thanks to Christer Holmberg for doing 335 a thorough review. 337 11. References 339 11.1. Normative References 341 [I-D.ietf-rtcweb-security] 342 Rescorla, E., "Security Considerations for WebRTC", draft- 343 ietf-rtcweb-security-08 (work in progress), February 2015. 345 [I-D.ietf-rtcweb-security-arch] 346 Rescorla, E., "WebRTC Security Architecture", draft-ietf- 347 rtcweb-security-arch-11 (work in progress), March 2015. 349 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 350 Requirement Levels", BCP 14, RFC 2119, March 1997. 352 [RFC5245] Rosenberg, J., "Interactive Connectivity Establishment 353 (ICE): A Protocol for Network Address Translator (NAT) 354 Traversal for Offer/Answer Protocols", RFC 5245, April 355 2010. 357 [RFC5389] Rosenberg, J., Mahy, R., Matthews, P., and D. Wing, 358 "Session Traversal Utilities for NAT (STUN)", RFC 5389, 359 October 2008. 361 [RFC6263] Marjou, X. and A. Sollaud, "Application Mechanism for 362 Keeping Alive the NAT Mappings Associated with RTP / RTP 363 Control Protocol (RTCP) Flows", RFC 6263, June 2011. 365 11.2. Informative References 367 [I-D.ietf-avtcore-srtp-ekt] 368 Mattsson, J., McGrew, D., and D. Wing, "Encrypted Key 369 Transport for Secure RTP", draft-ietf-avtcore-srtp-ekt-03 370 (work in progress), October 2014. 372 [I-D.ietf-tsvwg-rtcweb-qos] 373 Dhesikan, S., Jennings, C., Druta, D., Jones, P., and J. 374 Polk, "DSCP and other packet markings for RTCWeb QoS", 375 draft-ietf-tsvwg-rtcweb-qos-03 (work in progress), 376 November 2014. 378 [RFC3830] Arkko, J., Carrara, E., Lindholm, F., Naslund, M., and K. 379 Norrman, "MIKEY: Multimedia Internet KEYing", RFC 3830, 380 August 2004. 382 [RFC4568] Andreasen, F., Baugher, M., and D. Wing, "Session 383 Description Protocol (SDP) Security Descriptions for Media 384 Streams", RFC 4568, July 2006. 386 [RFC4953] Touch, J., "Defending TCP Against Spoofing Attacks", RFC 387 4953, July 2007. 389 [RFC5961] Ramaiah, A., Stewart, R., and M. Dalal, "Improving TCP's 390 Robustness to Blind In-Window Attacks", RFC 5961, August 391 2010. 393 [RFC6062] Perreault, S. and J. Rosenberg, "Traversal Using Relays 394 around NAT (TURN) Extensions for TCP Allocations", RFC 395 6062, November 2010. 397 [RFC7350] Petit-Huguenin, M. and G. Salgueiro, "Datagram Transport 398 Layer Security (DTLS) as Transport for Session Traversal 399 Utilities for NAT (STUN)", RFC 7350, August 2014. 401 Authors' Addresses 403 Muthu Arul Mozhi Perumal 404 Ericsson 405 Ferns Icon 406 Doddanekundi, Mahadevapura 407 Bangalore, Karnataka 560037 408 India 410 Email: muthu.arul@gmail.com 412 Dan Wing 413 Cisco Systems 414 821 Alder Drive 415 Milpitas, California 95035 416 USA 418 Email: dwing@cisco.com 420 Ram Mohan Ravindranath 421 Cisco Systems 422 Cessna Business Park 423 Sarjapur-Marathahalli Outer Ring Road 424 Bangalore, Karnataka 560103 425 India 427 Email: rmohanr@cisco.com 428 Tirumaleswar Reddy 429 Cisco Systems 430 Cessna Business Park, Varthur Hobli 431 Sarjapur Marathalli Outer Ring Road 432 Bangalore, Karnataka 560103 433 India 435 Email: tireddy@cisco.com 437 Martin Thomson 438 Mozilla 439 Suite 300 440 650 Castro Street 441 Mountain View, California 94041 442 US 444 Email: martin.thomson@gmail.com