[asterisk-bugs] [Asterisk 0018653]: [patch] Read func CHANNEL() on sip channel without arg will crash asterisk

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Mar 8 14:19:34 CST 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18653 
====================================================================== 
Reported By:                wuwu
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   18653
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     acknowledged
Asterisk Version:           1.8.2.2 
JIRA:                       SWP-2958 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2011-01-21 01:04 CST
Last Modified:              2011-03-08 14:19 CST
====================================================================== 
Summary:                    [patch] Read func CHANNEL() on sip channel without
arg will crash asterisk
Description: 
calling the function CHANNEL() without an argument on a sip channel will
crash asterisk with a segfault.
In sip_acf_channel_read it does parse arguments - and then starts a
strcasecmp on the args.param - but args is invalid / null - because there
are no arguments.

Adding a ast_strlen_zero check at the beginning should resolv the problem
- untested code is at the additional information...
====================================================================== 

---------------------------------------------------------------------- 
 (0132755) svnbot (reporter) - 2011-03-08 14:19
 https://issues.asterisk.org/view.php?id=18653#c132755 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 310088

U   branches/1.8/channels/sip/dialplan_functions.c

------------------------------------------------------------------------
r310088 | jrose | 2011-03-08 14:19:33 -0600 (Tue, 08 Mar 2011) | 9 lines

Returns with an error notice if CHANNEL function of SIP channel is read
without arguments.

(Closes issue https://issues.asterisk.org/view.php?id=18653)
Reported by: wuwu
Patches:
      diff.patch uploaded by jrose (license 1225)
Tested by: jrose


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

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-03-08 14:19 svnbot         Checkin                                      
2011-03-08 14:19 svnbot         Note Added: 0132755                          
======================================================================




More information about the asterisk-bugs mailing list