CVE-2023-32067 Overview
CVE-2023-32067 is a denial of service vulnerability affecting c-ares, an asynchronous resolver library widely used for DNS resolution in various applications. The vulnerability allows an attacker to forge malformed UDP packets with a length of 0 and send them to a target resolver. When the target resolver receives these crafted packets, it erroneously interprets the 0-length response as a graceful shutdown of the connection, effectively disrupting DNS resolution services.
Critical Impact
Attackers can remotely disrupt DNS resolution services by sending specially crafted UDP packets, causing denial of service conditions in applications relying on c-ares for DNS queries.
Affected Products
- c-ares_project c-ares (versions prior to 1.19.1)
- Fedora 37 and Fedora 38
- Debian Linux 10.0 and 11.0
Discovery Timeline
- 2023-05-25 - CVE-2023-32067 published to NVD
- 2024-11-21 - Last updated in NVD database
Technical Details for CVE-2023-32067
Vulnerability Analysis
This vulnerability exploits a flaw in how c-ares processes incoming UDP DNS responses. The c-ares library fails to properly validate the length field of incoming UDP packets used for DNS resolution. When a target resolver sends a DNS query, an attacker can intercept or forge a response packet containing a length value of 0. The c-ares library misinterprets this zero-length packet as an indication that the connection should be gracefully terminated, rather than recognizing it as malformed input that should be discarded.
The attack is particularly effective because it targets the fundamental DNS resolution mechanism, and the forged packets can be sent remotely over the network without requiring any authentication or user interaction. Applications and services that depend on c-ares for DNS resolution become unable to resolve hostnames, leading to service disruptions.
Root Cause
The root cause of CVE-2023-32067 is improper input validation (CWE-400: Uncontrolled Resource Consumption). The c-ares library does not adequately validate the length field in incoming UDP packets. Specifically, the code path that handles UDP responses does not check for zero-length packets and incorrectly treats them as a signal to close the connection. This design flaw allows attackers to manipulate the resolver's state by sending crafted packets.
Attack Vector
The attack is network-based and can be executed remotely. An attacker positioned to send UDP packets to the target resolver can exploit this vulnerability. The attack flow involves:
- The target system running c-ares initiates a DNS query over UDP
- The attacker intercepts the query or monitors for DNS traffic from the target
- The attacker crafts a malformed UDP response packet with a length field set to 0
- The attacker sends this forged packet to the target resolver
- The c-ares library on the target interprets the zero-length packet as a connection shutdown signal
- DNS resolution fails, causing denial of service for dependent applications
The vulnerability does not require authentication, user interaction, or elevated privileges to exploit. The attacker needs network access to send UDP packets to the target system, either through direct network access or by being positioned along the network path.
Detection Methods for CVE-2023-32067
Indicators of Compromise
- Unexpected DNS resolution failures across multiple applications
- Unusual volume of zero-length UDP packets on DNS-related ports (typically port 53)
- Application logs showing repeated DNS query timeouts or connection reset events
- Network traffic analysis revealing malformed DNS response packets with zero-length payloads
Detection Strategies
- Monitor network traffic for anomalous UDP packets with zero-length payloads targeting DNS resolution services
- Implement intrusion detection rules to flag UDP packets with length field set to 0 on DNS ports
- Review application logs for patterns of DNS resolution failures that may indicate active exploitation
- Deploy network-based anomaly detection to identify unusual DNS response patterns
Monitoring Recommendations
- Enable verbose logging in applications using c-ares to capture DNS resolution events and errors
- Configure network monitoring tools to alert on suspicious UDP traffic patterns targeting port 53
- Implement SIEM rules to correlate DNS failure events across multiple systems that may indicate a coordinated attack
- Monitor system resource utilization for signs of degraded performance due to DNS resolution issues
How to Mitigate CVE-2023-32067
Immediate Actions Required
- Upgrade c-ares to version 1.19.1 or later immediately on all affected systems
- Review and update all applications and dependencies that bundle or rely on c-ares
- Implement network-level filtering to drop suspicious zero-length UDP packets where feasible
- Monitor DNS resolution services for signs of exploitation during the patching process
Patch Information
The c-ares project has addressed this vulnerability in version 1.19.1. The patch implements proper validation of UDP packet lengths, ensuring that zero-length packets are correctly identified as malformed and discarded rather than triggering connection termination. Organizations should update to this version or later.
Patches and updates are available from multiple sources:
- GitHub Release cares-1_19_1
- GitHub Security Advisory GHSA-9g78-jv2r-p7vc
- Debian Security Advisory DSA-5419
- Debian LTS Announcement
- Fedora Package Announcements
- Gentoo GLSA 202310-09
Workarounds
- Implement network segmentation to limit exposure of systems running vulnerable c-ares versions
- Deploy network-level packet inspection to filter zero-length UDP packets before they reach vulnerable systems
- Consider using alternative DNS resolution mechanisms temporarily while patching is in progress
- Enable rate limiting on DNS services to reduce the impact of potential exploitation attempts
# Update c-ares on Debian/Ubuntu systems
sudo apt update
sudo apt install --only-upgrade libc-ares2
# Update c-ares on Fedora systems
sudo dnf update c-ares
# Verify installed c-ares version
dpkg -l | grep c-ares # Debian/Ubuntu
rpm -qa | grep c-ares # Fedora/RHEL
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

