[asterisk-bugs] [Asterisk 0017255]: [patch] UDP ports not freed/ports leaking

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Jan 28 01:13:20 CST 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17255 
====================================================================== 
Reported By:                kvveltho
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   17255
Category:                   Core/General
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     acknowledged
Asterisk Version:           1.6.2.7-rc2 
JIRA:                       SWP-1410 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-04-28 06:23 CDT
Last Modified:              2011-01-28 01:13 CST
====================================================================== 
Summary:                    [patch] UDP ports not freed/ports leaking
Description: 
The following is not fixed:

These release candidates resolve an issue with UDP ports not being freed,
per
issue https://issues.asterisk.org/view.php?id=16774
(https://issues.asterisk.org/view.php?id=16774)

======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0016774 [patch] [regression] 1.6.1.13 and 1.6.1...
related to          0018121 Early bind of UDPTL ports can create a ...
====================================================================== 

---------------------------------------------------------------------- 
 (0131154) rgagnon (reporter) - 2011-01-28 01:13
 https://issues.asterisk.org/view.php?id=17255#c131154 
---------------------------------------------------------------------- 
Patch uploaded: "asterisk-1.6.2.16.1-sip-udp-dos-fix.diff"

This fixes the SIP UDP Denial of Service that this issue really is.  As
described in my last post, if a UAC purposely sends a long session-expires
header to an asterisk server with session-timers enabled, and that server
issues a 503 Service Unavailable, the timer will linger until expired, and
the UDP ports tied to the dialogs will remain bound and unusable until
then.

Explanation of hunks:
@@ -512:
Remove unused DEFAULT_EXPIRY macro

@@ -6100 and @@ -6158:
In sip_hangup(), ensure session timer is stopped if one exists.  If 503
occurs, the "else" will not execute because p->alreadygone is true.

@@ -6558:
AST_SCHED_DEL() changed to AST_SCHED_DEL_UNREF() for release of t38id
timer.

@@ -22857:
Minor:  Move ast_debug() call to be within else-clause as it would be a
false message if the error condition above it just stated "ast_sched_add
failed"

Patch created against the 1.6.2.16.1 tag as that is the running version we
use.  I may look into creating similar patches for other versions, but this
one should make a nice roadmap for anyone else that wants to do so. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-01-28 01:13 rgagnon        Note Added: 0131154                          
======================================================================




More information about the asterisk-bugs mailing list