[PATCH] stdlib: Fix __libc_message_impl iovec size

Florian Weimer fw@deneb.enyo.de
Thu May 1 10:57:16 GMT 2025


* Adhemerval Zanella:

> 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].
>
> Checked on x86_64-linux-gnu.
>
> [1] https://sourceware.org/git/?p=glibc.git;a=shortlog;h=refs/heads/azanella/ubsan-undef

Should this be treated as a security vulnerability?


More information about the Libc-alpha mailing list