[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#703233: unblock: resiprocate - crash issue fixed



Package: release.debian.org
Severity: normal

There are two fixes, both using patches backported from the upstream
release branch

One of the issues is marked serious because it causes the process to
stop in certain situations.

The other is marked as important because it causes incompatibility with
FreeSWITCH PBXes


diff -Nru resiprocate-1.8.5/debian/changelog resiprocate-1.8.5/debian/changelog
--- resiprocate-1.8.5/debian/changelog	2012-08-08 15:02:29.000000000 +0200
+++ resiprocate-1.8.5/debian/changelog	2013-03-17 12:33:44.000000000 +0100
@@ -1,3 +1,10 @@
+resiprocate (1.8.5-2) unstable; urgency=low
+
+  * Remove proxy-auth headers after validating them (Closes: #697341)
+  * Discard repeated requests over reliable transport (Closes: #703232)
+
+ -- Daniel Pocock <daniel@pocock.com.au>  Sun, 17 Mar 2013 12:30:47 +0100
+
 resiprocate (1.8.5-1) unstable; urgency=low
 
   * New upstream release
@@ -7,7 +14,6 @@
   * Fix support for multiple ENUM carriers
   * Fix issue with help text causing crash
   * Fix clash between DIGEST and mutual TLS when used concurrently
-  * Proposed for wheezy unblock (Closes: #681387)
 
  -- Daniel Pocock <daniel@pocock.com.au>  Wed, 08 Aug 2012 15:02:03 +0200
 
diff -Nru resiprocate-1.8.5/debian/patches/0001-remove-Proxy-Authorization-headers-for-successful-Di.patch resiprocate-1.8.5/debian/patches/0001-remove-Proxy-Authorization-headers-for-successful-Di.patch
--- resiprocate-1.8.5/debian/patches/0001-remove-Proxy-Authorization-headers-for-successful-Di.patch	1970-01-01 01:00:00.000000000 +0100
+++ resiprocate-1.8.5/debian/patches/0001-remove-Proxy-Authorization-headers-for-successful-Di.patch	2013-03-17 12:28:37.000000000 +0100
@@ -0,0 +1,61 @@
+From: Daniel Pocock <daniel@pocock.com.au>
+Date: Sun, 17 Mar 2013 12:09:48 +0100
+Subject: remove Proxy-Authorization headers for successful Digest Challenges
+ before forwarding message (closes: #697341) (upstream: r9886, fixed
+ in v1.8.6)
+
+---
+ repro/monkeys/DigestAuthenticator.cxx |   29 ++++++++++++++++-------------
+ 1 file changed, 16 insertions(+), 13 deletions(-)
+
+diff --git a/repro/monkeys/DigestAuthenticator.cxx b/repro/monkeys/DigestAuthenticator.cxx
+index c3a8af3..fbaa5e9 100644
+--- a/repro/monkeys/DigestAuthenticator.cxx
++++ b/repro/monkeys/DigestAuthenticator.cxx
+@@ -116,7 +116,6 @@ DigestAuthenticator::process(repro::RequestContext &rc)
+       pair<Helper::AuthResult,Data> result =
+          Helper::advancedAuthenticateRequest(*sipMessage, realm, a1, 3000); // was 15
+ 
+-//      Auths &authHeaders = sipMessage->header(h_ProxyAuthorizations);
+       switch (result.first)
+       {
+          case Helper::Failed:
+@@ -135,22 +134,26 @@ DigestAuthenticator::process(repro::RequestContext &rc)
+             
+             // Delete the Proxy-Auth header for this realm.  
+             // other Proxy-Auth headers might be needed by a downsteram node
+-/*            
+-            Auths::iterator i = authHeaders.begin();
+-            Auths::iterator j = authHeaders.begin();
+-            while( i != authHeaders.end() )
++            if (sipMessage->exists(h_ProxyAuthorizations))
+             {
+-               if (proxy.isMyDomain(i->param(p_realm)))
+-               {
+-                  j = i++;
+-                  authHeaders.erase(j);
+-               }
+-               else
++               Auths &authHeaders = sipMessage->header(h_ProxyAuthorizations);
++               Data realm = getRealm(rc);
++         
++               // if we find a Proxy-Authorization header for a realm we handle, 
++               // asynchronously fetch the relevant userAuthInfo from the database
++               for (Auths::iterator i = authHeaders.begin(); i != authHeaders.end(); )
+                {
+-                  ++i;
++                  if(i->exists(p_realm) && isEqualNoCase(i->param(p_realm), realm))
++                  {
++                     i = authHeaders.erase(i);
++                  }
++                  else
++                  {
++                     ++i;
++                  }
+                }
+             }
+-*/            
++
+             if(!sipMessage->header(h_From).isWellFormed() ||
+                sipMessage->header(h_From).isAllContacts())
+             {
diff -Nru resiprocate-1.8.5/debian/patches/0002-discard-repeated-requests-received-over-reliable-tra.patch resiprocate-1.8.5/debian/patches/0002-discard-repeated-requests-received-over-reliable-tra.patch
--- resiprocate-1.8.5/debian/patches/0002-discard-repeated-requests-received-over-reliable-tra.patch	1970-01-01 01:00:00.000000000 +0100
+++ resiprocate-1.8.5/debian/patches/0002-discard-repeated-requests-received-over-reliable-tra.patch	2013-03-17 12:28:37.000000000 +0100
@@ -0,0 +1,37 @@
+From: Daniel Pocock <daniel@pocock.com.au>
+Date: Sun, 17 Mar 2013 12:28:31 +0100
+Subject: discard repeated requests received over reliable transports (closes:
+ #703232) (upstream: r9998, fixed in v1.8.7)
+
+---
+ resip/stack/TransactionState.cxx |   17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/resip/stack/TransactionState.cxx b/resip/stack/TransactionState.cxx
+index 868b4a3..deca715 100644
+--- a/resip/stack/TransactionState.cxx
++++ b/resip/stack/TransactionState.cxx
+@@ -699,6 +699,23 @@ TransactionState::process(TransactionController& controller,
+             }
+             break;
+       }
++
++      // .bwc. in private email 1 Feb 2013:
++      // According to the spec, there is no such thing as a reliable NIT
++      // retransmission; what we have just observed is a transaction id collision
++      // technically. Maybe a reliable NIT transaction collision needs special
++      // handling? It is probably a lot more common that this is a confused client,
++      // than a client that has innocently used the same tid as some other client,
++      // though. Maybe we should just ignore such requests?
++      if(sip->isExternal() && sip->isRequest() &&
++         method != ACK &&
++         state->mIsReliable)
++      {
++         InfoLog(<<"Someone sent us a request with a repeated transaction ID "
++                     "over a reliable transport.  Discarding the request.");
++         delete sip;
++         return;
++      }
+    }
+ 
+    if (state) // found transaction for sip msg
diff -Nru resiprocate-1.8.5/debian/patches/series resiprocate-1.8.5/debian/patches/series
--- resiprocate-1.8.5/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ resiprocate-1.8.5/debian/patches/series	2013-03-17 12:28:37.000000000 +0100
@@ -0,0 +1,2 @@
+0001-remove-Proxy-Authorization-headers-for-successful-Di.patch
+0002-discard-repeated-requests-received-over-reliable-tra.patch

Reply to: