[Pkg-voip-commits] r10121 - in /asterisk/trunk/debian: changelog patches/fix_xmpp_19532 patches/series

tzafrir at alioth.debian.org tzafrir at alioth.debian.org
Thu Mar 28 07:06:08 UTC 2013


Author: tzafrir
Date: Thu Mar 28 07:06:07 2013
New Revision: 10121

URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=10121
Log:
Patch fix_xmpp_19532: fix a crash of the XMPP code (Closes: #545272).

Added:
    asterisk/trunk/debian/patches/fix_xmpp_19532
Modified:
    asterisk/trunk/debian/changelog
    asterisk/trunk/debian/patches/series

Modified: asterisk/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/changelog?rev=10121&op=diff
==============================================================================
--- asterisk/trunk/debian/changelog (original)
+++ asterisk/trunk/debian/changelog Thu Mar 28 07:06:07 2013
@@ -10,6 +10,7 @@
       Exploitation of Device State Caching
   * Patch powerpcspe: Fix OSARCH for powerpcspe (Closes: #701505).
   * README.Debian: document running the testsuite. 
+  * Patch fix_xmpp_19532: fix a crash of the XMPP code (Closes: #545272).
 
  -- Tzafrir Cohen <tzafrir at debian.org>  Tue, 08 Jan 2013 00:06:09 +0200
 

Added: asterisk/trunk/debian/patches/fix_xmpp_19532
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/fix_xmpp_19532?rev=10121&op=file
==============================================================================
--- asterisk/trunk/debian/patches/fix_xmpp_19532 (added)
+++ asterisk/trunk/debian/patches/fix_xmpp_19532 Thu Mar 28 07:06:07 2013
@@ -1,0 +1,52 @@
+From 519d65096a6a5c6702f194c29da45140ce698c01 Mon Sep 17 00:00:00 2001
+From: Matthew Jordan <mjordan at digium.com>
+Date: Thu, 4 Oct 2012 02:09:43 +0000
+Subject: Check for presence of buddy in info/dinfo handlers
+Bug: https://issues.asterisk.org/jira/browse/ASTERISK-19532
+Origin: http://svnview.digium.com/svn/asterisk?view=rev&rev=374335
+
+The res_jabber resource module uses the ASTOBJ library for managing its ref
+counted objects.  After calling ASTOBJ_CONTAINER_FIND to locate a buddy object,
+the pointer to the object has to be checked to see if the buddy existed.
+Prior to this patch, the buddy object was not checked for NULL; with this patch
+in both aji_client_info_handler and aji_dinfo_handler the pointer is checked
+before used and, if no buddy object was found, the handlers return an error
+code.
+
+---
+ res/res_jabber.c |   12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/res/res_jabber.c b/res/res_jabber.c
+index 764ec6d..7d4eb66 100644
+--- a/res/res_jabber.c
++++ b/res/res_jabber.c
+@@ -2004,6 +2004,12 @@ static int aji_client_info_handler(void *data, ikspak *pak)
+ 	struct aji_resource *resource = NULL;
+ 	struct aji_buddy *buddy = ASTOBJ_CONTAINER_FIND(&client->buddies, pak->from->partial);
+ 
++	if (!buddy) {
++		ast_log(LOG_NOTICE, "JABBER: Received client info from unknown buddy: %s.\n", pak->from->full);
++		ASTOBJ_UNREF(client, ast_aji_client_destroy);
++		return IKS_FILTER_EAT;
++	}
++
+ 	resource = aji_find_resource(buddy, pak->from->resource);
+ 	if (pak->subtype == IKS_TYPE_RESULT) {
+ 		if (!resource) {
+@@ -2071,6 +2077,12 @@ static int aji_dinfo_handler(void *data, ikspak *pak)
+ 	struct aji_resource *resource = NULL;
+ 	struct aji_buddy *buddy = ASTOBJ_CONTAINER_FIND(&client->buddies, pak->from->partial);
+ 
++	if (!buddy) {
++		ast_log(LOG_NOTICE, "JABBER: Received client info from unknown buddy: %s.\n", pak->from->full);
++		ASTOBJ_UNREF(client, ast_aji_client_destroy);
++		return IKS_FILTER_EAT;
++	}
++
+ 	if (pak->subtype == IKS_TYPE_ERROR) {
+ 		ast_log(LOG_WARNING, "Received error from a client, turn on jabber debug!\n");
+ 		ASTOBJ_UNREF(client, ast_aji_client_destroy);
+-- 
+1.7.10.4
+

Modified: asterisk/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/series?rev=10121&op=diff
==============================================================================
--- asterisk/trunk/debian/patches/series (original)
+++ asterisk/trunk/debian/patches/series Thu Mar 28 07:06:07 2013
@@ -34,3 +34,4 @@
 AST-2012-014
 AST-2012-015
 powerpcspe
+fix_xmpp_19532




More information about the Pkg-voip-commits mailing list