When expanding paths that begin with a tilde (~) followed by a username, the internal parse_tilde function extracts the username to determine the user...
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| Ubuntu:Pro:14.04:LTSeglibc |
All versions→ Not listed |
Not listed |
| Ubuntu:Pro:16.04:LTSglibc |
All versions→ Not listed |
Not listed |
| Ubuntu:Pro:18.04:LTSglibc |
All versions→ Not listed |
Not listed |
| Ubuntu:Pro:20.04:LTSglibc |
All versions→ Not listed |
Not listed |
| Ubuntu:22.04:LTSglibc |
< 2.35-0ubuntu3.15→ 2.35-0ubuntu3.15 |
2.35-0ubuntu3.15 |
| Ubuntu:24.04:LTSglibc |
< 2.39-0ubuntu8.9→ 2.39-0ubuntu8.9 |
2.39-0ubuntu8.9 |
| Ubuntu:26.04:LTSglibc |
< 2.43-2ubuntu2.4→ 2.43-2ubuntu2.4 |
2.43-2ubuntu2.4 |
Original description The description as published by the source.
When expanding paths that begin with a tilde (~) followed by a username, the internal parse_tilde function extracts the username to determine the user's 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.
Source: OSV.dev (Open Source Vulnerabilities) OSV
References
- advisory ubuntu.com
- advisory ubuntu.com
- report ubuntu.com
- report cve.org
- report sourceware.org