Vulnerability · Published Mar 21, 2024 · Assigned by redhat
CVE-2024-2494Libvirt: negative g_new0 length can lead to unbounded memory allocation
Medium 6.2
In plain English
A medium-severity security flaw in libvirt. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 31% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:9 | libvirt | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| AlmaLinux:9 | libvirt-client | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| AlmaLinux:9 | libvirt-client-qemu | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| AlmaLinux:9 | libvirt-daemon | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| AlmaLinux:9 | libvirt-daemon-common | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| AlmaLinux:9 | libvirt-daemon-config-network | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| AlmaLinux:9 | libvirt-daemon-config-nwfilter | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| AlmaLinux:9 | libvirt-daemon-driver-interface | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| AlmaLinux:9 | libvirt-daemon-driver-network | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| AlmaLinux:9 | libvirt-daemon-driver-nodedev | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| AlmaLinux:9 | libvirt-daemon-driver-nwfilter | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| AlmaLinux:9 | libvirt-daemon-driver-qemu | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| AlmaLinux:9 | libvirt-daemon-driver-secret | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| AlmaLinux:9 | libvirt-daemon-driver-storage | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| AlmaLinux:9 | libvirt-daemon-driver-storage-core | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| AlmaLinux:9 | libvirt-daemon-driver-storage-disk | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| AlmaLinux:9 | libvirt-daemon-driver-storage-iscsi | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| AlmaLinux:9 | libvirt-daemon-driver-storage-logical | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| AlmaLinux:9 | libvirt-daemon-driver-storage-mpath | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| AlmaLinux:9 | libvirt-daemon-driver-storage-rbd | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| AlmaLinux:9 | libvirt-daemon-driver-storage-scsi | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| AlmaLinux:9 | libvirt-daemon-kvm | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| AlmaLinux:9 | libvirt-daemon-lock | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| AlmaLinux:9 | libvirt-daemon-log | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| AlmaLinux:9 | libvirt-daemon-plugin-lockd | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| AlmaLinux:9 | libvirt-daemon-plugin-sanlock | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| AlmaLinux:9 | libvirt-daemon-proxy | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| AlmaLinux:9 | libvirt-devel | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| AlmaLinux:9 | libvirt-docs | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| AlmaLinux:9 | libvirt-libs | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| AlmaLinux:9 | libvirt-nss | 10.0.0-6.2.el9_4.alma.1 | ALSA-2024:2560 |
| Debian:12 | libvirt | 9.0.0-4+deb12u1 | DEBIAN-CVE-2024-2494 |
| Debian:13 | libvirt | 10.2.0-1 | DEBIAN-CVE-2024-2494 |
| Debian:14 | libvirt | 10.2.0-1 | DEBIAN-CVE-2024-2494 |
| Rocky Linux:8 | hivex | 0:1.3.18-23.module+el8.10.0+1590+a67ab969 | RLSA-2024:3253 |
| Rocky Linux:8 | libguestfs | 1:1.44.0-9.module+el8.10.0+1590+a67ab969.rocky | RLSA-2024:3253 |
| Rocky Linux:8 | libguestfs-winsupport | 0:8.10-1.module+el8.10.0+1451+358d0d76 | RLSA-2024:3253 |
| Rocky Linux:8 | libiscsi | 0:1.18.0-8.module+el8.10.0+1590+a67ab969 | RLSA-2024:3253 |
| Rocky Linux:8 | libnbd | 0:1.6.0-5.module+el8.10.0+1590+a67ab969 | RLSA-2024:3253 |
| Rocky Linux:8 | libtpms | 0:0.9.1-2.20211126git1ff6fe1f43.module+el8.10.0+1590+a67ab969 | RLSA-2024:3253 |
| Rocky Linux:8 | libvirt | 0:8.0.0-23.1.module+el8.10.0+1779+84732956 | RLSA-2024:3253 |
| Rocky Linux:9 | libvirt | 0:10.0.0-6.2.el9_4 | RLSA-2024:2560 |
| Rocky Linux:8 | libvirt-dbus | 0:1.3.0-2.module+el8.10.0+1590+a67ab969 | RLSA-2024:3253 |
| Rocky Linux:8 | libvirt-python | 0:8.0.0-2.module+el8.10.0+1590+a67ab969 | RLSA-2024:3253 |
| Rocky Linux:8 | nbdkit | 0:1.24.0-5.module+el8.10.0+1590+a67ab969 | RLSA-2024:3253 |
| Rocky Linux:8 | netcf | 0:0.2.8-12.module+el8.10.0+1590+a67ab969 | RLSA-2024:3253 |
| Rocky Linux:8 | perl-Sys-Virt | 0:8.0.0-1.module+el8.10.0+1590+a67ab969 | RLSA-2024:3253 |
| Rocky Linux:8 | qemu-kvm | 5:6.2.0-49.module+el8.10.0+1752+38c6b60a | RLSA-2024:3253 |
| Rocky Linux:8 | seabios | 0:1.16.0-4.module+el8.9.0+1408+7b966129 | RLSA-2024:3253 |
| Rocky Linux:8 | sgabios | 1:0.20170427git-3.module+el8.10.0+1590+a67ab969 | RLSA-2024:3253 |
| Rocky Linux:8 | supermin | 0:5.2.1-2.module+el8.10.0+1590+a67ab969 | RLSA-2024:3253 |
| Rocky Linux:8 | swtpm | 0:0.7.0-4.20211109gitb79fd91.module+el8.10.0+1590+a67ab969 | RLSA-2024:3253 |
| Rocky Linux:8 | virt-v2v | 1:1.42.0-22.module+el8.10.0+1590+a67ab969 | RLSA-2024:3253 |
| Ubuntu:22.04:LTS | libvirt | 8.0.0-1ubuntu7.19 | USN-8652-1 |
| Ubuntu:22.04:LTS | libvirt | 8.0.0-1ubuntu7.10 | UBUNTU-CVE-2024-2494 |
| Ubuntu:22.04:LTS | libvirt | 8.0.0-1ubuntu7.10 | USN-6734-1 |
| Ubuntu:24.04:LTS | libvirt | 10.0.0-2ubuntu8.1 | UBUNTU-CVE-2024-2494 |
| Ubuntu:24.04:LTS | libvirt | 10.0.0-2ubuntu8.1 | USN-6734-2 |
| Ubuntu:24.04:LTS | libvirt | 10.0.0-2ubuntu8.16 | USN-8652-1 |
| Ubuntu:26.04:LTS | libvirt | 12.0.0-1ubuntu5.3 | USN-8652-1 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| libvirt | 9.0.0 – before 9.7.0 | |
| Red Hat | Red Hat Enterprise Linux 8 | see references |
| Red Hat | Red Hat Enterprise Linux 8 | see references |
| Red Hat | Red Hat Enterprise Linux 9 | see references |
| Red Hat | Red Hat Enterprise Linux 6 | see references |
| Red Hat | Red Hat Enterprise Linux 7 | see references |
| Red Hat | Red Hat Enterprise Linux 8 Advanced Virtualization | see references |
Weakness: CWE-789 · Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
References
- RHSA-2024:2560 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:3253 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/security/cve/CVE-2024-2494 vdb-entry, x_refsource_REDHAT
- RHBZ#2270115 issue-tracking, x_refsource_REDHAT
- https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/BKRQXPLPC6B7FLHJXSBQYW7HNDEBW6RJ/
- https://lists.debian.org/debian-lts-announce/2024/04/msg00000.html x_transferred
- https://security.netapp.com/advisory/ntap-20240517-0009/ x_transferred