Junglewise Threat Intelligence

CVE-2023-4806: GNU glibc use-after-free in getaddrinfo

CVE-2023-4806 · Severity: medium · CVSS 5.9 · Published 2023-09-18

Technologies: Red Hat Enterprise Linux 9, Gnu Glibc. Vendors: Red Hat, Gnu.

Executive brief

A vulnerability has been found in the core system library (glibc) used by almost all Linux-based applications to translate web addresses into IP addresses. In specific, rare configurations, this flaw can cause an application to crash when it looks up a network address. While difficult to trigger, a successful exploit could lead to a denial-of-service, impacting the availability of critical system services and applications.

Technical details

A use-after-free (UAF) vulnerability exists in the glibc 'getaddrinfo' function. The flaw is triggered when a Name Service Switch (NSS) module implements only the '_nss_*_gethostbyname2_r' and '_nss_*_getcanonname_r' hooks, but lacks the '_nss_*_gethostbyname3_r' hook. For an exploit to occur, the resolved name must return a large number of IPv4 and IPv6 addresses, and the 'getaddrinfo' call must use specific flags (AF_INET6 with AI_CANONNAME, AI_ALL, and AI_V4MAPPED). An attacker who can influence DNS responses or name resolution results could potentially trigger this UAF to cause a denial-of-service (crash). Patches are available through major Linux distributions including Red Hat and Fedora.

Affected products

  • GNU glibc 2.34-100.el9 and earlier
  • Red Hat Enterprise Linux 9 9.2, 9.4, 9.6

Timeline

  • 2023-09-18: disclosed
  • 2023-10-05: patched: Red Hat released security updates for RHEL 9

References

Related threats