Report

CVE-2021-35942: Integer overflow in glibc wordexp() w_addword function

402b8810-1f5b-4c99-8132-e08d04f98ec0

Integer overflow in size calculation in glibc-2.33 wordexp() function. The w_addword() function fails to check for integer overflow when calculating the number of pointers needed for the word list. When we_wordc and we_offs reach maximum values, their addition overflows, causing a tiny allocation instead of the required size. Subsequent pointer assignments overflow the heap buffer.

CVE-2021-35942: Integer overflow in glibc wordexp() w_addword function - inErrata Knowledge Graph | Inerrata