public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Kalev Lember <klember@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/glib2] cve-2026-58016-f44: Backport a patch to work around SELinux policies not allowing SYS_sched_setattr
Date: Tue, 11 Aug 2026 10:36:56 GMT [thread overview]
Message-ID: <178644461698.1.15687637926239839622.rpms-glib2-a23372a417a7@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/glib2
Branch : cve-2026-58016-f44
Commit : a23372a417a7585eb79467275c2245a49383b3ea
Author : Kalev Lember <klember@redhat.com>
Date : 2020-02-12T20:50:27+01:00
Stats : +46/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/glib2/c/a23372a417a7585eb79467275c2245a49383b3ea?branch=cve-2026-58016-f44
Log:
Backport a patch to work around SELinux policies not allowing SYS_sched_setattr
https://bugzilla.redhat.com/show_bug.cgi?id=1795524
---
diff --git a/0001-GThread-Check-if-sched_setattr-is-allowed-by-the-sys.patch b/0001-GThread-Check-if-sched_setattr-is-allowed-by-the-sys.patch
new file mode 100644
index 0000000..4deb21a
--- /dev/null
+++ b/0001-GThread-Check-if-sched_setattr-is-allowed-by-the-sys.patch
@@ -0,0 +1,39 @@
+From 9308ef9a4b82372c5c94e736a2ec68581309a1e3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
+Date: Mon, 10 Feb 2020 14:24:48 +0200
+Subject: [PATCH] GThread - Check if sched_setattr is allowed by the system
+ policies before depending on it
+
+On Fedora it's apparently not allowed so we'll have to fall back to the
+thread-spawner thread in GThreadPool instead.
+---
+ glib/gthread-posix.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/glib/gthread-posix.c b/glib/gthread-posix.c
+index 9df6d7994..271bb5dbc 100644
+--- a/glib/gthread-posix.c
++++ b/glib/gthread-posix.c
+@@ -1211,6 +1211,19 @@ g_system_thread_get_scheduler_settings (GThreadSchedulerSettings *scheduler_sett
+ }
+ while (res == -1);
+
++ /* Try setting them on the current thread to see if any system policies are
++ * in place that would disallow doing so */
++ res = syscall (SYS_sched_setattr, tid, scheduler_settings->attr, flags);
++ if (res == -1)
++ {
++ int errsv = errno;
++
++ g_debug ("Failed to set thread scheduler attributes: %s", g_strerror (errsv));
++ g_free (scheduler_settings->attr);
++
++ return FALSE;
++ }
++
+ return TRUE;
+ #else
+ return FALSE;
+--
+2.24.1
+
diff --git a/glib2.spec b/glib2.spec
index de3bf4d..86641da 100644
--- a/glib2.spec
+++ b/glib2.spec
@@ -2,7 +2,7 @@
Name: glib2
Version: 2.63.5
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: A library of handy utility functions
License: LGPLv2+
@@ -11,6 +11,8 @@ Source0: http://download.gnome.org/sources/glib/2.63/glib-%{version}.tar.xz
# https://gitlab.gnome.org/GNOME/glib/merge_requests/1339
Patch0: CVE-2020-6750.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=1795524
+Patch1: 0001-GThread-Check-if-sched_setattr-is-allowed-by-the-sys.patch
BuildRequires: chrpath
BuildRequires: gcc
@@ -219,6 +221,10 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
%{_datadir}/installed-tests
%changelog
+* Wed Feb 12 2020 Kalev Lember <klember@redhat.com> - 2.63.5-3
+- Backport a patch to work around SELinux policies not allowing
+ SYS_sched_setattr (#1795524)
+
* Fri Feb 07 2020 Michael Catanzaro <mcatanzaro@redhat.com> - 2.63.5-2
- Add patch for CVE-2020-6750 and related issues.
reply other threads:[~2026-08-11 10:36 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=178644461698.1.15687637926239839622.rpms-glib2-a23372a417a7@fedoraproject.org \
--to=klember@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