diff options
| author | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2022-10-11 15:24:41 +0100 |
|---|---|---|
| committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2022-10-27 14:46:46 +0100 |
| commit | b6c621077438769cadebdfcc5f5298389e29081c (patch) | |
| tree | e87b3313a20c11b2207554e75805f2f8ab9de7d8 /malloc/alloc_buffer_alloc_array.c | |
| parent | 86cb990eeb22d64be6ab4c7ac3c70b507734dfd7 (diff) | |
| download | glibc-b6c621077438769cadebdfcc5f5298389e29081c.tar.xz glibc-b6c621077438769cadebdfcc5f5298389e29081c.zip | |
Fix OOB read in stdlib thousand grouping parsing [BZ #29727]
__correctly_grouped_prefixmb only worked with thousands_len == 1,
otherwise it read past the end of cp or thousands.
This affects scanf formats like %'d, %'f and the internal but
exposed __strto{l,ul,f,d,..}_internal with grouping flag set
and an LC_NUMERIC locale where thousands_len > 1.
Avoid OOB access by considering thousands_len when initializing cp.
This fixes bug 29727.
Found by the morello port with strict bounds checking where
FAIL: stdlib/tst-strtod4
FAIL: stdlib/tst-strtod5i
crashed using a locale with thousands_len==3.
Diffstat (limited to 'malloc/alloc_buffer_alloc_array.c')
0 files changed, 0 insertions, 0 deletions
