public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/glib2] cve-2026-58016-f44: Backport fix for GGO #2189 (error accessing some filesystems)
@ 2026-08-11 10:37 Adam Williamson
0 siblings, 0 replies; only message in thread
From: Adam Williamson @ 2026-08-11 10:37 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/glib2
Branch : cve-2026-58016-f44
Commit : c3df0e5227d5ba8c825bad9d4d900bf02faddcaf
Author : Adam Williamson <awilliam@redhat.com>
Date : 2020-08-25T11:55:46-07:00
Stats : +61/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/glib2/c/c3df0e5227d5ba8c825bad9d4d900bf02faddcaf?branch=cve-2026-58016-f44
Log:
Backport fix for GGO #2189 (error accessing some filesystems)
Upstream commit refers only to read-only filesystems, but the
bug also affects CIFS shares (and this patch fixes that case
too).
---
diff --git a/0001-gio-Allow-no-atime-from-statx.patch b/0001-gio-Allow-no-atime-from-statx.patch
new file mode 100644
index 0000000..a91a9ff
--- /dev/null
+++ b/0001-gio-Allow-no-atime-from-statx.patch
@@ -0,0 +1,52 @@
+From 6fc143bba81a02cac0ca6bc47e8249b65ffc0ad9 Mon Sep 17 00:00:00 2001
+From: Valentin David <valentin.david@codethink.co.uk>
+Date: Sun, 23 Aug 2020 16:41:17 +0200
+Subject: [PATCH] gio: Allow no atime from statx
+
+statx does not provide stx_atime when querying a file in a read-only
+mounted file system. So call to statx should not expect it to be in
+the mask. Otherwise we would fail with ERANGE for querying any file in
+a read-only file system.
+
+Fixes #2189.
+---
+ gio/glocalfileinfo.c | 13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c
+index a34c1b78a..0690e1da2 100644
+--- a/gio/glocalfileinfo.c
++++ b/gio/glocalfileinfo.c
+@@ -1025,13 +1025,16 @@ set_info_from_stat (GFileInfo *info,
+ #elif defined (HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC)
+ _g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_TIME_MODIFIED_USEC, _g_stat_mtim_nsec (statbuf) / 1000);
+ #endif
+-
+- _g_file_info_set_attribute_uint64_by_id (info, G_FILE_ATTRIBUTE_ID_TIME_ACCESS, _g_stat_atime (statbuf));
++
++ if (_g_stat_has_field (statbuf, G_LOCAL_FILE_STAT_FIELD_ATIME))
++ {
++ _g_file_info_set_attribute_uint64_by_id (info, G_FILE_ATTRIBUTE_ID_TIME_ACCESS, _g_stat_atime (statbuf));
+ #if defined (HAVE_STRUCT_STAT_ST_ATIMENSEC)
+- _g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_TIME_ACCESS_USEC, statbuf->st_atimensec / 1000);
++ _g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_TIME_ACCESS_USEC, statbuf->st_atimensec / 1000);
+ #elif defined (HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC)
+- _g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_TIME_ACCESS_USEC, _g_stat_atim_nsec (statbuf) / 1000);
++ _g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_TIME_ACCESS_USEC, _g_stat_atim_nsec (statbuf) / 1000);
+ #endif
++ }
+ #endif
+
+ #ifndef G_OS_WIN32
+@@ -1805,7 +1808,7 @@ _g_local_file_info_get (const char *basename,
+
+ res = g_local_file_lstat (path,
+ G_LOCAL_FILE_STAT_FIELD_BASIC_STATS | G_LOCAL_FILE_STAT_FIELD_BTIME,
+- G_LOCAL_FILE_STAT_FIELD_ALL & (~G_LOCAL_FILE_STAT_FIELD_BTIME),
++ G_LOCAL_FILE_STAT_FIELD_ALL & (~G_LOCAL_FILE_STAT_FIELD_BTIME) & (~G_LOCAL_FILE_STAT_FIELD_ATIME),
+ &statbuf);
+
+ if (res == -1)
+--
+2.28.0
+
diff --git a/glib2.spec b/glib2.spec
index d062aa3..96110ac 100644
--- a/glib2.spec
+++ b/glib2.spec
@@ -1,6 +1,6 @@
Name: glib2
Version: 2.65.2
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: A library of handy utility functions
License: LGPLv2+
@@ -9,6 +9,11 @@ Source0: http://download.gnome.org/sources/glib/2.65/glib-%{version}.tar.xz
# Avoid requiring a too new gtk-doc version for building glib
Patch0: gtk-doc-1-32.patch
+# Fixes errors accessing read-only file systems (and possibly CIFS
+# shares)
+# https://gitlab.gnome.org/GNOME/glib/-/issues/2189
+# https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1630
+Patch1: 0001-gio-Allow-no-atime-from-statx.patch
BuildRequires: chrpath
BuildRequires: gcc
@@ -217,6 +222,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
%{_datadir}/installed-tests
%changelog
+* Tue Aug 25 2020 Adam Williamson <awilliam@redhat.com> - 2.65.2-3
+- Backport fix for GGO #2189 (error accessing some filesystems)
+
* Thu Aug 20 2020 Jeff Law <law@redhat.com> - 2.65.2-2
- Re-enable LTO
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-11 10:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-11 10:37 [rpms/glib2] cve-2026-58016-f44: Backport fix for GGO #2189 (error accessing some filesystems) Adam Williamson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox