public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Adam Williamson <awilliam@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/glib2] cve-2026-58016-f44: Backport fix for GGO #2189 (error accessing some filesystems)
Date: Tue, 11 Aug 2026 10:37:04 GMT [thread overview]
Message-ID: <178644462495.1.13026549543207380121.rpms-glib2-c3df0e5227d5@fedoraproject.org> (raw)
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
reply other threads:[~2026-08-11 10:37 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=178644462495.1.13026549543207380121.rpms-glib2-c3df0e5227d5@fedoraproject.org \
--to=awilliam@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