elf: Ignore loader debug env vars for setuid
commit876a12e51323b4c0f7b6f32ec76f4a5280b7f0b9
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 22 Nov 2023 20:43:23 +0000 (22 17:43 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 5 Dec 2023 16:21:36 +0000 (5 13:21 -0300)
tree27efea2aca442b69ada4a737d707999036e40514
parentf85722f9cdedde15c263753cbee0a705d2be67af
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 <siddhesh@sourceware.org>
elf/rtld.c
elf/tst-env-setuid.c
sysdeps/generic/unsecvars.h