[asterisk-bugs] [Asterisk 0019346]: [patch] Crash in netsock when attempting to resolve blank sip uri

Asterisk Bug Tracker noreply at bugs.digium.com
Thu May 26 16:48:47 CDT 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=19346 
====================================================================== 
Reported By:                kobaz
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   19346
Category:                   Core/Netsock
Reproducibility:            sometimes
Severity:                   crash
Priority:                   high
Status:                     new
Asterisk Version:           SVN 
JIRA:                       SWP-3489 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): 1.8 
SVN Revision (number only!): 320171 
Request Review:              
====================================================================== 
Date Submitted:             2011-05-22 23:43 CDT
Last Modified:              2011-05-26 16:48 CDT
====================================================================== 
Summary:                    [patch] Crash in netsock when attempting to resolve
blank sip uri
Description: 
Through some routine testing I came across

[2011-05-23 00:35:06] WARNING[29007]: chan_sip.c:13295 Invalid contact uri
 (missing sip: or sips:), attempting to use anyway
Segmentation Fault

The problem is in ast_sockaddr_resolve() in netsock2.c
s = ast_strdupa(str);

This may deference a null pointer if the results from
parse_uri_legacy_check() in chan_sip are a null domain.
====================================================================== 

---------------------------------------------------------------------- 
 (0135457) svnbot (reporter) - 2011-05-26 16:48
 https://issues.asterisk.org/view.php?id=19346#c135457 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 321155

U   branches/1.8/channels/chan_sip.c
U   branches/1.8/channels/sip/reqresp_parser.c

------------------------------------------------------------------------
r321155 | markm | 2011-05-26 16:48:46 -0500 (Thu, 26 May 2011) | 10 lines

Fixed build problem with dev mode enabled, which was caused by commit
321100.  Reformulated patch to be more generic.

Moved the sip uri parse variable initalization to parse_uri_full in
reqresp_parser.c.  This will ensure that any use of parse uri will have
null output variables if the parse fails.

(closes issue https://issues.asterisk.org/view.php?id=19346)
Reported by: kobaz
Tested by: kobaz,JonathanRose

Review: [full review board URL with trailing slash]

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=321155 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-05-26 16:48 svnbot         Checkin                                      
2011-05-26 16:48 svnbot         Note Added: 0135457                          
======================================================================




More information about the asterisk-bugs mailing list