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

Bug#977172: buster-pu: package qxmpp/1.0.0-4+deb10u1



Package: release.debian.org
Severity: normal
Tags: buster
User: release.debian.org@packages.debian.org
Usertags: pu


Dear release team,

I would like to push a fix for potential SEGFAULT on connection error in qxmpp
library. Proposed patch is well tested in Debian unstable since qxmpp/1.0.0-5.

Debdiff is attached.

Please consider accepting this as a buster-pu.

Thanks,
Boris
diff -Nru qxmpp-1.0.0/debian/changelog qxmpp-1.0.0/debian/changelog
--- qxmpp-1.0.0/debian/changelog	2019-01-19 21:56:20.000000000 +0300
+++ qxmpp-1.0.0/debian/changelog	2020-12-12 04:33:07.000000000 +0300
@@ -1,3 +1,10 @@
+qxmpp (1.0.0-4+deb10u1) buster; urgency=medium
+
+  * Add patch fix-segfault-on-connection-error:
+    fixes potential SEGFAULT on connection error.
+
+ -- Boris Pek <tehnick@debian.org>  Sat, 12 Dec 2020 04:33:07 +0300
+
 qxmpp (1.0.0-4) unstable; urgency=medium
 
   * Update debian/control:
diff -Nru qxmpp-1.0.0/debian/patches/fix-segfault-on-connection-error.patch qxmpp-1.0.0/debian/patches/fix-segfault-on-connection-error.patch
--- qxmpp-1.0.0/debian/patches/fix-segfault-on-connection-error.patch	1970-01-01 03:00:00.000000000 +0300
+++ qxmpp-1.0.0/debian/patches/fix-segfault-on-connection-error.patch	2020-12-12 04:15:35.000000000 +0300
@@ -0,0 +1,31 @@
+Description: Fix potential SEGFAULT on connection error
+ `socketError()` calls `connectToNextDNSHost()` which might cause
+ `socketError()` synchronously (and recursively), thus not giving a
+ change for updating `nextSrvRecordIdx`.
+ .
+ Overall, this results in attempting to connect to the same DNS record
+ recursively, until the stack is exhausted, resulting in SEGFAULT.
+ .
+ One of the solutions (done in this commit) is to increment the record
+ index _before_ attempting to connect.
+Origin: upstream, https://github.com/qxmpp-project/qxmpp/commit/daa03c8e
+Last-Update: 2019-10-12
+
+
+--- a/src/client/QXmppOutgoingClient.cpp
++++ b/src/client/QXmppOutgoingClient.cpp
+@@ -165,11 +165,10 @@
+ 
+ void QXmppOutgoingClientPrivate::connectToNextDNSHost()
+ {
++    auto curIdx = nextSrvRecordIdx++;
+     connectToHost(
+-        dns.serviceRecords().at(nextSrvRecordIdx).target(),
+-        dns.serviceRecords().at(nextSrvRecordIdx).port());
+-
+-    nextSrvRecordIdx++;
++        dns.serviceRecords().at(curIdx).target(),
++        dns.serviceRecords().at(curIdx).port());
+ }
+ 
+ /// Constructs an outgoing client stream.
diff -Nru qxmpp-1.0.0/debian/patches/series qxmpp-1.0.0/debian/patches/series
--- qxmpp-1.0.0/debian/patches/series	2019-01-19 21:56:19.000000000 +0300
+++ qxmpp-1.0.0/debian/patches/series	2020-12-12 04:15:35.000000000 +0300
@@ -1 +1,2 @@
 bump-SONAME.patch
+fix-segfault-on-connection-error.patch

Reply to: