aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Fotengauer-Malinovskiy <glebfm@altlinux.org>2023-09-20 05:00:00 +0000
committerAndreas K. Hüttel <dilfridge@gentoo.org>2023-10-05 10:20:44 +0200
commit6cb1746e769282f13e7a1cf5cc2d478573131b27 (patch)
tree7cd2ddbe3596dc78e0fb86b99d3e8325a19517e4
parenttunables: Terminate if end of input is reached (CVE-2023-4911) (diff)
downloadglibc-6cb1746e769282f13e7a1cf5cc2d478573131b27.tar.gz
glibc-6cb1746e769282f13e7a1cf5cc2d478573131b27.tar.bz2
glibc-6cb1746e769282f13e7a1cf5cc2d478573131b27.zip
elf/dl-tunables.c: avoid processing of tunables in AT_SECURE executables
Complements: owl-alt-sanitize-env
-rw-r--r--elf/dl-tunables.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/elf/dl-tunables.c b/elf/dl-tunables.c
index 985b69c180..d1f23797ae 100644
--- a/elf/dl-tunables.c
+++ b/elf/dl-tunables.c
@@ -285,6 +285,9 @@ __tunables_init (char **envp)
size_t len = 0;
char **prev_envp = envp;
+ if (__glibc_unlikely (__libc_enable_secure))
+ return;
+
maybe_enable_malloc_check ();
while ((envp = get_next_env (envp, &envname, &len, &envval,