CVE-2022-4904 Memory corruption in c-ares

High 8.6 Published Updated

A stack overflow in c-ares allows attackers to cause denial of service or limited data exposure via invalid input.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-4904?

CVE-2022-4904 is a high-severity memory corruption vulnerability in Fedoraproject Fedora, published on 6 Mar 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

A flaw was found in the c-ares package. The ares_set_sortlist is missing checks about the validity of the input string, which allows a possible arbitrary length stack overflow. This issue may cause a denial of service or a limited impact on confidentiality and integrity.

Weakness: CWE-1284, CWE-20

Which versions are affected by CVE-2022-4904?

It affects 4 products.

Linux distribution packages (40)
c-ares AlmaLinux:8All versions1.13.0-8.el8
c-ares-devel AlmaLinux:8All versions1.13.0-8.el8
c-ares Red Hat:enterprise_linux:8::baseosAll versions0:1.13.0-8.el8
c-ares-debuginfo Red Hat:enterprise_linux:8::baseosAll versions0:1.13.0-8.el8
c-ares-debugsource Red Hat:enterprise_linux:8::baseosAll versions0:1.13.0-8.el8
c-ares-devel Red Hat:enterprise_linux:8::baseosAll versions0:1.13.0-8.el8
c-ares-debuginfo Red Hat:rhel_eus:9.0::appstreamAll versions0:1.17.1-5.el9_0.2
c-ares-debugsource Red Hat:rhel_eus:9.0::appstreamAll versions0:1.17.1-5.el9_0.2
c-ares-devel Red Hat:rhel_eus:9.0::appstreamAll versions0:1.17.1-5.el9_0.2
c-ares Red Hat:rhel_eus:9.0::baseosAll versions0:1.17.1-5.el9_0.2
c-ares-debuginfo Red Hat:rhel_eus:9.0::baseosAll versions0:1.17.1-5.el9_0.2
c-ares-debugsource Red Hat:rhel_eus:9.0::baseosAll versions0:1.17.1-5.el9_0.2
c-ares-debuginfo Red Hat:rhel_eus:9.2::appstreamAll versions0:1.17.1-5.el9_2.2
c-ares-debugsource Red Hat:rhel_eus:9.2::appstreamAll versions0:1.17.1-5.el9_2.2
c-ares-devel Red Hat:rhel_eus:9.2::appstreamAll versions0:1.17.1-5.el9_2.2
c-ares Red Hat:rhel_eus:9.2::baseosAll versions0:1.17.1-5.el9_2.2
c-ares-debuginfo Red Hat:rhel_eus:9.2::baseosAll versions0:1.17.1-5.el9_2.2
c-ares-debugsource Red Hat:rhel_eus:9.2::baseosAll versions0:1.17.1-5.el9_2.2
c-ares SUSE:Enterprise Storage 7All versions1.19.0-150000.3.20.1
c-ares SUSE:Enterprise Storage 7.1All versions1.19.0-150000.3.20.1
c-ares SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSSAll versions1.19.0-150000.3.20.1
c-ares SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSSAll versions1.19.0-150000.3.20.1
c-ares SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOSAll versions1.19.0-150000.3.20.1
c-ares SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSSAll versions1.19.0-150000.3.20.1
c-ares SUSE:Linux Enterprise Micro 5.1All versions1.19.0-150000.3.20.1
c-ares SUSE:Linux Enterprise Micro 5.2All versions1.19.0-150000.3.20.1
c-ares SUSE:Linux Enterprise Micro 5.3All versions1.19.0-150000.3.20.1
c-ares SUSE:Linux Enterprise Module for Basesystem 15 SP4All versions1.19.0-150000.3.20.1
c-ares SUSE:Linux Enterprise Real Time 15 SP3All versions1.19.0-150000.3.20.1
libcares2 SUSE:Linux Enterprise Server 12 SP5All versions1.9.1-9.15.1
c-ares SUSE:Linux Enterprise Server 15 SP1-LTSSAll versions1.19.0-150000.3.20.1
c-ares SUSE:Linux Enterprise Server 15 SP2-LTSSAll versions1.19.0-150000.3.20.1
c-ares SUSE:Linux Enterprise Server 15 SP3-LTSSAll versions1.19.0-150000.3.20.1
libcares2 SUSE:Linux Enterprise Server for SAP Applications 12 SP5All versions1.9.1-9.15.1
c-ares SUSE:Linux Enterprise Server for SAP Applications 15 SP1All versions1.19.0-150000.3.20.1
c-ares SUSE:Linux Enterprise Server for SAP Applications 15 SP2All versions1.19.0-150000.3.20.1
c-ares SUSE:Linux Enterprise Server for SAP Applications 15 SP3All versions1.19.0-150000.3.20.1
libcares2 SUSE:Linux Enterprise Software Development Kit 12 SP5All versions1.9.1-9.15.1
libcares2 SUSE:Linux Enterprise Workstation Extension 12 SP5All versions1.9.1-9.15.1
c-ares SUSE:Manager Proxy 4.2All versions1.19.0-150000.3.20.1

Products include C-Ares Project C-Ares, Fedoraproject Fedora, Redhat Enterprise Linux, Redhat Software Collections.

How do I fix CVE-2022-4904?

Apply the vendor's patch.

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

Is CVE-2022-4904 being exploited?

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

All Fedoraproject Fedora vulnerabilities

Sources

Also known as ALSA-2023:7116, AZL-13817, AZL-13827, AZL-13828, AZL-34775, AZL-43921 and 19 more.

Is CVE-2022-4904 in your software?

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

Check your SBOMs for free