CVE-2024-2494

Libvirt: negative g_new0 length can lead to unbounded memory allocation

Published Mar 21, 2024 CVSS 3.1 · 6.2 Medium EPSS < 1% KEV · Not listed
Description
A flaw was found in the RPC library APIs of libvirt. The RPC server deserialization code allocates memory for arrays before the non-negative length check is performed by the C API entry points. Passing a negative length to the g_new0 function results in a crash due to the negative length being treated as a huge positive number. This flaw allows a local, unprivileged user to perform a denial of service attack by causing the libvirt daemon to crash.

Remediation

Vendor Workaround

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-3778-1 libvirt security update
EUVD EUVD EUVD-2024-27443 A flaw was found in the RPC library APIs of libvirt. The RPC server deserialization code allocates memory for arrays before the non-negative length check is performed by the C API entry points. Passing a negative length to the g_new0 function results in a crash due to the negative length being treated as a huge positive number. This flaw allows a local, unprivileged user to perform a denial of service attack by causing the libvirt daemon to crash.
Ubuntu USN Ubuntu USN USN-6734-1 libvirt vulnerabilities
Ubuntu USN Ubuntu USN USN-6734-2 libvirt vulnerabilities
History
Type Values Removed Values Added
First Time appeared Redhat rhel Els
CPEs cpe:/o:redhat:enterprise_linux:6
cpe:/o:redhat:enterprise_linux:7
cpe:/o:redhat:rhel_els:6
cpe:/o:redhat:rhel_els:7
Vendors & Products Redhat rhel Els
Type Values Removed Values Added
References
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
redhat
Published
Updated
Nov 5, 2026, 12:01 PM
Reserved
Mar 15, 2024, 9:04 AM
Status
Deferred
Published
Mar 21, 2024, 2:15 PM
Modified
Nov 5, 2026, 1:17 PM
Severity
Moderate
Public date
Mar 21, 2024, 12:00 AM