CVE-2024-2494
Libvirt: negative g_new0 length can lead to unbounded memory allocation
CVSS Score
6.2
EPSS Score
0.0%
EPSS Percentile
0th
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.
| CWE | CWE-789 |
| Published | Mar 21, 2024 |
| Last Updated | Feb 25, 2026 |
Stay Ahead of the Next One
Get instant alerts for
Be the first to know when new medium vulnerabilities are published โ delivered to Slack, Telegram or Discord.
Get Free Alerts โ
Free ยท No credit card ยท 60 sec setup
CVSS v3 Breakdown
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
Affected Versions
Red Hat / Red Hat Enterprise Linux 8
All versions affected Red Hat / Red Hat Enterprise Linux 8
All versions affected Red Hat / Red Hat Enterprise Linux 9
All versions affected Red Hat / Red Hat Enterprise Linux 6
All versions affected Red Hat / Red Hat Enterprise Linux 7
All versions affected Red Hat / Red Hat Enterprise Linux 8 Advanced Virtualization
All versions affected References
access.redhat.com: https://access.redhat.com/errata/RHSA-2024:2560 access.redhat.com: https://access.redhat.com/errata/RHSA-2024:3253 access.redhat.com: https://access.redhat.com/security/cve/CVE-2024-2494 bugzilla.redhat.com: https://bugzilla.redhat.com/show_bug.cgi?id=2270115 lists.libvirt.org: https://lists.libvirt.org/archives/list/[email protected]/thread/BKRQXPLPC6B7FLHJXSBQYW7HNDEBW6RJ/ lists.debian.org: https://lists.debian.org/debian-lts-announce/2024/04/msg00000.html security.netapp.com: https://security.netapp.com/advisory/ntap-20240517-0009/
Credits
Red Hat would like to thank Alexander Kuznetsov (ALT Linux Team) for reporting this issue.