From 876a12e51323b4c0f7b6f32ec76f4a5280b7f0b9 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Wed, 22 Nov 2023 17:43:23 -0300 Subject: elf: Ignore loader debug env vars for setuid Loader already ignores LD_DEBUG, LD_DEBUG_OUTPUT, and LD_TRACE_LOADED_OBJECTS. Both LD_WARN and LD_VERBOSE are similar to LD_DEBUG, in the sense they enable additional checks and debug information, so it makes sense to disable them. Also add both LD_VERBOSE and LD_WARN on filtered environment variables for setuid binaries. Checked on x86_64-linux-gnu. Reviewed-by: Siddhesh Poyarekar --- sysdeps/generic/unsecvars.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sysdeps/generic') diff --git a/sysdeps/generic/unsecvars.h b/sysdeps/generic/unsecvars.h index f7ebed60e5..8975df4a14 100644 --- a/sysdeps/generic/unsecvars.h +++ b/sysdeps/generic/unsecvars.h @@ -16,6 +16,8 @@ "LD_PRELOAD\0" \ "LD_PROFILE\0" \ "LD_SHOW_AUXV\0" \ + "LD_VERBOSE\0" \ + "LD_WARN\0" \ "LOCALDOMAIN\0" \ "LOCPATH\0" \ "MALLOC_ARENA_MAX\0" \ -- cgit v1.2.3-70-g09d2