public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Kalev Lember <klember@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/glib2] cve-2026-58016-f44: Update to 2.78.1
Date: Tue, 11 Aug 2026 10:38:04 GMT [thread overview]
Message-ID: <178644468458.1.9849695175561000421.rpms-glib2-79f461e49706@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/glib2
Branch : cve-2026-58016-f44
Commit : 79f461e497064703f2c00a64b0da4f4cefeb556b
Author : Kalev Lember <klember@redhat.com>
Date : 2023-10-26T17:52:46+02:00
Stats : +2/-138 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/glib2/c/79f461e497064703f2c00a64b0da4f4cefeb556b?branch=cve-2026-58016-f44
Log:
Update to 2.78.1
---
diff --git a/glib2.spec b/glib2.spec
index 50c25c6..cba116e 100644
--- a/glib2.spec
+++ b/glib2.spec
@@ -1,5 +1,5 @@
Name: glib2
-Version: 2.78.0
+Version: 2.78.1
Release: %autorelease
Summary: A library of handy utility functions
@@ -16,10 +16,6 @@ Patch: gnutls-hmac.patch
# the baremetal Docker is updated there i.e. lets be a little bit pragmatic...
Patch: gspawn-eperm.patch
-# https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3575
-# not released yet
-Patch: gthreadedresolver-race.patch
-
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: gettext
diff --git a/gthreadedresolver-race.patch b/gthreadedresolver-race.patch
deleted file mode 100644
index 911b78c..0000000
--- a/gthreadedresolver-race.patch
+++ /dev/null
@@ -1,132 +0,0 @@
-From 82c764ce2e42f0d1032627dabcbd742d5f2bd8fa Mon Sep 17 00:00:00 2001
-From: Philip Withnall <philip@tecnocode.co.uk>
-Date: Mon, 11 Sep 2023 16:02:15 +0100
-Subject: [PATCH] gthreadedresolver: Fix race between source callbacks and
- finalize
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-I had thought that because `g_source_destroy()` was called for the two
-sources (cancel and timeout) in the `GTask` finalize function for a
-threaded resolver operation, that it would be fine to use a plain
-pointer in the source callbacks to point to the `GTask`.
-
-That turns out to not be true: because the source callbacks are executed
-in the GLib worker thread, and the `GTask` can be finalized in another
-thread, it’s possible for a source callback (e.g. `cancelled_cb()`) to
-be scheduled in the worker thread, then for the `GTask` to be finalized,
-and then the source callback to continue execution and find itself
-doing a use-after-free.
-
-Fix that by using a weak ref to the `GTask` in the source callbacks,
-rather than a plain pointer.
-
-Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>
-
-Fixes: #3105
----
- gio/gthreadedresolver.c | 43 +++++++++++++++++++++++++++++++++++------
- 1 file changed, 37 insertions(+), 6 deletions(-)
-
-diff --git a/gio/gthreadedresolver.c b/gio/gthreadedresolver.c
-index 2d94531bfd..c7a567549f 100644
---- a/gio/gthreadedresolver.c
-+++ b/gio/gthreadedresolver.c
-@@ -1422,10 +1422,17 @@ lookup_records_finish (GResolver *resolver,
- static gboolean
- timeout_cb (gpointer user_data)
- {
-- GTask *task = G_TASK (user_data);
-- LookupData *data = g_task_get_task_data (task);
-+ GWeakRef *weak_task = user_data;
-+ GTask *task = NULL; /* (owned) */
-+ LookupData *data;
- gboolean should_return;
-
-+ task = g_weak_ref_get (weak_task);
-+ if (task == NULL)
-+ return G_SOURCE_REMOVE;
-+
-+ data = g_task_get_task_data (task);
-+
- g_mutex_lock (&data->lock);
-
- should_return = g_atomic_int_compare_and_exchange (&data->will_return, NOT_YET, TIMED_OUT);
-@@ -1443,6 +1450,8 @@ timeout_cb (gpointer user_data)
- g_cond_broadcast (&data->cond);
- g_mutex_unlock (&data->lock);
-
-+ g_object_unref (task);
-+
- return G_SOURCE_REMOVE;
- }
-
-@@ -1452,10 +1461,17 @@ static gboolean
- cancelled_cb (GCancellable *cancellable,
- gpointer user_data)
- {
-- GTask *task = G_TASK (user_data);
-- LookupData *data = g_task_get_task_data (task);
-+ GWeakRef *weak_task = user_data;
-+ GTask *task = NULL; /* (owned) */
-+ LookupData *data;
- gboolean should_return;
-
-+ task = g_weak_ref_get (weak_task);
-+ if (task == NULL)
-+ return G_SOURCE_REMOVE;
-+
-+ data = g_task_get_task_data (task);
-+
- g_mutex_lock (&data->lock);
-
- g_assert (g_cancellable_is_cancelled (cancellable));
-@@ -1473,9 +1489,18 @@ cancelled_cb (GCancellable *cancellable,
- g_cond_broadcast (&data->cond);
- g_mutex_unlock (&data->lock);
-
-+ g_object_unref (task);
-+
- return G_SOURCE_REMOVE;
- }
-
-+static void
-+weak_ref_clear_and_free (GWeakRef *weak_ref)
-+{
-+ g_weak_ref_clear (weak_ref);
-+ g_free (weak_ref);
-+}
-+
- static void
- run_task_in_thread_pool_async (GThreadedResolver *self,
- GTask *task)
-@@ -1490,17 +1515,23 @@ run_task_in_thread_pool_async (GThreadedResolver *self,
-
- if (timeout_ms != 0)
- {
-+ GWeakRef *weak_task = g_new0 (GWeakRef, 1);
-+ g_weak_ref_set (weak_task, task);
-+
- data->timeout_source = g_timeout_source_new (timeout_ms);
- g_source_set_static_name (data->timeout_source, "[gio] threaded resolver timeout");
-- g_source_set_callback (data->timeout_source, G_SOURCE_FUNC (timeout_cb), task, NULL);
-+ g_source_set_callback (data->timeout_source, G_SOURCE_FUNC (timeout_cb), g_steal_pointer (&weak_task), (GDestroyNotify) weak_ref_clear_and_free);
- g_source_attach (data->timeout_source, GLIB_PRIVATE_CALL (g_get_worker_context) ());
- }
-
- if (cancellable != NULL)
- {
-+ GWeakRef *weak_task = g_new0 (GWeakRef, 1);
-+ g_weak_ref_set (weak_task, task);
-+
- data->cancellable_source = g_cancellable_source_new (cancellable);
- g_source_set_static_name (data->cancellable_source, "[gio] threaded resolver cancellable");
-- g_source_set_callback (data->cancellable_source, G_SOURCE_FUNC (cancelled_cb), task, NULL);
-+ g_source_set_callback (data->cancellable_source, G_SOURCE_FUNC (cancelled_cb), g_steal_pointer (&weak_task), (GDestroyNotify) weak_ref_clear_and_free);
- g_source_attach (data->cancellable_source, GLIB_PRIVATE_CALL (g_get_worker_context) ());
- }
-
---
-GitLab
-
diff --git a/sources b/sources
index 1b07ded..cae84fc 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (glib-2.78.0.tar.xz) = 3d06890002f4b13f831c83fbb70cfce529f9750e30888619e4d6277116be15d106379a03143412cf4b2a289c0cbdbbc299ecf17284fbffc06c791ecf7556c765
+SHA512 (glib-2.78.1.tar.xz) = aa9ed9195951b00ac8221e958ea337fbda82621a862ef8f29dc2ea396a6253ce51c2a0a498dfa4e12642f1836f85f9564f09991979ae85c5ed4368355d857376
reply other threads:[~2026-08-11 10:38 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=178644468458.1.9849695175561000421.rpms-glib2-79f461e49706@fedoraproject.org \
--to=klember@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