glibc/sysdeps/posix
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
..
Subdirs
alarm.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
clock.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
clock_getres.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
ctermid.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
cuserid.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-fileid.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dup.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dup2.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
euidaccess.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
flock.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
fpathconf.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
gai_strerror-strs.h posix: Handle success in gai_strerror() 2023-06-13 20:54:49 +02:00
gai_strerror.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
getcwd.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
getdtsz.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
gethostname.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
getpagesize.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
isatty.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
isfdtype.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
killpg.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
libc_fatal.c stdlib: Fix __libc_message_impl iovec size (BZ 32947) 2025-06-30 13:51:41 -03:00
mkfifo.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
mkfifoat.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
nice.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
open64.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
pathconf.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
pause.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
posix_fallocate.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
posix_fallocate64.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
pread.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
pread64.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
preadv.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
preadv2.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
preadv64.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
preadv64v2.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
preadv_common.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
profil.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
pwrite.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
pwrite64.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
pwritev.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
pwritev2.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
pwritev64.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
pwritev64v2.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
pwritev_common.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
raise.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
readv.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
remove.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
rename.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
sigblock.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
sigignore.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
sigintr.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
signal.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
sigpause.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
sigset.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
sigsetmask.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
sigsuspend.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
sigwait.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
sleep.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
sprofil.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
sysconf-pthread_stack_min.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
sysconf.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
system.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
sysv_signal.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tempname.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
truncate.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
ttyname.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
ttyname_r.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
ulimit.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
usleep.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
utime.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
utimes.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
writev.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
writev_nocancel.c