Package: release.debian.org Severity: normal Tags: buster User: release.debian....@packages.debian.org Usertags: pu
Another in the ongoing series of "get fixes for buster's GNOME 3.30 backported from unstable before GNOME 3.34 transitions start landing". The only functional change in this one is to fix a use-after-free crash when a BluetoothClient is repeatedly allocated and freed. This is most problematic in practice when a GNOME Shell user installs gnome-shell-extension-bluetooth-quick-connect, either as a Debian package, from extensions.gnome.org or directly from its upstream source code. I haven't backported the whole upstream gnome-3-28 branch this time because there are more commits there than I was hoping for, and I'd find it hard to justify them all as minimal fixes. Thanks, smcv
diffstat for gnome-bluetooth-3.28.2 gnome-bluetooth-3.28.2 changelog | 21 +++ gbp.conf | 2 patches/client-Disconnect-all-signal-handlers-when-client-is-disp.patch | 70 ++++++++++ patches/series | 1 4 files changed, 93 insertions(+), 1 deletion(-) diff -Nru gnome-bluetooth-3.28.2/debian/changelog gnome-bluetooth-3.28.2/debian/changelog --- gnome-bluetooth-3.28.2/debian/changelog 2018-12-23 14:46:03.000000000 +0000 +++ gnome-bluetooth-3.28.2/debian/changelog 2019-08-26 11:11:19.000000000 +0100 @@ -1,3 +1,24 @@ +gnome-bluetooth (3.28.2-4~deb10u1) buster; urgency=medium + + * Team upload + * d/p/client-Disconnect-all-signal-handlers-when-client-is-disp.patch: + Mark as applied upstream for 3.33.91 + * d/gbp.conf: Set packaging branch to debian/buster + * Rebuild for buster + + -- Simon McVittie <s...@debian.org> Mon, 26 Aug 2019 11:11:19 +0100 + +gnome-bluetooth (3.28.2-4) unstable; urgency=medium + + * Team upload + * d/p/client-Disconnect-all-signal-handlers-when-client-is-disp.patch: + Add proposed patch to avoid GNOME Shell crashes when + gnome-shell-extension-bluetooth-quick-connect is used + (Closes: #932405) + * d/gbp.conf: Set Debian branch to debian/unstable + + -- Simon McVittie <s...@debian.org> Sun, 18 Aug 2019 15:21:00 +0100 + gnome-bluetooth (3.28.2-3) unstable; urgency=medium * Restore -Wl,-O1 to our LDFLAGS diff -Nru gnome-bluetooth-3.28.2/debian/gbp.conf gnome-bluetooth-3.28.2/debian/gbp.conf --- gnome-bluetooth-3.28.2/debian/gbp.conf 2018-12-23 14:46:03.000000000 +0000 +++ gnome-bluetooth-3.28.2/debian/gbp.conf 2019-08-26 11:11:19.000000000 +0100 @@ -1,6 +1,6 @@ [DEFAULT] pristine-tar = True -debian-branch = debian/master +debian-branch = debian/buster upstream-branch = upstream/latest [buildpackage] diff -Nru gnome-bluetooth-3.28.2/debian/patches/client-Disconnect-all-signal-handlers-when-client-is-disp.patch gnome-bluetooth-3.28.2/debian/patches/client-Disconnect-all-signal-handlers-when-client-is-disp.patch --- gnome-bluetooth-3.28.2/debian/patches/client-Disconnect-all-signal-handlers-when-client-is-disp.patch 1970-01-01 01:00:00.000000000 +0100 +++ gnome-bluetooth-3.28.2/debian/patches/client-Disconnect-all-signal-handlers-when-client-is-disp.patch 2019-08-26 11:11:19.000000000 +0100 @@ -0,0 +1,70 @@ +From: Simon McVittie <s...@debian.org> +Date: Tue, 13 Aug 2019 15:53:49 +0100 +Subject: client: Disconnect all signal handlers when client is disposed + +I've encountered an intermittent GNOME Shell crash when needrestart[1] +is allowed to restart system services that are using outdated shared +libraries, which sometimes includes BlueZ. The crash seems to involve +signals being delivered to a freed BluetoothClient, which can be avoided +by using g_signal_connect_object(). I haven't encountered the crash +since applying this change, although since it was always intermittent +I cannot be sure that it is fully solved. + +This might be caused by using the Bluetooth Quick Connect shell +extension[2], which will create and destroy a BluetoothClient when the +extension is loaded and unloaded, which will in turn happen when the +screen is locked (due to extensions being disabled in the lock screen). + +[1] https://github.com/liske/needrestart +[2] https://extensions.gnome.org/extension/1401/bluetooth-quick-connect/ + +Signed-off-by: Simon McVittie <s...@debian.org> +Bug-Debian: https://bugs.debian.org/932405 +Forwarded: https://gitlab.gnome.org/GNOME/gnome-bluetooth/merge_requests/17 +Applied-upstream: 3.33.91, commit:9c94e30c +--- + lib/bluetooth-client.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/lib/bluetooth-client.c b/lib/bluetooth-client.c +index 0be5089..2c039b3 100644 +--- a/lib/bluetooth-client.c ++++ b/lib/bluetooth-client.c +@@ -392,8 +392,8 @@ device_added (GDBusObjectManager *manager, + BluetoothType type; + GtkTreeIter iter, parent; + +- g_signal_connect (G_OBJECT (device), "notify", +- G_CALLBACK (device_notify_cb), client); ++ g_signal_connect_object (G_OBJECT (device), "notify", ++ G_CALLBACK (device_notify_cb), client, 0); + + adapter_path = device1_get_adapter (device); + address = device1_get_address (device); +@@ -608,8 +608,8 @@ adapter_added (GDBusObjectManager *manager, + const gchar *address, *name; + gboolean discovering, discoverable, powered; + +- g_signal_connect (G_OBJECT (adapter), "notify", +- G_CALLBACK (adapter_notify_cb), client); ++ g_signal_connect_object (G_OBJECT (adapter), "notify", ++ G_CALLBACK (adapter_notify_cb), client, 0); + + address = adapter1_get_address (adapter); + name = adapter1_get_name (adapter); +@@ -798,11 +798,11 @@ object_manager_new_callback(GObject *source_object, + priv = BLUETOOTH_CLIENT_GET_PRIVATE(client); + priv->manager = manager; + +- g_signal_connect (G_OBJECT (priv->manager), "interface-added", (GCallback) interface_added, client); +- g_signal_connect (G_OBJECT (priv->manager), "interface-removed", (GCallback) interface_removed, client); ++ g_signal_connect_object (G_OBJECT (priv->manager), "interface-added", (GCallback) interface_added, client, 0); ++ g_signal_connect_object (G_OBJECT (priv->manager), "interface-removed", (GCallback) interface_removed, client, 0); + +- g_signal_connect (G_OBJECT (priv->manager), "object-added", (GCallback) object_added, client); +- g_signal_connect (G_OBJECT (priv->manager), "object-removed", (GCallback) object_removed, client); ++ g_signal_connect_object (G_OBJECT (priv->manager), "object-added", (GCallback) object_added, client, 0); ++ g_signal_connect_object (G_OBJECT (priv->manager), "object-removed", (GCallback) object_removed, client, 0); + + object_list = g_dbus_object_manager_get_objects (priv->manager); + diff -Nru gnome-bluetooth-3.28.2/debian/patches/series gnome-bluetooth-3.28.2/debian/patches/series --- gnome-bluetooth-3.28.2/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ gnome-bluetooth-3.28.2/debian/patches/series 2019-08-26 11:11:19.000000000 +0100 @@ -0,0 +1 @@ +client-Disconnect-all-signal-handlers-when-client-is-disp.patch