public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/sudo] f45: Fix CVE-2026-96512
@ 2026-10-07 12:38
0 siblings, 0 replies; only message in thread
From: @ 2026-10-07 12:38 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/sudo
Branch : f45
Commit : aa47d387ec125bccca7aae18a039356b49e79825
Author : Alejandro López <allopez@redhat.com>
Date : 2026-10-07T11:24:56+02:00
Stats : +63/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/sudo/c/aa47d387ec125bccca7aae18a039356b49e79825?branch=f45
Log:
Fix CVE-2026-96512
---
diff --git a/0003-cve-2026-96512.patch b/0003-cve-2026-96512.patch
new file mode 100644
index 0000000..c1f2764
--- /dev/null
+++ b/0003-cve-2026-96512.patch
@@ -0,0 +1,62 @@
+From 2b99687853fd043e6bbdb00abaa9e12b18233630 Mon Sep 17 00:00:00 2001
+From: "Todd C. Miller" <Todd.Miller@sudo.ws>
+Date: Fri, 28 Aug 2026 16:13:52 -0600
+Subject: [PATCH] Remove TZ from sudo's working environment without modifying
+ envp.
+
+The earlier change to prevent NOTBEFORE/NOTAFTER in sudoers from
+being affected by a user-specified timezone was not effective since
+the mktime() function re-reads the TZ environment variable each
+time it is called.
+
+Reported by Ermenson Junior
+---
+ src/sudo.c | 36 ++++++++++++++++++++++++++++++++++++
+ 1 file changed, 36 insertions(+)
+
+diff --git a/src/sudo.c b/src/sudo.c
+index 83c04bdb..8b99fa5f 100644
+--- a/src/sudo.c
++++ b/src/sudo.c
+@@ -163,6 +163,8 @@
+ bindtextdomain(PACKAGE_NAME, LOCALEDIR);
+ textdomain(PACKAGE_NAME);
+
++ /* Use system time zone, not user-specified. */
++ unsetenv("TZ");
+ (void) tzset();
+
+ /* Must be done before we do any password lookups */
+@@ -344,10 +346,32 @@ access_denied:
+ int
+ os_init_common(int argc, char *argv[], char *envp[])
+ {
++ extern char **environ;
++ int envc;
+ #ifdef STATIC_SUDOERS_PLUGIN
+ preload_static_symbols();
+ #endif
+ gc_init();
++
++ /*
++ * Make a copy of environ[] that is distinct from envp[].
++ * This allows us to remove variables from sudo's environment
++ * while still providing the original envp to the plugins.
++ */
++ for (envc = 0; envp[envc] != NULL; envc++)
++ continue;
++ if (envc != 0) {
++ char **new_env = reallocarray(NULL, sizeof(char *), envc + 1);
++ if (new_env == NULL || !gc_add(GC_PTR, new_env)) {
++ sudo_fatalx_nodebug(U_("%s: %s"), __func__,
++ U_("unable to allocate memory"));
++ }
++ for (envc = 0; envp[envc] != NULL; envc++)
++ new_env[envc] = envp[envc];
++ new_env[envc] = NULL;
++ environ = new_env;
++ }
++
+ return 0;
+ }
+
diff --git a/sudo.spec b/sudo.spec
index 146f10a..a609492 100644
--- a/sudo.spec
+++ b/sudo.spec
@@ -27,6 +27,7 @@ BuildRequires: zlib-devel
Patch1: 0001-cve-2026-35535.patch
Patch2: 0002-Fix-OpenSSL-4.0-compatibility.patch
+Patch3: 0003-cve-2026-96512.patch
%description
Sudo (superuser do) allows a system administrator to give certain
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-07 12:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-07 12:38 [rpms/sudo] f45: Fix CVE-2026-96512
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox