CVE-2023-4806: Use After Free in Red Hat Red Hat Enterprise Linux 8
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 _nss_*_gethostbyname2_r and _nss_*_getcanonname_r hooks without implementing the _nss_*_gethostbyname3_r hook. The resolved name should return a large number of IPv6 and IPv4, and the call to the getaddrinfo function should have the AF_INET6 address family with AI_CANONNAME, AI_ALL and AI_V4MAPPED as flags.
AI Analysis
Technical Summary
CVE-2023-4806 is a use-after-free vulnerability identified in the GNU C Library (glibc), specifically in the getaddrinfo function used for network address resolution. The vulnerability manifests under an extremely rare condition where the Name Service Switch (NSS) module implements only the _nss_*_gethostbyname2_r and _nss_*_getcanonname_r hooks but omits the _nss_*_gethostbyname3_r hook. When an application calls getaddrinfo with the AF_INET6 address family and the flags AI_CANONNAME, AI_ALL, and AI_V4MAPPED, and the resolved hostname returns a large number of IPv4 and IPv6 addresses, the function may access memory that has already been freed. This results in a use-after-free condition leading to application crashes, impacting availability. The vulnerability does not affect confidentiality or integrity. Exploitation does not require privileges or user interaction but has a high attack complexity due to the rare conditions needed. The vulnerability affects Red Hat Enterprise Linux 8 systems using glibc versions prior to the patch. No public exploits are known at this time. The issue is tracked under CVE-2023-4806 with a CVSS v3.1 base score of 5.9 (medium severity), reflecting network attack vector, no privileges required, no user interaction, high attack complexity, and impact limited to availability. The root cause lies in incomplete NSS module implementations that do not support the newer _nss_*_gethostbyname3_r hook, which is necessary to safely handle large address lists. This flaw highlights the importance of NSS module compliance and glibc updates in maintaining system stability.
Potential Impact
For European organizations, the primary impact of CVE-2023-4806 is on system availability. Applications relying on getaddrinfo for DNS resolution may crash unexpectedly if the rare conditions are met, potentially causing service disruptions. This can affect network services, web servers, and any software components that perform hostname resolution using glibc on Red Hat Enterprise Linux 8. Since the vulnerability does not compromise confidentiality or integrity, data breaches or unauthorized access are unlikely. However, availability issues can lead to operational downtime, impacting business continuity, especially for critical infrastructure sectors such as finance, telecommunications, healthcare, and government services. Organizations deploying custom or third-party NSS modules that do not implement the recommended hooks are at higher risk. The absence of known exploits reduces immediate threat but does not eliminate risk, as attackers could develop exploits targeting this flaw. European entities with strict uptime requirements and those using Red Hat Enterprise Linux 8 in production environments should prioritize mitigation to avoid potential disruptions.
Mitigation Recommendations
1. Apply official patches from Red Hat for glibc as soon as they become available to address CVE-2023-4806. 2. Audit all NSS modules in use to verify they implement the _nss_*_gethostbyname3_r hook in addition to _nss_*_gethostbyname2_r and _nss_*_getcanonname_r hooks, ensuring compliance with glibc expectations. 3. For custom or third-party NSS modules, coordinate with vendors or developers to update implementations to support the required hooks. 4. Monitor application logs and system crash reports for signs of getaddrinfo-related crashes that could indicate exploitation attempts or triggering of the vulnerability. 5. Employ network segmentation and application whitelisting to limit exposure of critical systems running Red Hat Enterprise Linux 8. 6. Implement robust DNS and network monitoring to detect anomalous resolution patterns that might trigger the vulnerability. 7. Test updates and NSS module changes in staging environments to confirm stability before production deployment. 8. Maintain an incident response plan that includes procedures for handling availability-impacting vulnerabilities.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Spain, Poland, Sweden, Belgium, Finland
CVE-2023-4806: Use After Free in Red Hat Red Hat Enterprise Linux 8
Description
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 _nss_*_gethostbyname2_r and _nss_*_getcanonname_r hooks without implementing the _nss_*_gethostbyname3_r hook. The resolved name should return a large number of IPv6 and IPv4, and the call to the getaddrinfo function should have the AF_INET6 address family with AI_CANONNAME, AI_ALL and AI_V4MAPPED as flags.
AI-Powered Analysis
Technical Analysis
CVE-2023-4806 is a use-after-free vulnerability identified in the GNU C Library (glibc), specifically in the getaddrinfo function used for network address resolution. The vulnerability manifests under an extremely rare condition where the Name Service Switch (NSS) module implements only the _nss_*_gethostbyname2_r and _nss_*_getcanonname_r hooks but omits the _nss_*_gethostbyname3_r hook. When an application calls getaddrinfo with the AF_INET6 address family and the flags AI_CANONNAME, AI_ALL, and AI_V4MAPPED, and the resolved hostname returns a large number of IPv4 and IPv6 addresses, the function may access memory that has already been freed. This results in a use-after-free condition leading to application crashes, impacting availability. The vulnerability does not affect confidentiality or integrity. Exploitation does not require privileges or user interaction but has a high attack complexity due to the rare conditions needed. The vulnerability affects Red Hat Enterprise Linux 8 systems using glibc versions prior to the patch. No public exploits are known at this time. The issue is tracked under CVE-2023-4806 with a CVSS v3.1 base score of 5.9 (medium severity), reflecting network attack vector, no privileges required, no user interaction, high attack complexity, and impact limited to availability. The root cause lies in incomplete NSS module implementations that do not support the newer _nss_*_gethostbyname3_r hook, which is necessary to safely handle large address lists. This flaw highlights the importance of NSS module compliance and glibc updates in maintaining system stability.
Potential Impact
For European organizations, the primary impact of CVE-2023-4806 is on system availability. Applications relying on getaddrinfo for DNS resolution may crash unexpectedly if the rare conditions are met, potentially causing service disruptions. This can affect network services, web servers, and any software components that perform hostname resolution using glibc on Red Hat Enterprise Linux 8. Since the vulnerability does not compromise confidentiality or integrity, data breaches or unauthorized access are unlikely. However, availability issues can lead to operational downtime, impacting business continuity, especially for critical infrastructure sectors such as finance, telecommunications, healthcare, and government services. Organizations deploying custom or third-party NSS modules that do not implement the recommended hooks are at higher risk. The absence of known exploits reduces immediate threat but does not eliminate risk, as attackers could develop exploits targeting this flaw. European entities with strict uptime requirements and those using Red Hat Enterprise Linux 8 in production environments should prioritize mitigation to avoid potential disruptions.
Mitigation Recommendations
1. Apply official patches from Red Hat for glibc as soon as they become available to address CVE-2023-4806. 2. Audit all NSS modules in use to verify they implement the _nss_*_gethostbyname3_r hook in addition to _nss_*_gethostbyname2_r and _nss_*_getcanonname_r hooks, ensuring compliance with glibc expectations. 3. For custom or third-party NSS modules, coordinate with vendors or developers to update implementations to support the required hooks. 4. Monitor application logs and system crash reports for signs of getaddrinfo-related crashes that could indicate exploitation attempts or triggering of the vulnerability. 5. Employ network segmentation and application whitelisting to limit exposure of critical systems running Red Hat Enterprise Linux 8. 6. Implement robust DNS and network monitoring to detect anomalous resolution patterns that might trigger the vulnerability. 7. Test updates and NSS module changes in staging environments to confirm stability before production deployment. 8. Maintain an incident response plan that includes procedures for handling availability-impacting vulnerabilities.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- redhat
- Date Reserved
- 2023-09-06T16:26:35.613Z
- Cisa Enriched
- false
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 682d983ac4522896dcbed779
Added to database: 5/21/2025, 9:09:14 AM
Last enriched: 11/20/2025, 7:03:22 PM
Last updated: 11/29/2025, 7:56:22 AM
Views: 36
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2025-65892: n/a
UnknownCVE-2025-65540: n/a
UnknownCVE-2025-66221: CWE-67: Improper Handling of Windows Device Names in pallets werkzeug
MediumCVE-2025-53939: CWE-20: Improper Input Validation in kiteworks security-advisories
MediumCVE-2025-53900: CWE-267: Privilege Defined With Unsafe Actions in kiteworks security-advisories
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.