public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Richard Hughes <richard@hughsie.com>
To: git-commits@fedoraproject.org
Subject: [rpms/glib2] cve-2026-58016-f44: Backport a patch from master to stop gnome-settings-daemon crashing
Date: Tue, 11 Aug 2026 10:35:36 GMT	[thread overview]
Message-ID: <178644453649.1.9717234040572774241.rpms-glib2-5ccb823475db@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/glib2
Branch : cve-2026-58016-f44
Commit : 5ccb823475db01d83d1c562968ca022cf2edd2a6
Author : Richard Hughes <richard@hughsie.com>
Date   : 2013-12-09T08:42:03+00:00
Stats  : +95/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/glib2/c/5ccb823475db01d83d1c562968ca022cf2edd2a6?branch=cve-2026-58016-f44

Log:
Backport a patch from master to stop gnome-settings-daemon crashing

---
diff --git a/0001-GDBusObjectManagerClient-keep-the-manager-alive-whil.patch b/0001-GDBusObjectManagerClient-keep-the-manager-alive-whil.patch
new file mode 100644
index 0000000..65029f6
--- /dev/null
+++ b/0001-GDBusObjectManagerClient-keep-the-manager-alive-whil.patch
@@ -0,0 +1,87 @@
+From 1300108e0c50e70d5414c195649ad41419074e1a Mon Sep 17 00:00:00 2001
+From: Rui Matos <tiagomatos@gmail.com>
+Date: Wed, 27 Nov 2013 14:32:05 +0100
+Subject: [PATCH] GDBusObjectManagerClient: keep the manager alive while firing
+ signals
+
+Handlers for the signals we emit might unref the object manager. Make
+sure we keep it alive until we are done with it.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=719402
+---
+ gio/gdbusobjectmanagerclient.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/gio/gdbusobjectmanagerclient.c b/gio/gdbusobjectmanagerclient.c
+index d9ccf71..f33ca21 100644
+--- a/gio/gdbusobjectmanagerclient.c
++++ b/gio/gdbusobjectmanagerclient.c
+@@ -1006,6 +1006,7 @@ signal_cb (GDBusConnection *connection,
+ 
+   //g_debug ("yay, signal_cb %s %s: %s\n", signal_name, object_path, g_variant_print (parameters, TRUE));
+ 
++  g_object_ref (manager);
+   if (g_strcmp0 (interface_name, "org.freedesktop.DBus.Properties") == 0)
+     {
+       if (g_strcmp0 (signal_name, "PropertiesChanged") == 0)
+@@ -1087,6 +1088,7 @@ signal_cb (GDBusConnection *connection,
+           g_object_unref (interface);
+         }
+     }
++  g_object_unref (manager);
+ 
+  out:
+   g_clear_object (&object_proxy);
+@@ -1243,6 +1245,7 @@ on_notify_g_name_owner (GObject    *object,
+   new_name_owner = g_dbus_proxy_get_name_owner (manager->priv->control_proxy);
+   manager->priv->name_owner = NULL;
+ 
++  g_object_ref (manager);
+   if (g_strcmp0 (old_name_owner, new_name_owner) != 0)
+     {
+       GList *l;
+@@ -1319,6 +1322,7 @@ on_notify_g_name_owner (GObject    *object,
+ 
+     }
+   g_free (old_name_owner);
++  g_object_unref (manager);
+ }
+ 
+ static gboolean
+@@ -1543,6 +1547,7 @@ add_interfaces (GDBusObjectManagerClient *manager,
+   g_mutex_unlock (&manager->priv->lock);
+ 
+   /* now that we don't hold the lock any more, emit signals */
++  g_object_ref (manager);
+   for (l = interface_added_signals; l != NULL; l = l->next)
+     {
+       interface_proxy = G_DBUS_PROXY (l->data);
+@@ -1558,8 +1563,8 @@ add_interfaces (GDBusObjectManagerClient *manager,
+                            op);
+       g_signal_emit_by_name (manager, "object-added", op);
+     }
++  g_object_unref (manager);
+   g_object_unref (op);
+-
+ }
+ 
+ static void
+@@ -1592,6 +1597,7 @@ remove_interfaces (GDBusObjectManagerClient   *manager,
+   num_interfaces_to_remove = g_strv_length ((gchar **) interface_names);
+ 
+   /* see if we are going to completety remove the object */
++  g_object_ref (manager);
+   if (num_interfaces_to_remove == num_interfaces)
+     {
+       g_object_ref (op);
+@@ -1617,6 +1623,7 @@ remove_interfaces (GDBusObjectManagerClient   *manager,
+         }
+       g_object_unref (op);
+     }
++  g_object_unref (manager);
+  out:
+   ;
+ }
+-- 
+1.8.4.2
+

diff --git a/glib2.spec b/glib2.spec
index 267ea40..53f5480 100644
--- a/glib2.spec
+++ b/glib2.spec
@@ -3,13 +3,16 @@
 Summary: A library of handy utility functions
 Name: glib2
 Version: 2.39.1
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: LGPLv2+
 Group: System Environment/Libraries
 URL: http://www.gtk.org
 #VCS: git:git://git.gnome.org/glib
 Source: http://download.gnome.org/sources/glib/2.39/glib-%{version}.tar.xz
 
+# already upstream
+Patch0: 0001-GDBusObjectManagerClient-keep-the-manager-alive-whil.patch
+
 BuildRequires: pkgconfig
 BuildRequires: gettext
 BuildRequires: libattr-devel
@@ -75,6 +78,7 @@ the functionality of the installed glib2 package.
 
 %prep
 %setup -q -n glib-%{version}
+%patch0 -p1 -b fix-gsd
 
 # Workaround wrong gtk-doc.make timestamp
 # https://bugzilla.gnome.org/show_bug.cgi?id=700350
@@ -208,6 +212,9 @@ gio-querymodules-%{__isa_bits} %{_libdir}/gio/modules
 %{_datadir}/installed-tests
 
 %changelog
+* Mon Dec 09 2013 Richard Hughes <rhughes@redhat.com> - 2.39.1-2
+- Backport a patch from master to stop gnome-settings-daemon crashing.
+
 * Thu Nov 14 2013 Richard Hughes <rhughes@redhat.com> - 2.39.1-1
 - Update to 2.39.1
 

                 reply	other threads:[~2026-08-11 10:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178644453649.1.9717234040572774241.rpms-glib2-5ccb823475db@fedoraproject.org \
    --to=richard@hughsie.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox