When expanding paths that begin with a tilde (~) followed by a username, the internal parse_tilde function extracts the username to determine the users home directory. The implementation allocates memory for this username directly on the stack using the strndupa macro. Because the size of this allocation was determined by the length of the user-supplied input without any bounds checks, passing an excessively long username e.g. thousands of characters, forces the thread to exhaust its stack space. Thus if an application passes untrusted, attacker-controlled input to the wordexp function, an attacker can trigger a stack clash.
A stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a parameter to a function).
| Name | Vendor | Start Version | End Version |
|---|---|---|---|
| Red Hat Enterprise Linux 10 | RedHat | glibc-0:2.39-142.el10_2 | * |
| Red Hat Enterprise Linux 8 | RedHat | glibc-0:2.28-251.el8_10.43 | * |
| Red Hat Enterprise Linux 8 | RedHat | glibc-0:2.28-251.el8_10.43 | * |
| Red Hat Enterprise Linux 9 | RedHat | glibc-0:2.34-283.el9_8 | * |
| Red Hat Enterprise Linux 9 | RedHat | glibc-0:2.34-283.el9_8 | * |
| Red Hat Hardened Images | RedHat | glibc-main-2.43-8.1.hum1 | * |
| Red Hat Update Infrastructure 5 | RedHat | rhui5/cds-kubernetes-rhel9:1791978534 | * |
| Red Hat Update Infrastructure 5 | RedHat | rhui5/cds-rhel9:1791978528 | * |
| Red Hat Update Infrastructure 5 | RedHat | rhui5/haproxy-rhel9:1791978528 | * |
| Red Hat Update Infrastructure 5 | RedHat | rhui5/installer-rhel9:1791964013 | * |
| Red Hat Update Infrastructure 5 | RedHat | rhui5/rhua-rhel9:1791978693 | * |
| Glibc | Ubuntu | jammy | * |
| Glibc | Ubuntu | noble | * |
| Glibc | Ubuntu | resolute | * |
| Glibc | Ubuntu | upstream | * |