glibc/sysdeps
Adhemerval Zanella 11f7e3dd8f elf: Add all malloc tunable to unsecvars
Some environment variables allow alteration of allocator behavior
across setuid boundaries, where a setuid program may ignore the
tunable, but its non-setuid child can read it and adjust the memory
allocator behavior accordingly.

Most library behavior tunings is limited to the current process and does
not bleed in scope; so it is unclear how pratical this misfeature is.
If behavior change across privilege boundaries is desirable, it would be
better done with a wrapper program around the non-setuid child that sets
these envvars, instead of using the setuid process as the messenger.

The patch as fixes tst-env-setuid, where it fail if any unsecvars is
set.  It also adds a dynamic test, although it requires
--enable-hardcoded-path-in-tests so kernel correctly sets the setuid
bit (using the loader command directly would require to set the
setuid bit on the loader itself, which is not a usual deployment).

Co-authored-by: Siddhesh Poyarekar <siddhesh@sourceware.org>

Checked on x86_64-linux-gnu.
Reviewed-by: DJ Delorie <dj@redhat.com>
2023-11-21 16:15:42 -03:00
..
aarch64 aarch64: Add vector implementations of expm1 routines 2023-11-20 17:53:14 +00:00
alpha Remove references to the defunct db2 subdir 2023-08-21 18:20:53 +02:00
arc configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
arm configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
csky configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
generic elf: Add all malloc tunable to unsecvars 2023-11-21 16:15:42 -03:00
gnu configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
hppa configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
htl htl: move pthread_attr_setdetachstate into libc 2023-08-24 01:57:22 +02:00
hurd hurd: Fix using interposable hurd_thread_self 2023-05-19 20:45:51 +02:00
i386 i686: Fix build with --disable-multiarch 2023-08-10 10:29:29 -03:00
ia64 configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
ieee754 Avoid maybe-uninitialized warning in __kernel_rem_pio2 2023-10-16 09:59:32 +02:00
loongarch LoongArch: Delete excessively allocated memory. 2023-10-26 17:29:55 +08:00
m68k m68k: Use M68K_SCALE_AVAILABLE on __mpn_lshift and __mpn_rshift 2023-08-25 10:07:24 -03:00
mach hurd: Prevent the final file_exec_paths call from signals 2023-11-20 23:28:16 +01:00
microblaze configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
mips mips: dl-machine-reject-phdr: Get rid of alloca. 2023-10-02 12:55:27 +00:00
nios2 configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
nptl Fix misspellings in sysdeps/ -- BZ 25337 2023-05-30 23:02:29 +00:00
or1k configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
posix linux: Decorate __libc_fatal error buffer 2023-11-07 10:27:53 -03:00
powerpc fegetenv_and_set_rn now uses the builtins provided by GCC. 2023-09-27 13:55:36 -03:00
pthread sysdeps: sem_open: Clear O_CREAT when semaphore file is expected to exist [BZ #30789] 2023-11-03 15:19:38 -03:00
riscv riscv: Add support for XTheadBb in string-fz[a,i].h 2023-09-06 09:27:43 -03:00
s390 s390: Fix undefined behaviour in feenableexcept, fedisableexcept [BZ #30960] 2023-10-19 14:28:22 +02:00
sh configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
sparc sparc: Fix broken memset for sparc32 [BZ #31068] 2023-11-15 10:26:37 -03:00
unix aarch64: Add vector implementations of expm1 routines 2023-11-20 17:53:14 +00:00
wordsize-32 Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
wordsize-64 hurd: Fix tst-writev test 2023-05-01 13:01:30 +02:00
x86 x86: Add support for AVX10 preset and vec size in cpu-features 2023-09-29 14:18:42 -05:00
x86_64 elf: Ignore GLIBC_TUNABLES for setuid/setgid binaries 2023-11-21 16:15:42 -03:00