CVE-2021-35942: Integer Overflow
An integer overflow flaw was found in glibc before 2.34 that may result in reading of arbitrary memory when wordexp is used with a specially crafted untrusted regular expression input.
References:
https://sourceware.org/bugzilla/showbug.cgi?id=28011 https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=5adda61f62b77384718b4c0d8336ade8f2b4b35c https://sourceware.org/glibc/wiki/Security%20Exceptions
Other sources
The wordexp function in the GNU C Library (aka glibc) through 2.33 may crash or read arbitrary memory in parseparam (in posix/wordexp.c) when called with an untrusted, crafted pattern, potentially resulting in a denial of service or disclosure of information. This occurs because atoi was used but strtoul should have been used to ensure correct calculations.
— Launchpad
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/glibcto a version that resolves this vulnerability.Fixed in 2.31-13+deb11u11Fixed in 2.31-13+deb11u10Fixed in 2.36-9+deb12u10Fixed in 2.36-9+deb12u7Fixed in 2.41-7 - Upgrade
Upgrade
redhat/glibcto a version that resolves this vulnerability.Fixed in 2.34 - Upgrade
Upgrade
ubuntu/glibcto a version that resolves this vulnerability.Fixed in 2.23-0ubuntu11.3+esm2 - Upgrade
Upgrade
ubuntu/glibcto a version that resolves this vulnerability.Fixed in 2.27-3ubuntu1.5 - Upgrade
Upgrade
ubuntu/glibcto a version that resolves this vulnerability.Fixed in 2.31-0ubuntu9.7 - Upgrade
Upgrade
glibcto a version that resolves this vulnerability.Fixed in 2.34
Event History
Frequently Asked Questions
What is CVE-2021-35942?
CVE-2021-35942 is a vulnerability in the GNU C Library (glibc) through version 2.33 that can result in a denial of service or disclosure of information.
What is the severity of CVE-2021-35942?
The severity of CVE-2021-35942 is critical with a CVSS score of 9.1.
How does CVE-2021-35942 affect GNU glibc?
CVE-2021-35942 affects GNU glibc through version 2.33 and may cause crashes or read arbitrary memory.
How can CVE-2021-35942 be exploited?
CVE-2021-35942 can be exploited by calling the wordexp function in GNU glibc with an untrusted, crafted pattern.
How can I fix CVE-2021-35942?
To fix CVE-2021-35942, update GNU glibc to a version beyond 2.33 when it becomes available.