[asterisk-bugs] [Asterisk 0016206]: Segfault in chan_iax2.so when receiving call without CallToken support
Asterisk Bug Tracker
noreply at bugs.digium.com
Sat Nov 7 16:41:10 CST 2009
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=16206
======================================================================
Reported By: bklang
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 16206
Category: Channels/chan_iax2
Reproducibility: always
Severity: crash
Priority: normal
Status: feedback
Asterisk Version: SVN
JIRA:
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): 1.6.1
SVN Revision (number only!): 228695
Request Review:
======================================================================
Date Submitted: 2009-11-07 14:00 CST
Last Modified: 2009-11-07 16:41 CST
======================================================================
Summary: Segfault in chan_iax2.so when receiving call without
CallToken support
Description:
I have configured Asterisk svn branch 1.6.1 to talk to my legacy Asterisk
1.2 system. When the Asterisk 1.2 system places a call to the 1.6.1
system, the 1.6.1 host immediately segfaults.
The problem was traced to a call to ast_log() in chan_iax2.so on line
4600. Commenting out this line and recompiling chan_iax2.so avoids the
crash. Configuring Asterisk to not require call tokens from the remote
peer also avoids the crash.
As a side note, it appears that the text of the ast_log() message is out
of date as I not find any reference to a "calltokenignore" config option
for chan_iax2.
I will be happy to provide the entire core file if requested. I have not
yet confirmed this bug on Linux.
The console reports:
grant*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
/opt/asterisk/sbin/safe_asterisk: line 157: 15691: Memory fault(coredump)
Asterisk ended with exit status 267
Asterisk exited on signal EXITSTATUS-128.
Exited on signal EXITSTATUS-128
Below is a sample from the Asterisk corefile:
(gdb) bt
https://issues.asterisk.org/view.php?id=0 0xfeca47a0 in countbytes () from
/lib/libc.so.1
https://issues.asterisk.org/view.php?id=1 0xfecf0793 in _ndoprnt () from
/lib/libc.so.1
https://issues.asterisk.org/view.php?id=2 0xfecf31bd in vsnprintf () from
/lib/libc.so.1
https://issues.asterisk.org/view.php?id=3 0x08135009 in __ast_str_helper
(buf=0xfbedb188, max_len=1024,
append=0,
fmt=0xfd443f5c "Call rejected, CallToken Support required. If
unexpected, resolve by placing address %s in the calltokenignore list or
setting user %s requirecalltoken=no\n", ap=0xfbedb1f8 "###\b") at
utils.c:1779
https://issues.asterisk.org/view.php?id=4 0x080de87c in ast_log (level=4,
file=0xfd43ee1f "chan_iax2.c", line=0,
function=0xfd43df8e "handle_call_token", fmt=0xfbedb188
"8xP\b#####https://issues.asterisk.org/view.php?id=212\f")
at strings.h:631
https://issues.asterisk.org/view.php?id=5 0xfd424bd6 in handle_call_token
(fh=0x8508f68, ies=0xfbee0d74,
sin=0xfbee0ec4, fd=14) at chan_iax2.c:4600
======================================================================
----------------------------------------------------------------------
(0113381) bklang (reporter) - 2009-11-07 16:41
https://issues.asterisk.org/view.php?id=16206#c113381
----------------------------------------------------------------------
I have tried to dig a little further. On the Linux/x86_64 host, the
message logged is:
"[Nov 7 15:29:56] ERROR[6354]: chan_iax2.c:4600 handle_call_token: Call
rejected, CallToken Support required. If unexpected, resolve by placing
address 192.168.1.15 in the calltokenignore list or setting user (null)
requirecalltoken=no"
I suspect it is the "null" in the log message that is causing the crash on
Solaris. The null is coming from the variable ies->username. I don't know
if it's supposed to be null or not. I'm not terribly experienced with this
kind of troubleshooting, so I may be off base here.
Issue History
Date Modified Username Field Change
======================================================================
2009-11-07 16:41 bklang Note Added: 0113381
======================================================================
More information about the asterisk-bugs
mailing list