CVE-2023-31130 Buffer Underwrite in ares_inet_net_pton()

Medium 4.1 Published Updated

A buffer underflow in c-ares allows attackers to cause memory corruption and potential code execution if specific IPv6 addresses are configured.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2023-31130?

CVE-2023-31130 is a medium-severity memory corruption vulnerability in Debian Debian Linux, published on 25 May 2023. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

c-ares is an asynchronous resolver library. ares_inet_net_pton() is vulnerable to a buffer underflow for certain ipv6 addresses, in particular "0::00:00:00/2" was found to cause an issue. C-ares only uses this function internally for configuration purposes which would require an administrator to configure such an address via ares_set_sortlist(). However, users may externally use ares_inet_net_pton() for other purposes and thus be vulnerable to more severe issues. This issue has been fixed in 1.19.1.

Weakness: CWE-787, CWE-124

Which versions are affected by CVE-2023-31130?

It affects 3 products.

Linux distribution packages (4)
c-ares Red Hat:rhel_eus:8.6::baseosAll versions0:1.13.0-6.el8_6.2
c-ares-debuginfo Red Hat:rhel_eus:8.6::baseosAll versions0:1.13.0-6.el8_6.2
c-ares-debugsource Red Hat:rhel_eus:8.6::baseosAll versions0:1.13.0-6.el8_6.2
c-ares-devel Red Hat:rhel_eus:8.6::baseosAll versions0:1.13.0-6.el8_6.2

Products include C-Ares Project C-Ares, Debian Debian Linux, Fedoraproject Fedora.

How do I fix CVE-2023-31130?

Upgrade to a fixed version.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2023-31130 being exploited?

There is no known exploitation of CVE-2023-31130 in the wild and no public exploit code.

All Debian Debian Linux vulnerabilities

Sources

Also known as AZL-26914, AZL-26917, AZL-26922, AZL-26938, AZL-26940, AZL-26941 and 9 more.

Is CVE-2023-31130 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free