Files
glibc/elf
Adhemerval Zanella 337e18d661 elf: Scrub and reseed the AT_RANDOM bytes after deriving the guards (BZ 34197)
Once the pointer and stack guards have been derived from AT_RANDOM, scrub
the bytes and refill them with new random data unrelated to the guards.
On Linux, it uses getrandom syscall (as for tcache_key_initialize), and
fallback to zero the memory if the syscall is not avaiable.

This keeps AT_RANDOM useful to applications while ensuring those bytes no
longer reveal the guards.

The work is done by _dl_reseed_random, called once the guards are in place
and before any ELF constructor can observe AT_RANDOM: in security_init for
the dynamic loader and in __libc_start_main for statically linked programs.

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

Reviewed-by: DJ Delorie <dj@redhat.com>
2026-06-16 14:53:48 -03:00
..
2026-06-01 13:29:53 +01:00
2026-06-01 13:29:53 +01:00
2026-06-01 13:29:53 +01:00
2026-06-01 13:29:53 +01:00
2026-03-16 13:00:23 -04:00
2023-05-29 23:00:12 +00:00
2023-05-29 23:00:12 +00:00
2023-05-29 23:00:12 +00:00
2023-05-29 23:00:12 +00:00
2022-04-26 10:16:11 -07:00
2022-04-26 10:16:11 -07:00
2024-12-05 09:53:47 +00:00
2024-12-05 09:53:47 +00:00
2024-12-05 09:53:47 +00:00
2024-12-05 09:53:47 +00:00
2024-12-05 09:53:47 +00:00
2024-12-05 09:53:47 +00:00