CVE-2024-2494
JSON

6.2medium

Libvirt: negative g_new0 length can lead to unbounded memory allocation

Severity
6.2medium CVSS:3.1 by redhat
Exploit likelihood
0.35% (higher than 21% of CVEs)
Published
Last changed
Assigned by
redhat

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.

Affected

Product or packageVersionsReported by
libvirtfrom 9.0.0 before 9.7.0
Not affected: from 0:10.0.0-6.2.el9_4 before *
CVE List
openshift-sandboxed-containers/osc-cloud-api-adaptor-rhel9Not specified
Not affected: from 1.6.0-7 before *
CVE List
openshift-sandboxed-containers/osc-cloud-api-adaptor-webhook-rhel9Not specified
Not affected: from 1.6.0-7 before *
CVE List
openshift-sandboxed-containers/osc-monitor-rhel9Not specified
Not affected: from 1.6.0-4 before *
CVE List
openshift-sandboxed-containers/osc-must-gather-rhel9Not specified
Not affected: from 1.6.0-12 before *
CVE List
openshift-sandboxed-containers/osc-operator-bundleNot specified
Not affected: from 1.6.0-62 before *
CVE List
openshift-sandboxed-containers/osc-podvm-builder-rhel9Not specified
Not affected: from 1.6.0-13 before *
CVE List
openshift-sandboxed-containers/osc-podvm-payload-rhel9Not specified
Not affected: from 1.6.0-7 before *
CVE List
openshift-sandboxed-containers/osc-rhel9-operatorNot specified
Not affected: from 1.6.0-13 before *
CVE List
virt-devel:rhelNot specified
Not affected: from 8100020240409073027.489197e6 before *
CVE List
virt:rhelNot specified
Not affected: from 8100020240409073027.489197e6 before *
CVE List
virt:av/libvirtNot specifiedCVE List

Classification

CWE-789

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

NVD (es)

Se encontró una falla en las API de la librería RPC de libvirt. El código de deserialización del servidor RPC asigna memoria para las matrices antes de que los puntos de entrada de la API de C realicen la verificación de longitud no negativa. Pasar una longitud negativa a la función g_new0 provoca un bloqueo debido a que la longitud negativa se trata como un número positivo enorme. Esta falla permite que un usuario local sin privilegios realice un ataque de denegación de servicio provocando la falla del demonio libvirt.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-2494 changed 2026-11-25CVE Terms of Use
NVDCVE-2024-2494 changed 2026-11-25Public domain