[continued from previous message]
--- glib2.0-2.74.6/debian/changelog 2025-04-12 14:52:16.000000000 +0100
+++ glib2.0-2.74.6/debian/changelog 2025-08-18 09:27:51.000000000 +0100
@@ -1,3 +1,43 @@
+glib2.0 (2.74.6-2+deb12u7) bookworm; urgency=medium
+
+ * d/p/gstring-carefully-handle-gssize-parameters.patch,
+ d/p/gstring-Make-len_unsigned-unsigned.patch:
+ Add patches from upstream to fix a buffer underflow in GString.
+ This could cause a memory overwrite if a program handles extremely
large
+ text strings of an attacker-controlled length. The required string
length
+ would be close to 2 GiB on 32-bit and the bug is not believed to be
+ practically feasible to exploit on 64-bit. (CVE-2025-4373)
+ (Closes: #1104930)
+ * d/p/glib-gfileutils.c-use-64-bits-for-value-in-get_tmp_file.patch,
+ d/p/gfileutils-fix-computation-of-temporary-file-name.patch:
+ Add patches from upstream to fix a buffer underflow in get_tmp_file().
+ This is used in g_mkstemp(), g_mkdtemp() and similar functions, and
+ could cause a crash or possibly arbitrary file overwrites (believed to
+ be unlikely to be exploitable in practice) if a long-running program
+ creates more than 2 billion temporary files. (CVE-2025-7039)
+ (Closes: #1110640)
+ * d/libglib2.0-0.postrm.in:
+ Rewrite postrm for safer upgrade behaviour, based on the version
+ in unstable and proposed for inclusion in trixie:
+ - Only remove giomodule.cache during purge, not during remove.
+ This matches the behaviour of gschemas.compiled and avoids a window
+ between old-postrm and new-postinst during which giomodule.cache is
+ missing, breaking applications that need GIO modules.
+ - Don't remove gschemas.compiled or giomodule.cache during purge
+ if there is evidence that they might still be needed
+ (Closes: #1065022, #1110696):
+ + don't remove them if ${libdir}/glib-2.0 still exists, for example
+ provided by libglib2.0-0t64 after upgrading to trixie;
+ + don't remove gschemas.compiled if at least one GSettings schema
+ still exists;
+ + don't remove giomodule.cache if at least one GIO module still
exists
+ - Refactoring to support the above
+ * d/tests/1065022-futureproofing:
+ Add a test for #1065022, modified from the version in unstable and
+ proposed for inclusion in trixie
+
+ -- Simon McVittie Mon, 18 Aug 2025 09:27:51 +0100
+
glib2.0 (2.74.6-2+deb12u6) bookworm; urgency=medium
* Non-maintainer upload.
diff -Nru glib2.0-2.74.6/debian/libglib2.0-0.postrm.in glib2.0-2
74.6/debian/libglib2.0-0.postrm.in
--- glib2.0-2.74.6/debian/libglib2.0-0.postrm.in 2024-11-14 09:42:34.
000000000
+0000
+++ glib2.0-2.74.6/debian/libglib2.0-0.postrm.in 2025-08-18 09:27:51.
000000000
+0100
@@ -1,21 +1,86 @@
#! /bin/sh
+# Debian Policy €10.4 says /bin/sh has a superset of POSIX functionality
+# shellcheck disable=SC3043
+
set -e
#DEBHELPER#
-case "$1" in
- (remove|purge)
- if [ -d /usr/lib/#MULTIARCH#/gio/modules ]; then
- # Purge the cache
- rm -f /usr/lib/#MULTIARCH#/gio/modules/giomodule.cache
- rmdir -p --ignore-fail-on-non-empty /usr/lib/#MULTI
RCH#/gio/modules
+clean_up_giomodule_cache ()
+{
+ local multiarch="#MULTIARCH#"
+ local modules="/usr/lib/${multiarch}/gio/modules"
+ local iter
+
+ if ! [ -d "$modules" ]; then
+ return 0
+ fi
+
+ # Don't remove giomodule.cache if libglib2.0-0 is replaced
+ # by some other ABI variant of essentially the same library
+ # (for example libglib2.0-0t64 in trixie), to avoid causing
+ # .
+ #
+ # This implementation is based on the assumption that any GLib
+ # version that still uses ${libdir}/gio/modules/giomodule.cache
+ # will also continue to ship ${libdir}/glib-2.0.
+ if [ -d "/usr/lib/${multiarch}/glib-2.0" ]; then
+ return 0
+ fi
+
+ # As an additional safety-catch, don't remove giomodule.cache if
+ # there is at least one module that should have been listed in it.
+ for iter in "$modules"/*.so; do
+ if [ -e "$iter" ]; then
+ echo "$0: not removing $modules/giomodule.cache because $iter
still exists" >&2
+ return 0
fi
+ done
+
+ rm -f "$modules/giomodule.cache"
+ rmdir -p --ignore-fail-on-non-empty "$modules"
+}
+
+clean_up_gsettings_schemas ()
+{
+ local schemas="/usr/share/glib-2.0/schemas"
+ local iter
+
+ if ! [ -d "$schemas" ]; then
+ return 0
+ fi
+
+ # Similarly, instead of using $DPKG_MAINTSCRIPT_PACKAGE_REFCOUNT, only
+ # remove gschemas.compiled if GLib has completely gone away - not just
+ # libglib2.0-0, but any future ABI variant like libglib2.0-0t64.
+ #
+ # This implementation is based on the assumption that any GLib
+ # version that still uses ${datadir}/glib-2.0/schemas
+ # will also continue to ship ${libdir}/glib-2.0.
+ for iter in /usr/lib/*/glib-2.0; do
+ if [ -e "$iter" ]; then
+ return 0
+ fi
+ done
+
+ # As an additional safety-catch, don't remove gschemas.compiled if
+ # there is at least one schema that should have been listed in it.
+ for iter in "$schemas"/*.xml; do
+ if [ -e "$iter" ]; then
+ echo "$0: not removing $schemas/gschemas.compiled because $iter
still exists" >&2
+ return 0
+ fi
+ done
+
+ rm -f "$schemas/gschemas.compiled"
+ rmdir -p --ignore-fail-on-non-empty "$schemas"
+}
+
+case "$1" in
+ (purge)
+ clean_up_giomodule_cache
+ clean_up_gsettings_schemas
;;
esac
-if [ "$1" = purge ] && [ -d /usr/share/glib-2.0/schemas ] && [
$DPKG_MAINTSCRIPT_PACKAGE_REFCOUNT" = 1 ]; then
- # This is the last multiarch variant to be removed, so drop the
- # architecture-independent compiled schemas
- rm -f /usr/share/glib-2.0/schemas/gschemas.compiled
- rmdir -p --ignore-fail-on-non-empty /usr/share/glib-2.0/schemas
-fi
+# vim:set sw=4 sts=4 et:
diff -Nru glib2.0-2.74.6/debian/patches/gfileutils-fix-computati
n-of-temporary-file-name.patch glib2.0-2.74.6/debian/patches/gfi
eutils-fix-computation-of-temporary-file-name.patch
--- glib2.0-2.74.6/debian/patches/gfileutils-fix-computation-of-
emporary-file-name.patch 1970-01-01 01:00:00.000000000 +0100
+++ glib2.0-2.74.6/debian/patches/gfileutils-fix-computation-of-
emporary-file-name.patch 2025-08-18 09:27:51.000000000 +0100
@@ -0,0 +1,42 @@
+From: Michael Catanzaro
+Date: Tue, 1 Jul 2025 10:58:07 -0500
+Subject: gfileutils: fix computation of temporary file name
+
+We need to ensure that the value we use to index into the letters array
+is always positive.
+
+Origin: upstream, 2.84.4, commit:8f4da99bf2f112b8e4329d8c44b6ab5dea467cb1
+Origin: upstream, 2.85.2, commit:61e963284889ddb4544e6f1d5261c16120f6fcc3
+Bug: https://gitlab.gnome.org/GNOME/glib/-/issues/3716
+Bug-CVE: CVE-2025-7039
+Bug-Debian: https://bugs.debian.org/1110640
+---
+ glib/gfileutils.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/glib/gfileutils.c b/glib/gfileutils.c
+index 22c04e1..28b424a 100644
+--- a/glib/gfileutils.c
++++ b/glib/gfileutils.c
+@@ -1483,9 +1483,9 @@ get_tmp_file (gchar *tmpl,
+ static const char letters[] =
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
+ static const int NLETTERS = sizeof (letters) - 1;
+- gint64 value;
[continued in next message]
--- SoupGate-Win32 v1.05
* Origin: you cannot sedate... all the things you hate (1:229/2)
|