[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 15:16:29 CDT 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=19346 
====================================================================== 
Reported By:                kobaz
Assigned To:                svnbot
====================================================================== 
Project:                    Asterisk
Issue ID:                   19346
Category:                   Core/Netsock
Reproducibility:            sometimes
Severity:                   crash
Priority:                   high
Status:                     closed
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:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2011-05-22 23:43 CDT
Last Modified:              2011-05-26 15:16 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.
====================================================================== 

---------------------------------------------------------------------- 
 (0135451) svnbot (reporter) - 2011-05-26 15:16
 https://issues.asterisk.org/view.php?id=19346#c135451 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 321101

_U  trunk/
U   trunk/channels/chan_sip.c
U   trunk/main/netsock2.c

------------------------------------------------------------------------
r321101 | markm | 2011-05-26 15:16:29 -0500 (Thu, 26 May 2011) | 17 lines

Merged revisions 321100 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r321100 | markm | 2011-05-26 16:09:35 -0400 (Thu, 26 May 2011) | 11
lines
  
  ast_sockaddr_resolve() in netsock2.c may deref a null pointer
  
  Added a null check in netsock2 ast_sockaddr_resolve() as well as added
default initalizers in chan_sip parse_uri_legacy_check() to make sure that
invalid uris will make null (and not undefined) user,pass,domain,transport
variables
  
  (closes issue https://issues.asterisk.org/view.php?id=19346)
  Reported by: kobaz
  Patches: 
        netsock2.patch uploaded by kobaz (license 834)
  Tested by: kobaz, Marquis
........

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

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

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




More information about the asterisk-bugs mailing list