public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Adam Williamson <awilliam@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/glib2] cve-2026-58016-f44: Backport PR #2784 to fix `weak_locations != NULL` crashes
Date: Tue, 11 Aug 2026 10:37:42 GMT [thread overview]
Message-ID: <178644466268.1.11068179747379810909.rpms-glib2-5cfc8d9d4fe3@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/glib2
Branch : cve-2026-58016-f44
Commit : 5cfc8d9d4fe3abf46d103c85d9b6e2fc457b671e
Author : Adam Williamson <awilliam@redhat.com>
Date : 2022-06-28T16:54:11-07:00
Stats : +68/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/glib2/c/5cfc8d9d4fe3abf46d103c85d9b6e2fc457b671e?branch=cve-2026-58016-f44
Log:
Backport PR #2784 to fix `weak_locations != NULL` crashes
---
diff --git a/2784.patch b/2784.patch
new file mode 100644
index 0000000..093cfd9
--- /dev/null
+++ b/2784.patch
@@ -0,0 +1,63 @@
+From d4043eced5c7f21b1a4942b305f9ded127cbdb83 Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv@debian.org>
+Date: Sun, 26 Jun 2022 12:04:32 +0100
+Subject: [PATCH] Revert "gobject: Use g_datalist_id_remove_multiple"
+
+This reverts commit fa8c7c0 "gobject: Use g_datalist_id_remove_multiple"
+(or more specifically the parts of it that were not already reverted
+in 01ac1d9 "gobject: Fix crash when disposing a GtkAccelGroup".
+
+Workaround for https://gitlab.gnome.org/GNOME/glib/-/issues/2676
+
+Bug: https://gitlab.gnome.org/GNOME/glib/-/issues/2676
+---
+ gobject/gobject.c | 24 ++++++------------------
+ 1 file changed, 6 insertions(+), 18 deletions(-)
+
+diff --git a/gobject/gobject.c b/gobject/gobject.c
+index 5ba8fd017b..1c6bfedfae 100644
+--- a/gobject/gobject.c
++++ b/gobject/gobject.c
+@@ -1353,17 +1353,10 @@ g_object_do_get_property (GObject *object,
+ static void
+ g_object_real_dispose (GObject *object)
+ {
+- GQuark keys[3] = {
+- quark_closure_array,
+- quark_weak_refs,
+- quark_weak_locations,
+- };
+-
+ g_signal_handlers_destroy (object);
+- /* FIXME: This should be simplified down to a single remove_multiple() call.
+- * See https://gitlab.gnome.org/GNOME/glib/-/issues/2672 */
+- g_datalist_id_remove_multiple (&object->qdata, keys, 1);
+- g_datalist_id_remove_multiple (&object->qdata, keys + 1, 2);
++ g_datalist_id_set_data (&object->qdata, quark_closure_array, NULL);
++ g_datalist_id_set_data (&object->qdata, quark_weak_refs, NULL);
++ g_datalist_id_set_data (&object->qdata, quark_weak_locations, NULL);
+ }
+
+ #ifdef G_ENABLE_DEBUG
+@@ -3888,15 +3881,10 @@ g_object_unref (gpointer _object)
+ }
+
+ /* we are still in the process of taking away the last ref */
++ g_datalist_id_set_data (&object->qdata, quark_closure_array, NULL);
+ g_signal_handlers_destroy (object);
+- {
+- GQuark keys[3] = {
+- quark_closure_array,
+- quark_weak_refs,
+- quark_weak_locations,
+- };
+- g_datalist_id_remove_multiple (&object->qdata, keys, G_N_ELEMENTS (keys));
+- }
++ g_datalist_id_set_data (&object->qdata, quark_weak_refs, NULL);
++ g_datalist_id_set_data (&object->qdata, quark_weak_locations, NULL);
+
+ /* decrement the last reference */
+ old_ref = g_atomic_int_add (&object->ref_count, -1);
+--
+GitLab
+
diff --git a/glib2.spec b/glib2.spec
index 39fa628..9c75602 100644
--- a/glib2.spec
+++ b/glib2.spec
@@ -17,6 +17,11 @@ Patch0: gnutls-hmac.patch
# Proposed upstream at https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1596
Patch1: gdesktopappinfo.patch
+# Revert parts of a commit to avoid "weak_locations != NULL" crashes:
+# https://gitlab.gnome.org/GNOME/glib/-/issues/2676
+# https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2784
+Patch2: 2784.patch
+
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: gettext
reply other threads:[~2026-08-11 10:37 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=178644466268.1.11068179747379810909.rpms-glib2-5cfc8d9d4fe3@fedoraproject.org \
--to=awilliam@redhat.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