Bug#705425: asterisk: segmentation fault on start after upgrade from 1:1.8.13.1~dfsg-1 to 1:1.8.13.1~dfsg-3 (wheezy amd64)

Christian Staake staaki at bbg.xssoft.de
Wed Apr 17 08:33:04 UTC 2013


On 2013-04-14 21:10, Christian Lauinger wrote:
> dpkg -l asterisk*
> ii  asterisk                                 1:1.8.13.1~dfsg-3         amd64    Open Source Private Branch Exchange (PBX)
> ii  asterisk-chan-capi                       1.1.6-1                   amd64    Common ISDN API 2.0 implementation for Asterisk

Hi Christian,

It seems you are using asterisk-chan-capi which is not even in wheezy...

I had the same problem as you: Because I am still running squeeze, I had 
to use the asterisk version available from squeeze-backports (still at 
1:1.8.13.1~dfsg-1~bpo60+1).
In order to use chan_capi with it, I backported asterisk-chan-capi from 
unstable (1.1.6-1) in my private repository.
Then asterisk 1:1.8.13.1~dfsg-2 became available and I backported that 
too and after installation: boom, segfault when loading chan_capi. :(

The problem now is that the fix in asterisk for CVE-2012-5977 introduced 
an incompatible change in the module API. All stock asterisk modules 
were of course updated, but the out-of-tree modules like chan_capi were not.
Because of bug #694793 (or, more precisely, #694805) the package 
management system doesn't know about this incompatibility.

What you need is a new (yet unreleased) version of chan_capi with a 
(rather simple) fix taken from the chan_capi svn repository (see 
attached patch).
If you're really desperate, you can try to build the package yourself 
from my backported source package at 
http://www.bbg.xssoft.de/debian/pool/main/asterisk/asterisk-chan-capi_1.1.6-1~bpo60+2.dsc 

This is just my private repository, so it only has binary builds for 
squeeze on i386.

-- 
So long,
Christian.
-------------- next part --------------
Description: Adapt to new cache argument for ast_devstate_changed()

Index: chan_capi_devstate.c
===================================================================
--- a/chan_capi_devstate.c	(revision 957)
+++ b/chan_capi_devstate.c	(working copy)
@@ -113,7 +113,11 @@
 {
 	if (capiChatProviderRegistered != 0) {
 #ifdef CC_AST_HAS_VERSION_1_6
-		ast_devstate_changed((inUse != 0) ? AST_DEVICE_INUSE : AST_DEVICE_NOT_INUSE, "capichat:%s", roomName);
+		ast_devstate_changed((inUse != 0) ? AST_DEVICE_INUSE : AST_DEVICE_NOT_INUSE,
+#ifdef CC_AST_HAS_AST_DEVSTATE_CACHE
+			AST_DEVSTATE_CACHABLE,
+#endif
+			"capichat:%s", roomName);
 #else
 		ast_device_state_changed("capichat:%s", roomName);
 #endif
@@ -130,7 +134,11 @@
 			((capiController->nfreebchannels >= capiController->nfreebchannelsHardThr) &&
 				(capiController->nfreebchannels - channelsChanged < capiController->nfreebchannelsHardThr))) {
 #ifdef CC_AST_HAS_VERSION_1_6
-		ast_devstate_changed(AST_DEVICE_UNKNOWN, CC_MESSAGE_BIGNAME"/I%d/congestion", capiController->controller);
+		ast_devstate_changed(AST_DEVICE_UNKNOWN,
+#ifdef CC_AST_HAS_AST_DEVSTATE_CACHE
+			AST_DEVSTATE_CACHABLE,
+#endif
+			CC_MESSAGE_BIGNAME"/I%d/congestion", capiController->controller);
 #else
 		ast_device_state_changed (CC_MESSAGE_BIGNAME"/I%d/congestion", capiController->controller);
 #endif
Index: create_config.sh
===================================================================
--- a/create_config.sh	(revision 957)
+++ b/create_config.sh	(working copy)
@@ -205,6 +205,13 @@
 		echo "#undef CC_AST_HAS_AST_DEVSTATE2STR" >>$CONFIGFILE
 		echo " * obsolete devstate2str function"
 	fi
+	if grep -q "ast_devstate_changed.*ast_devstate_cache" $INCLUDEDIR/devicestate.h; then
+		echo "#define CC_AST_HAS_AST_DEVSTATE_CACHE" >>$CONFIGFILE
+		echo " * found ast_devstate_cache in ast_devstate_changed function"
+	else
+		echo "#undef CC_AST_HAS_AST_DEVSTATE_CACHE" >>$CONFIGFILE
+		echo " * no ast_devstate_cache in ast_devstate_changed function"
+	fi
 	if grep -q "ast_request.*requestor" $INCLUDEDIR/channel.h; then
 		echo "#define CC_AST_HAS_REQUEST_REQUESTOR" >>$CONFIGFILE
 		echo " * found requestor in ast_request"
Index: CHANGES
===================================================================
--- a/CHANGES	(revision 957)
+++ b/CHANGES	(working copy)
@@ -1,6 +1,11 @@
 CHANGES
 =======
 
+HEAD
+------------------
+- ast_devstate_changed() changes with new cache argument
+
+
 chan_capi-1.1.6
 ------------------
 - Asterisk 1.8 changes


More information about the Pkg-voip-maintainers mailing list