public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/sudo] rawhide: Fix CVE-2026-96512
Date: Tue, 06 Oct 2026 18:10:28 GMT [thread overview]
Message-ID: <179131022859.1.15700001830428446419.rpms-sudo-3cf43e2a4f2e@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/sudo
Branch : rawhide
Commit : 3cf43e2a4f2ee41d4934d264cb61b0a674c76909
Author : Alejandro López <allopez@redhat.com>
Date : 2026-10-06T16:42:08+02:00
Stats : +69/-3 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/sudo/c/3cf43e2a4f2ee41d4934d264cb61b0a674c76909?branch=rawhide
Log:
Fix CVE-2026-96512
- Resolves: rhbz#2539401
Improved sudo.spec for rpmlint.
---
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..096aecf 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
@@ -55,8 +56,9 @@ BuildRequires: openssl-devel
%description logsrvd
-%{name}-logsrvd is a high-performance log server that accepts event and I/O logs from sudo.
-It can be used to implement centralized logging of sudo logs.
+%{name}-logsrvd is a high-performance log server that accepts event and
+I/O logs from sudo. It can be used to implement centralized logging of
+sudo logs.
%package python-plugin
Summary: Python plugin for %{name}
@@ -204,9 +206,11 @@ EOF
%{_mandir}/man5/sudoers_timestamp.5.gz
%dir %{_pkgdocdir}/
%{_pkgdocdir}/*
-%{!?_licensedir:%global license %%doc}
%license LICENSE.md
+%exclude %{_pkgdocdir}/LICENSE.md
%exclude %{_pkgdocdir}/ChangeLog
+%attr(0711,root,root) %ghost /run/sudo
+%attr(0700,root,root) %ghost /run/sudo/ts
%files devel
%doc plugins/sample/sample_plugin.c
reply other threads:[~2026-10-06 18:10 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=179131022859.1.15700001830428446419.rpms-sudo-3cf43e2a4f2e@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