From 33edc765418e63676cf2fb11a16d87768c7dafb3 Mon Sep 17 00:00:00 2001 From: AlmaLinux RelEng Bot Date: Mon, 20 Jul 2026 13:01:29 -0400 Subject: [PATCH] import UBI glib2-2.80.4-12.el10_2.14 --- CVE-2026-58016.patch | 87 ++++++++++++++++++++++++++++++++++++++++++++ glib2.spec | 10 ++++- 2 files changed, 95 insertions(+), 2 deletions(-) create mode 100644 CVE-2026-58016.patch diff --git a/CVE-2026-58016.patch b/CVE-2026-58016.patch new file mode 100644 index 0000000..0850172 --- /dev/null +++ b/CVE-2026-58016.patch @@ -0,0 +1,87 @@ +From a569d4f0ab368f16b1de9d8e9dc42f709ad55725 Mon Sep 17 00:00:00 2001 +From: Philip Withnall +Date: Thu, 16 Apr 2026 15:27:37 +0100 +Subject: [PATCH] gdbusintrospection: Fix XML parser state handling for + element nesting + +The check for whether a `` element in D-Bus introspection XML was +nested correctly was broken. `` elements can only be at the top +level, or nested immediately within another `` element. + +Fix the check and add some unit tests for it. + +Spotted by linhlhq as #YWH-PGM9867-204. The fix is mine, and the unit test +uses example XML strings adapted from their report. + +Signed-off-by: Philip Withnall + +Fixes: #3932 +--- + gio/gdbusintrospection.c | 2 +- + gio/tests/gdbus-introspection.c | 33 +++++++++++++++++++++++++++++++++ + 2 files changed, 34 insertions(+), 1 deletion(-) + +diff --git a/gio/gdbusintrospection.c b/gio/gdbusintrospection.c +index 7ee3e32b6..7a113dbda 100644 +--- a/gio/gdbusintrospection.c ++++ b/gio/gdbusintrospection.c +@@ -1258,7 +1258,7 @@ parser_start_element (GMarkupParseContext *context, + /* ---------------------------------------------------------------------------------------------------- */ + if (strcmp (element_name, "node") == 0) + { +- if (!(g_slist_length (stack) >= 1 || strcmp (stack->next->data, "node") != 0)) ++ if (stack->next != NULL && strcmp (stack->next->data, "node") != 0) + { + g_set_error_literal (error, + G_MARKUP_ERROR, +diff --git a/gio/tests/gdbus-introspection.c b/gio/tests/gdbus-introspection.c +index 44cb7a96a..5c2c65c3b 100644 +--- a/gio/tests/gdbus-introspection.c ++++ b/gio/tests/gdbus-introspection.c +@@ -299,6 +299,38 @@ test_extra_data (void) + g_dbus_node_info_unref (info); + } + ++static void ++test_invalid (void) ++{ ++ const struct ++ { ++ const char *xml; ++ GMarkupError expected_error_code; ++ } ++ vectors[] = ++ { ++ { "", G_MARKUP_ERROR_EMPTY }, ++ { "", G_MARKUP_ERROR_INVALID_CONTENT }, ++ { "", G_MARKUP_ERROR_INVALID_CONTENT }, ++ { "", G_MARKUP_ERROR_INVALID_CONTENT }, ++ { "", G_MARKUP_ERROR_INVALID_CONTENT }, ++ }; ++ ++ for (size_t i = 0; i < G_N_ELEMENTS (vectors); i++) ++ { ++ GDBusNodeInfo *node; ++ GError *local_error = NULL; ++ ++ g_test_message ("Testing parsing of %s gives an error", vectors[i].xml); ++ ++ node = g_dbus_node_info_new_for_xml (vectors[i].xml, &local_error); ++ g_assert_error (local_error, G_MARKUP_ERROR, (int) vectors[i].expected_error_code); ++ g_assert_null (node); ++ ++ g_clear_error (&local_error); ++ } ++} ++ + /* ---------------------------------------------------------------------------------------------------- */ + + int +@@ -316,6 +348,7 @@ main (int argc, + g_test_add_func ("/gdbus/introspection-generate", test_generate); + g_test_add_func ("/gdbus/introspection-default-direction", test_default_direction); + g_test_add_func ("/gdbus/introspection-extra-data", test_extra_data); ++ g_test_add_func ("/gdbus/introspection-invalid", test_invalid); + + ret = session_bus_run (); + diff --git a/glib2.spec b/glib2.spec index ac02c7e..b98b0e2 100644 --- a/glib2.spec +++ b/glib2.spec @@ -1,8 +1,8 @@ ## START: Set by rpmautospec -## (rpmautospec version 0.8.3) +## (rpmautospec version 0.8.4) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: - release_number = 13; + release_number = 14; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} @@ -60,6 +60,9 @@ Patch: CVE-2025-14087.patch # https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4935 Patch: CVE-2025-14512.patch +# https://github.com/GNOME/glib/commit/c9da977c178fbfc0e4caf99f9fdf5dc433d6fcc2 +Patch: CVE-2026-58016.patch + BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: gettext @@ -323,6 +326,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : %changelog ## START: Generated by rpmautospec +* Thu Jul 09 2026 RHEL Packaging Agent - 2.80.4-14 +- Fix CVE-2026-58016: D-Bus introspection XML node nesting validation + * Thu Apr 23 2026 Michael Catanzaro - 2.80.4-13 - Fix CVE-2025-14087 and CVE-2025-14512