Howto:SIP resource allocation

From innovaphone wiki
Revision as of 11:40, 6 July 2007 by Tac (talk | contribs)
Jump to navigation Jump to search

Message allocations

When using UDP as transport protocol for SIP signaling, the SIP user agent (UAC/UAS) is responsible for retransmission in case of packet loss.

For this reason the user agent has to keep transmitted messages (requests or resopnses) to be able to do a re-transmission, in case the remote user agent receive this message. The user agent is obligated to keep transmitted messages for about 32 seconds. (Refer to: RFC-3261 "SIP: Session Initiation Protocol")

For every non-INVITE transaction the user agent has to saves the request and the final response (2 message allocations). For every INVITE transaction the user agent has to saves the request, the final response and the ACK (3 message allocations). Our SIP implementation allocates 2KB memory for every single message.

Security considerations

Using UDP as transport protocol for SIP signaling, makes the SIP implementation extremly vulnerable to Denial-of-Service attacks. You just have to send a burst of SIP requests (e.g. REGISTER) to an user agent. No matter if these requests are accepted or rejected, the user agent is obligated to keep all the transmitted responses for 32 seconds. If there is no limitation to message allocations, the system will run out of memory.

Related Articles