[asterisk-bugs] [Asterisk 0013715]: [patch] Using SIP_HEADER in AMI with NULL channel causes crash
Asterisk Bug Tracker
noreply at bugs.digium.com
Fri Oct 17 21:08:01 CDT 2008
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=13715
======================================================================
Reported By: makoto
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 13715
Category: Channels/chan_sip/General
Reproducibility: always
Severity: minor
Priority: normal
Status: new
Asterisk Version: 1.4.22
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 2008-10-16 03:58 CDT
Last Modified: 2008-10-17 21:08 CDT
======================================================================
Summary: [patch] Using SIP_HEADER in AMI with NULL channel
causes crash
Description:
Connect to AMI, then send the following lines.
So asterisk will crash.
Action: GetVar
Channel:
Variable: SIP_HEADER(P-Called-Party-ID)
I have tested only on 1.2, but I believe that it happens on 1.4 or later.
Attached patch will fix the problem.
======================================================================
----------------------------------------------------------------------
(0093925) svnbot (reporter) - 2008-10-17 21:08
http://bugs.digium.com/view.php?id=13715#c93925
----------------------------------------------------------------------
Repository: asterisk
Revision: 150817
_U trunk/
U trunk/main/manager.c
------------------------------------------------------------------------
r150817 | bweschke | 2008-10-17 21:08:00 -0500 (Fri, 17 Oct 2008) | 8
lines
Using the GetVar handler in AMI is potentially dangerous (insta-crash
[tm]) when you use a dialplan function that requires a channel and then you
don't provide one or provide an invalid one in the Channel: parameter.
We'll handle this situation exactly the same way it was handled in pbx.c
back on r61766.
We'll create a bogus channel for the function call and destroy it when
we're done. If we have trouble allocating the bogus channel then we're not
going to try executing the function call at all and run the risk of
crashing.
(closes issue http://bugs.digium.com/view.php?id=13715)
reported by: makoto
patch by: bweschke
------------------------------------------------------------------------
http://svn.digium.com/view/asterisk?view=rev&revision=150817
Issue History
Date Modified Username Field Change
======================================================================
2008-10-17 21:08 svnbot Checkin
2008-10-17 21:08 svnbot Note Added: 0093925
======================================================================
More information about the asterisk-bugs
mailing list