Compare commits

..

No commits in common. "c8" and "c8s" have entirely different histories.
c8 ... c8s

42 changed files with 175 additions and 3 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/glib-2.56.4.tar.xz
/glib-2.*.tar.xz

View File

@ -1 +0,0 @@
4064eb1eb5ff626c211e86bc939f8b743ceafaba SOURCES/glib-2.56.4.tar.xz

47
569.patch Normal file
View File

@ -0,0 +1,47 @@
From 4ef58e5661849317a1110c9b93957f2c608677dd Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Thu, 3 Jan 2019 08:21:40 +0000
Subject: [PATCH 2/2] gvariant test: Also force alignment for tuple test data
glib!552 (commit 9eed22b3) fixed this for the tests that failed on i686,
but this additional test failed on Debian's s390x port
(IBM z/Architecture, 64-bit big-endian).
Signed-off-by: Simon McVittie <smcv@collabora.com>
---
glib/tests/gvariant.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/glib/tests/gvariant.c b/glib/tests/gvariant.c
index a7b19826d..c4a996c1f 100644
--- a/glib/tests/gvariant.c
+++ b/glib/tests/gvariant.c
@@ -4820,6 +4820,7 @@ test_normal_checking_array_offsets (void)
static void
test_normal_checking_tuple_offsets (void)
{
+ gpointer aligned_data;
const guint8 data[] = {
0x07, 0xe5, 0x00, 0x07, 0x00, 0x07,
'(', 'a', 's', 'a', 's', 'a', 's', 'a', 's', 'a', 's', 'a', 's', ')',
@@ -4828,13 +4829,15 @@ test_normal_checking_tuple_offsets (void)
GVariant *variant = NULL;
GVariant *normal_variant = NULL;
- variant = g_variant_new_from_data (G_VARIANT_TYPE_VARIANT, data, size,
- FALSE, NULL, NULL);
+ aligned_data = g_memdup (data, size); /* guarantee alignment */
+ variant = g_variant_new_from_data (G_VARIANT_TYPE_VARIANT, aligned_data,
+ size, FALSE, NULL, NULL);
g_assert_nonnull (variant);
normal_variant = g_variant_get_normal_form (variant);
g_assert_nonnull (normal_variant);
+ g_free (aligned_data);
g_variant_unref (normal_variant);
g_variant_unref (variant);
}
--
2.19.1

70
RHEL-114086.patch Normal file
View File

@ -0,0 +1,70 @@
From f3eecc88f4f45b128c963d695a61b230d2665db5 Mon Sep 17 00:00:00 2001
From: Philip Withnall <pwithnall@gnome.org>
Date: Mon, 3 Feb 2025 18:27:21 +0000
Subject: [PATCH] gdbusconnection: Prevent sending a serial of zero on overflow
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
It finally happened: someone managed to keep a process alive long
enough, and using a single `GDBusConnection`, to overflow the
`last_serial` counter in the connection and send an invalid message with
serial of zero (which is disallowed by the D-Bus specification).
Avoid that happening in future by skipping serials of zero on overflow,
and wrapping straight back around to 1.
This looks a little more confusing than it is, because `last_serial` is
pre-incremented on use, so to skip zero, we explicitly set it to zero.
This is exactly what happens when the `GDBusConnection` is initialised
anyway.
I cant think of a way to add a unit test for this — there is no way to
affect the value of `last_serial` except by sending messages (each one
increments it), and in order to get it to overflow by sending messages
at 1kHz, the test would have to run for 49 days.
Instead, I tested this manually by temporarily modifying
`GDBusConnection` to initialise `last_serial` to `G_MAXUINT32 - 3`, then
checked that the unit tests all still passed, and that the overflow code
was being executed.
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Fixes: #3592
---
gio/gdbusconnection.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c
index b4cdc7e..45d7861 100644
--- a/gio/gdbusconnection.c
+++ b/gio/gdbusconnection.c
@@ -1790,9 +1790,22 @@ g_dbus_connection_send_message_unlocked (GDBusConnection *connection,
goto out;
if (flags & G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL)
- serial_to_use = g_dbus_message_get_serial (message);
+ {
+ serial_to_use = g_dbus_message_get_serial (message);
+ }
else
- serial_to_use = ++connection->last_serial; /* TODO: handle overflow */
+ {
+ /* The serial_to_use must not be zero, as per
+ * https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-messages. */
+ if (connection->last_serial == G_MAXUINT32)
+ connection->last_serial = 1;
+ else
+ connection->last_serial++;
+
+ serial_to_use = connection->last_serial;
+ }
+
+ g_assert (serial_to_use != 0);
switch (blob[0])
{
--
2.47.3

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-8
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: desktop-qe.desktop-ci.tier1-gating.functional}

View File

@ -5,7 +5,7 @@
Name: glib2
Version: 2.56.4
Release: 166%{?dist}
Release: 167%{?dist}
Summary: A library of handy utility functions
License: LGPLv2+
@ -147,6 +147,9 @@ Patch29: CVE-2024-34397.patch
# https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4356
Patch30: gdatetime-test.patch
# https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4470
Patch31: RHEL-114086.patch
%description
GLib is the low-level core library that forms the basis for projects
such as GTK+ and GNOME. It provides data structure handling for C,
@ -344,6 +347,10 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
%{_datadir}/installed-tests
%changelog
* Wed Sep 17 2025 RHEL Packaging Agent <jotnar@redhat.com> - 2.56.4-167
- gdbusconnection: Prevent sending a serial of zero on overflow
- Resolves: RHEL-114086
* Fri Jul 11 2025 Michael Catanzaro <mcatanzaro@redhat.com> - 2.56.4-166
- Add patches for CVE-2024-34397, CVE-2024-52533, CVE-2025-4373
- Update GDateTime test for new tzdata

5
main.fmf Normal file
View File

@ -0,0 +1,5 @@
plan:
import:
url: https://gitlab.cee.redhat.com/desktopqe/glib2.git
name: /plan/gate
ref: rhel-8

17
rpminspect.yaml Normal file
View File

@ -0,0 +1,17 @@
---
annocheck:
ignore:
- /usr/libexec/installed-tests/glib/mem-overflow
- /usr/libexec/installed-tests/glib/resources
elf:
ignore:
- /usr/libexec/installed-tests/glib/resources
inspections:
# https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2097
badfuncs: off
runpath:
allowed_paths:
- /usr/libexec/installed-tests/glib
xml:
ignore:
- /usr/libexec/installed-tests/glib/bookmarks/fail-*.xbel

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (glib-2.56.4.tar.xz) = 280a46c2af13283a08c15ff0b4f5492659c2884521930600ad45310ed181c44a878ad8f9b36bae68ed6e7d92db6f1630f7bf015148c513dc317d25807f13abb0

19
update-gio-modules Normal file
View File

@ -0,0 +1,19 @@
#! /bin/sh
if test $# != 1; then
echo "usage: update-gio-modules host_triplet" 1>&2
exit 1
fi
echo "Warning: update-gio-modules is deprecated and will be removed in glib2-2.28.0"
umask 022
case "$host" in
alpha*|ia64*|powerpc64*|ppc64*|s390x*|sparc64*|x86_64*)
/usr/bin/gio-querymodules-64 /usr/lib64/gio/modules
;;
*)
/usr/bin/gio-querymodules-32 /usr/lib/gio/modules
;;
esac