public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/sudo] f45: Fix CVE-2026-96512
Date: Wed, 07 Oct 2026 12:38:26 GMT [thread overview]
Message-ID: <179137670644.1.5680935449469451116.rpms-sudo-aa47d387ec12@fedoraproject.org> (raw)
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
reply other threads:[~2026-10-07 12:38 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=179137670644.1.5680935449469451116.rpms-sudo-aa47d387ec12@fedoraproject.org \
--to=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