glibc/sysdeps
Adhemerval Zanella efb21b5fb2 elf: Fix initial-exec TLS access on audit modules (BZ #28096)
For audit modules and dependencies with initial-exec TLS, we can not
set the initial TLS image on default loader initialization because it
would already be set by the audit setup.  However, subsequent thread
creation would need to follow the default behaviour.

This patch fixes it by setting l_auditing link_map field not only
for the audit modules, but also for all its dependencies.  This is
used on _dl_allocate_tls_init to avoid the static TLS initialization
at load time.

Checked on x86_64-linux-gnu, i686-linux-gnu, and aarch64-linux-gnu.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
(cherry picked from commit 254d3d5aef)
2022-04-08 14:18:12 -04:00
..
aarch64 elf: Add _dl_audit_pltexit 2022-04-08 14:18:12 -04:00
alpha elf: Add _dl_audit_pltexit 2022-04-08 14:18:12 -04:00
arc elf: Fix dynamic-link.h usage on rtld.c 2022-04-08 14:18:11 -04:00
arm elf: Add _dl_audit_pltexit 2022-04-08 14:18:12 -04:00
csky elf: Fix dynamic-link.h usage on rtld.c 2022-04-08 14:18:11 -04:00
generic elf: Fix initial-exec TLS access on audit modules (BZ #28096) 2022-04-08 14:18:12 -04:00
gnu hurd: Fix glob lstat compatibility 2021-07-22 20:31:52 +02:00
hppa elf: Add _dl_audit_pltexit 2022-04-08 14:18:12 -04:00
htl htl: Do not expose pthread hidden proto outside libpthread 2021-07-18 20:25:33 +00:00
hurd Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
i386 elf: Add _dl_audit_pltexit 2022-04-08 14:18:12 -04:00
ia64 elf: Add _dl_audit_pltexit 2022-04-08 14:18:12 -04:00
ieee754 Update math: redirect roundeven function 2021-06-27 07:56:57 -07:00
m68k elf: Add _dl_audit_pltexit 2022-04-08 14:18:12 -04:00
mach hurd if_index: Explicitly use AF_INET for if index discovery 2022-02-03 16:22:04 +01:00
microblaze elf: Fix dynamic-link.h usage on rtld.c 2022-04-08 14:18:11 -04:00
mips elf: Add _dl_audit_pltexit 2022-04-08 14:18:12 -04:00
nios2 elf: Fix dynamic-link.h usage on rtld.c 2022-04-08 14:18:11 -04:00
nptl nptl: Fix type of pthread_mutexattr_getrobust_np, pthread_mutexattr_setrobust_np (bug 28036) 2021-09-21 07:15:25 +02:00
posix getcwd: Set errno to ERANGE for size == 1 (CVE-2021-3999) 2022-01-24 11:37:06 +05:30
powerpc elf: Add _dl_audit_pltexit 2022-04-08 14:18:12 -04:00
pthread pthread/tst-cancel28: Fix barrier re-init race condition 2021-12-14 10:07:27 +05:30
riscv elf: Fix dynamic-link.h usage on rtld.c 2022-04-08 14:18:11 -04:00
s390 elf: Add _dl_audit_pltexit 2022-04-08 14:18:12 -04:00
sh elf: Add _dl_audit_pltexit 2022-04-08 14:18:12 -04:00
sparc elf: Add _dl_audit_pltexit 2022-04-08 14:18:12 -04:00
unix elf: Fix dynamic-link.h usage on rtld.c 2022-04-08 14:18:11 -04:00
wordsize-32 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
wordsize-64 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
x86 x86: Fix TEST_NAME to make it a string in tst-strncmp-rtm.c 2022-02-18 15:34:40 -08:00
x86_64 elf: Add _dl_audit_pltexit 2022-04-08 14:18:12 -04:00