glibc/sysdeps
Adhemerval Zanella eeb7b079d5 stdlib: Fix __libc_message_impl iovec size (BZ 32947)
The iovec size should account for all substrings between each conversion
specification.  For the format:

  "abc %s efg"

The list of substrings are:

  ["abc ", arg, " efg]

which is 2 times the number of maximum arguments *plus* one.

This issue triggered 'out of bounds' errors by stdlib/tst-bz20544 when
glibc is built with experimental UBSAN support [1].

Besides adjusting the iovec size, a new runtime and check is added to
avoid wrong __libc_message_impl usage.

Checked on x86_64-linux-gnu.

[1] https://sourceware.org/git/?p=glibc.git;a=shortlog;h=refs/heads/azanella/ubsan-undef

Co-authored-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2025-06-30 13:51:41 -03:00
..
aarch64 i386: Update ___tls_get_addr to preserve vector registers 2025-06-19 04:30:31 +08:00
alpha
arc
arm
csky
generic
gnu Add TCPI_OPT_USEC_TS from Linux 6.14 and TCPI_OPT_TFO_CHILD from 6.15 to netinet/tcp.h. 2025-06-17 09:57:44 -03:00
hppa
htl htl: move pthread_key_*, pthread_get/setspecific 2025-06-15 21:21:12 +02:00
hurd
i386 i386: Update ___tls_get_addr to preserve vector registers 2025-06-19 04:30:31 +08:00
ieee754 powerpc: Remove modff optimization 2025-06-25 15:05:30 -03:00
loongarch i386: Update ___tls_get_addr to preserve vector registers 2025-06-19 04:30:31 +08:00
m68k
mach hurd: Remove a duplicate entry from 'tests-unsupported'. 2025-06-21 14:46:53 +02:00
microblaze
mips
nptl
or1k
posix stdlib: Fix __libc_message_impl iovec size (BZ 32947) 2025-06-30 13:51:41 -03:00
powerpc powerpc: Remove modf optimization 2025-06-25 15:05:30 -03:00
pthread
riscv
s390
sh
sparc sparc: Fix sparc32 Fix argument passing to __libc_start_main (BZ 32981) 2025-06-18 11:20:34 -03:00
unix AArch64: Avoid memset ifunc in cpu-features.c [BZ #33112] 2025-06-30 13:17:38 +00:00
wordsize-32
wordsize-64
x86 x86: Update tst-gnu2-tls2 tests 2025-06-19 05:46:31 +08:00
x86_64 i386: Update ___tls_get_addr to preserve vector registers 2025-06-19 04:30:31 +08:00