ietf-corpus

rfc-5393

Addressing an Amplification Vulnerability in Session Initiation Protocol (SIP) Forking Proxies

R. Sparks (Editor), S. Lawrence, A. Hawrylyshen, B. Campen
date2008-12 streamIETF arearai wgsip statusPROPOSED STANDARD pages20 canonicalhttps://www.rfc-editor.org/rfc/rfc5393 doi10.17487/RFC5393
This document normatively updates RFC 3261, the Session Initiation Protocol (SIP), to address a security vulnerability identified in SIP proxy behavior. This vulnerability enables an attack against SIP networks where a small number of legitimate, even authorized, SIP requests can stimulate massive amounts of proxy-to-proxy traffic. This document strengthens loop-detection requirements on SIP proxies when they fork requests (that is, forward a request to more than one destination). It also corrects and clarifies the description of the loop-detection algorithm such proxies are required to implement. Additionally, this document defines a Max-Breadth mechanism for limiting the number of concurrent branches pursued for any given request. [STANDARDS-TRACK]

updates

Extracted elements (26)

design-rationale §4.2.4 SHOULD

A common implementation for the second branch-parameter part is a hash (e.g., CRC-32c or MD5 used non-cryptographically) over the Request-URI, Route header values, and other location-service inputs. Implementations SHOULD include at least one field that varies between different transactions to the same destination (e.g., Call-ID and CSeq) to avoid repeated failure on hash collision.

sip, crypto

design-rationale §7.1

Deprecating forking entirely was considered and rejected as too extreme; the attack does not exist in a system relying entirely on redirection, but removing forking as an architectural component was deemed unacceptable.

sip

design-rationale §3

Loop detection alone is insufficient when an attacker controls N distinct AORs each forking to all others; traffic grows faster than N! even with loop detection at all proxies. The Max-Breadth mechanism is designed to limit the effectiveness of this multi-AOR variant by capping concurrent branches.

sip, security

design-rationale §7.1

Max-Breadth limits concurrent branches but allows breadth from completed branches to be reclaimed for subsequent sequential forks. An alternative that forbade reclamation was rejected because it would dramatically reduce the potential reach of requests and break existing deployments.

sip, security

design-rationale §7.1

Reducing the Max-Forwards cap was considered and rejected: while it limits the exponential effect of the attack, it severely restricts request reach and could cause existing architectures to fail.

sip, security

design-rationale §4.2.3

The loop-detection requirements make the favorable trade of exponential message growth for work that is at worst O(m*n) as a message crosses n proxies where m is the number of forking proxies. This is order N(N+1)/2 inspections in the worst case across all proxies.

sip, security

interoperability-note §4.2.4

A common SIPit interoperability failure has been parsers objecting to Via header field values from other elements. Implementations must avoid assumptions about the format of another element's Via beyond basic RFC 3261 constraints; unknown parameter names, valueless parameters, or quoted/unquoted parameter values must not cause failure.

sip

normative-requirement §5.3.3 MUST NOT

A proxy MUST NOT decrement Max-Breadth for each hop or otherwise use it to restrict the depth of a request's propagation; Max-Breadth limits concurrent breadth only, not depth (that is Max-Forwards' role).

sip

normative-requirement §4.1 MAY

A SIP proxy forwarding a request to only one location MAY perform loop detection but is not required to; the amplification risk being exploited is not present in the non-forking case.

sip

normative-requirement §5.3.4 MAY

A User Agent Client (UAC) MAY place a Max-Breadth header field value in outgoing requests; if so, the value is RECOMMENDED to be 60.

sip

normative-requirement §5.3.3 MUST NOT

All proxied requests MUST contain a single Max-Breadth header field value. SIP proxies MUST NOT allow the Outgoing Max-Breadth to exceed the Incoming Max-Breadth in a given response context.

sip, security

normative-requirement §5.3.3 MUST

If a SIP proxy determines a response context has insufficient Incoming Max-Breadth to carry out a desired parallel fork, and the proxy is unwilling or unable to compensate by forking serially or sending a redirect, that proxy MUST return a 440 (Max-Breadth Exceeded) response.

sip, security

normative-requirement §5.3.3 MUST

If a SIP proxy receives a request with no Max-Breadth header field value, it MUST add one; the value is RECOMMENDED to be 60. Proxies MUST have a maximum allowable Incoming Max-Breadth (RECOMMENDED 60), and MUST overwrite values exceeding this maximum with a value that SHOULD be no greater than the allowable maximum.

sip, security

normative-requirement §4.2.2 MUST

Proxies required to perform loop detection MUST inspect each Via header field value whose sent-by matches a value placed by this proxy. If the second part is present and equals the freshly-computed second part, the request has looped and the proxy MUST reject it with a 482 (Loop Detected) response.

sip, security

normative-requirement §4.2.1 SHOULD

Proxies required to perform loop detection SHOULD create a Via branch value separable into two parts: the first satisfying RFC 3261 Section 8.1.1.7, and the second used to perform loop detection and distinguish loops from spirals.

sip

normative-requirement §4.2.1 MUST NOT

The second part of the Via branch parameter MUST NOT vary with the request method. CANCEL and non-200 ACK requests MUST have the same branch parameter value as the corresponding request they cancel or acknowledge.

sip

normative-requirement §4.1 MUST

When a SIP proxy forks a particular request to more than one location, it MUST ensure that request is not looping through this proxy. It is RECOMMENDED that proxies meet this requirement by performing the loop-detection steps defined in RFC 5393.

sip, security

protocol-element §5.3.5

A UAS receiving a request with a Max-Breadth header field will ignore that field while processing the request. Max-Breadth does not affect UAS behavior.

sip

protocol-element §5.1

The 440 (Max-Breadth Exceeded) response code signals that a request did not reach all possible destinations because the Max-Breadth budget was exhausted. Recovery options are similar to 483 (Too Many Hops): affect routing decisions or refine the request to reduce the search space.

sip

protocol-element §5.1

The Max-Breadth header field carries a single positive integer representing the maximum number of concurrent branches a forked request may spawn from its current point. When a proxy forks, the Incoming Max-Breadth is divided among outgoing branches; Outgoing Max-Breadth is the sum of Max-Breadth values of branches without a final response.

sip, security

registry §6.2

Registers response code 440 with default reason phrase "Max-Breadth Exceeded" in the Response Codes sub-registry of the SIP Parameters registry.

sip, registry

registry §6.1

Registers the Max-Breadth SIP header field (no compact form) in the Header Fields sub-registry of the SIP Parameters registry.

sip, registry

security-consideration §3

A small number of legitimate SIP requests can stimulate exponentially growing proxy-to-proxy traffic by leveraging forking. With RFC 3261 defaults, fewer than ten messages can stimulate potentially 2^71 messages through cross-registration of AORs across two proxies.

sip, security

security-consideration §7

Protocol gateways (e.g., SIP-to-PSTN-to-SIP, B2BUAs) that strip loop-detection, Max-Forwards, or Max-Breadth data can create loops that none of these mechanisms protect against. If two such implementations are both involved in an attack, neither will detect it.

sip, security

security-consideration §7

The Max-Breadth mechanism does not decrease aggregate traffic from a forking-loop attack; it only spreads traffic over a longer period by capping concurrent branches. An attacker can pump multiple requests to gradually build traffic. Deployments must monitor for gradual increases in concurrent outstanding transactions and be prepared to disable compromised resources.

sip, security

wire-format §5.8

The Max-Breadth header field takes a single positive integer value with no parameters, defined by the ABNF: Max-Breadth = "Max-Breadth" HCOLON 1*DIGIT.

sip