CVE-2024-25629: c-ares out of bounds read in ares__read_line()
c-ares is a C library for asynchronous DNS requests. aresreadline() is used to parse local configuration files such as /etc/resolv.conf, /etc/nsswitch.conf, the HOSTALIASES file, and if using a c-ares version prior to 1.27.0, the /etc/hosts file. If any of these configuration files has an embedded NULL character as the first character in a new line, it can lead to attempting to read memory prior to the start of the given buffer which may result in a crash. This issue is fixed in c-ares 1.27.0. No known workarounds exist.
Other sources
C-ares is vulnerable to a denial of service, caused by an out-of-bounds read in aresreadline(). By sending a specially crafted request, a local authenticated attacker could exploit this vulnerability to cause the application to crash.
— IBM
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/c-aresto a version that resolves this vulnerability.Fixed in 1.27.0-1 - Upgrade
Upgrade
ubuntu/c-aresto a version that resolves this vulnerability.Fixed in 1.14.0-1ubuntu0.2+ - Upgrade
Upgrade
ubuntu/c-aresto a version that resolves this vulnerability.Fixed in 1.15.0-1ubuntu0.5 - Upgrade
Upgrade
ubuntu/c-aresto a version that resolves this vulnerability.Fixed in 1.18.1-1ubuntu0.22.04.3 - Upgrade
Upgrade
ubuntu/c-aresto a version that resolves this vulnerability.Fixed in 1.19.1-3ubuntu0.1 - Upgrade
Upgrade
ubuntu/c-aresto a version that resolves this vulnerability.Fixed in 1.27.0 - Upgrade
Upgrade
ubuntu/c-aresto a version that resolves this vulnerability.Fixed in 1.10.0-3ubuntu0.2+ - Upgrade
Upgrade
redhat/c-aresto a version that resolves this vulnerability.Fixed in 1.27.0 - Upgrade
Upgrade
c-ares/c-aresto a version that resolves this vulnerability.Fixed in 1.27.0 - Compensating control
Ensure that local configuration files parsed by c-ares (e.g., /etc/nsswitch.conf, the HOSTALIASES file, and /etc/hosts when using a c-ares version prior to 1.27.0) do not contain an embedded NULL character as the first character in any new line.
Event History
Frequently Asked Questions
What is the severity of CVE-2024-25629?
CVE-2024-25629 has been assigned a severity rating that indicates potential exploitation could lead to significant security risks.
How do I fix CVE-2024-25629?
To fix CVE-2024-25629, update c-ares to version 1.27.0 or later.
Which software is affected by CVE-2024-25629?
CVE-2024-25629 affects multiple versions of the c-ares library across various operating systems and products.
What are the potential risks associated with CVE-2024-25629?
The risks include potential exploitation of vulnerabilities in DNS request handling, which could lead to data exposure or system compromise.
Is there a specific patch for CVE-2024-25629?
Yes, patches are available for various distributions, including updates for Ubuntu and Debian to resolve CVE-2024-25629.