CVE-2023-4806: Glibc: potential use-after-free in getaddrinfo()
A flaw has been identified in glibc. In an extremely rare situation, the getaddrinfo function may access memory that has been freed, resulting in an application crash. This issue is only exploitable when a NSS module implements only the nssgethostbyname2r and nssgetcanonnamer hooks without implementing the nssgethostbyname3r hook. The resolved name should return a large number of IPv6 and IPv4, and the call to the getaddrinfo function should have the AFINET6 address family with AICANONNAME, AIALL and AIV4MAPPED as flags.
Other sources
A flaw was found in glibc. In an extremely rare situation, the getaddrinfo function may access memory that has been freed, resulting in an application crash. This issue is only exploitable when a NSS module implements only the nssgethostbyname2r and nssgetcanonnamer hooks without implementing the nssgethostbyname3r hook. The resolved name should return a large number of IPv6 and IPv4, and the call to the getaddrinfo function should have the AFINET6 address family with AICANONNAME, AIALL and AIV4MAPPED as flags.
— Ubuntu
Glibc: potential use-after-free in getaddrinfo()
— Microsoft
GNU glibc is vulnerable to a denial of service, caused by a use-after-free flaw in the getaddrinfo() function. By sending a specially crafted request, a remote attacker could exploit this vulnerability to cause the application to crash.
— IBM
In an extremely rare situation, the getaddrinfo function in glibc may access memory that has already been freed, resulting in an application crash.
This issue is only exploitable when a NSS module implements only the nssgethostbyname2r hook without implementing the nssgethostbyname3r hook. There are no known modules that are implemented in this way.
In addition to that condition, the resolved name should return a large number of IPv6 as well as IPv4 and the call to the getaddrinfo function should have AFINET6 with AICANONNAME, AIALL and AIV4MAPPED as flags.
Reference: https://sourceware.org/bugzilla/showbug.cgi?id=30843
— Red Hat
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/glibcto a version that resolves this vulnerability.Fixed in 0:2.28-225.el8_8.6 - Upgrade
Upgrade
redhat/glibcto a version that resolves this vulnerability.Fixed in 0:2.34-60.el9_2.7 - Upgrade
Upgrade
ubuntu/glibcto a version that resolves this vulnerability.Fixed in 2.27-3ubuntu1.6+ - Upgrade
Upgrade
ubuntu/glibcto a version that resolves this vulnerability.Fixed in 2.31-0ubuntu9.14 - Upgrade
Upgrade
ubuntu/glibcto a version that resolves this vulnerability.Fixed in 2.35-0ubuntu3.5 - Upgrade
Upgrade
ubuntu/glibcto a version that resolves this vulnerability.Fixed in 2.37-0ubuntu2.2 - Upgrade
Upgrade
ubuntu/glibcto a version that resolves this vulnerability.Fixed in 2.38-1ubuntu5 - Upgrade
Upgrade
ubuntu/glibcto a version that resolves this vulnerability.Fixed in 2.23-0ubuntu11.3+ - Upgrade
Upgrade
debian/glibcto a version that resolves this vulnerability.Fixed in 2.36-9+deb12u7Fixed in 2.39-6
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is CVE-2023-4806?
CVE-2023-4806 is a vulnerability found in glibc that allows the getaddrinfo function to access freed memory, causing application crashes.
What is the severity of CVE-2023-4806?
CVE-2023-4806 has a severity level of high (7.5).
Which software versions are affected by CVE-2023-4806?
CVE-2023-4806 affects GNU glibc version 2.33, Redhat Enterprise Linux versions 7.0, 8.0, and 9.0.
How can CVE-2023-4806 be exploited?
CVE-2023-4806 can be exploited when an NSS module implements only the _nss_*_gethostbyname2_r and _nss_*_getcanonname_r hooks without implementation.
How can I fix CVE-2023-4806?
To fix CVE-2023-4806, it is recommended to upgrade to the patched version of GNU glibc or Redhat Enterprise Linux.