Skip to content
OpenAdvisories
Medium · 6.2 CVE-2024-2494 EUVD-2024-27443GHSA-h9fq-4hj4-g596

Libvirt: negative g_new0 length can lead to unbounded memory allocation

Published Mar 21, 2024 · Updated Nov 5, 2026 · 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 products

VendorProductAffectedFixed
— libvirt 9.0.0 – < 9.7.0 9.7.0
Red Hat Red Hat Enterprise Linux 8 — —
Red Hat Red Hat Enterprise Linux 9 — —
Red Hat Red Hat Enterprise Linux 6 — —
Red Hat Red Hat Enterprise Linux 7 — —
Red Hat Red Hat Enterprise Linux 8 Advanced Virtualization — —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 libvirt 10.2.0-1 —
Debian 13 libvirt 10.2.0-1 —
Debian 12 libvirt 9.0.0-4+deb12u1 —
Debian 10 libvirt 5.0.0-4+deb10u2 DLA-3778-1
ReleasePackageFixed inAdvisory
Ubuntu 26.04 LTS libvirt 12.0.0-1ubuntu5.3 USN-8652-1
Ubuntu 24.04 LTS libvirt 10.0.0-2ubuntu8.1 USN-8652-1, USN-6734-2
Ubuntu 22.04 LTS libvirt 8.0.0-1ubuntu7.10 USN-8652-1, USN-6734-1
Ubuntu 20.04 LTS libvirt 6.0.0-0ubuntu8.19 USN-6734-1
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 20.04 LTS libvirt 6.0.0-0ubuntu8.20+esm1 USN-8652-1
Ubuntu Pro 18.04 LTS libvirt 4.0.0-1ubuntu8.21+esm1 USN-8652-1
Ubuntu Pro 16.04 LTS libvirt 1.3.1-1ubuntu10.31+esm1 USN-8652-1
Ubuntu Pro 14.04 LTS libvirt 1.2.2-0ubuntu13.1.28+esm2 USN-8652-1
ReleasePackageFixed inAdvisory
RHEL 9 libvirt +30 10.0.0-6.2.el9_4 RHSA-2024:2560
RHEL 8 SLOF 20210217-2.module+el8.10.0+20141+6faa2812 RHSA-2024:3253
RHEL 8 hivex +6 1.3.18-23.module+el8.9.0+18724+20190c23 RHSA-2024:3253
RHEL 8 libguestfs-winsupport 8.10-1.module+el8.10.0+19908+9938c7c9 RHSA-2024:3253
RHEL 8 libiscsi +2 1.18.0-8.module+el8.9.0+18724+20190c23 RHSA-2024:3253
RHEL 8 libnbd +6 1.6.0-5.module+el8.9.0+18724+20190c23 RHSA-2024:3253
RHEL 8 libtpms +1 0.9.1-2.20211126git1ff6fe1f43.module+el8.9.0+18724+20190c23 RHSA-2024:3253
RHEL 8 libvirt +27 8.0.0-23.1.module+el8.10.0+21659+98b2ad6a RHSA-2024:3253
RHEL 8 libvirt-dbus 1.3.0-2.module+el8.9.0+18724+20190c23 RHSA-2024:3253
RHEL 8 libvirt-python +1 8.0.0-2.module+el8.9.0+18724+20190c23 RHSA-2024:3253
RHEL 8 nbdkit +18 1.24.0-5.module+el8.9.0+18724+20190c23 RHSA-2024:3253
RHEL 8 netcf +2 0.2.8-12.module+el8.9.0+18724+20190c23 RHSA-2024:3253
RHEL 8 perl-Sys-Virt 8.0.0-1.module+el8.9.0+18724+20190c23 RHSA-2024:3253
RHEL 8 qemu-img +14 15:6.2.0-49.module+el8.10.0+21533+3df3c4b6 RHSA-2024:3253
RHEL 8 seabios +2 1.16.0-4.module+el8.9.0+19570+14a90618 RHSA-2024:3253
RHEL 8 sgabios +1 1:0.20170427git-3.module+el8.9.0+18724+20190c23 RHSA-2024:3253
RHEL 8 supermin +1 5.2.1-2.module+el8.9.0+18724+20190c23 RHSA-2024:3253
RHEL 8 swtpm +4 0.7.0-4.20211109gitb79fd91.module+el8.9.0+18724+20190c23 RHSA-2024:3253
RHEL 8 virt-dib +24 1:1.44.0-9.module+el8.9.0+18724+20190c23 RHSA-2024:3253
RHEL 8 virt-v2v +3 1:1.42.0-22.module+el8.9.0+18724+20190c23 RHSA-2024:3253

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 9 libvirt +30 10.0.0-6.2.el9_4.alma.1 ALSA-2024:2560

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 9 libvirt 10.0.0-6.2.el9_4 RLSA-2024:2560
Rocky Linux 8 hivex 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 8.10-1.module+el8.10.0+1451+358d0d76 RLSA-2024:3253
Rocky Linux 8 libiscsi 1.18.0-8.module+el8.10.0+1590+a67ab969 RLSA-2024:3253
Rocky Linux 8 libnbd 1.6.0-5.module+el8.10.0+1590+a67ab969 RLSA-2024:3253
Rocky Linux 8 libtpms 0.9.1-2.20211126git1ff6fe1f43.module+el8.10.0+1590+a67ab969 RLSA-2024:3253
Rocky Linux 8 libvirt 8.0.0-23.1.module+el8.10.0+1779+84732956 RLSA-2024:3253
Rocky Linux 8 libvirt-dbus 1.3.0-2.module+el8.10.0+1590+a67ab969 RLSA-2024:3253
Rocky Linux 8 libvirt-python 8.0.0-2.module+el8.10.0+1590+a67ab969 RLSA-2024:3253
Rocky Linux 8 nbdkit 1.24.0-5.module+el8.10.0+1590+a67ab969 RLSA-2024:3253
Rocky Linux 8 netcf 0.2.8-12.module+el8.10.0+1590+a67ab969 RLSA-2024:3253
Rocky Linux 8 perl-Sys-Virt 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 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 5.2.1-2.module+el8.10.0+1590+a67ab969 RLSA-2024:3253
Rocky Linux 8 swtpm 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
ReleasePackageFixed inAdvisory
SLES 15 SP5 libvirt 7.1.0-150300.6.41.1 SUSE-SU-2024:1099-1, SUSE-SU-2024:1078-1
SLES 15 SP4 libvirt 8.0.0-150400.7.11.2 SUSE-SU-2024:1100-1
SLES 12 SP5 libvirt 5.1.0-13.42.1 SUSE-SU-2024:1083-1
Show 10 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 15 SP4 libvirt 8.0.0-150400.7.11.2 SUSE-SU-2024:1100-1
SLES for SAP 12 SP5 libvirt 5.1.0-13.42.1 SUSE-SU-2024:1083-1
SLE Micro 5.5 libvirt 9.0.0-150500.6.20.1 SUSE-SU-2024:1099-1
SLE Micro 5.4 libvirt 8.0.0-150400.7.11.2 SUSE-SU-2024:1100-1
SLE Micro 5.3 libvirt 8.0.0-150400.7.11.2 SUSE-SU-2024:1100-1
SLE Micro 5.2 libvirt 7.1.0-150300.6.41.1 SUSE-SU-2024:1078-1
SLE Micro 5.1 libvirt 7.1.0-150300.6.41.1 SUSE-SU-2024:1078-1
SLE HPC 15 SP4 libvirt 8.0.0-150400.7.11.2 SUSE-SU-2024:1100-1
SUSE Manager Server 4.3 libvirt 8.0.0-150400.7.11.2 SUSE-SU-2024:1100-1
SUSE Manager Proxy 4.3 libvirt 8.0.0-150400.7.11.2 SUSE-SU-2024:1100-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed libvirt 10.1.0-2.1 openSUSE-SU-2024:13796-1
openSUSE Leap 15.5 libvirt 9.0.0-150500.6.20.1 SUSE-SU-2024:1099-1
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
openSUSE Leap Micro 5.4 libvirt 8.0.0-150400.7.11.2 SUSE-SU-2024:1100-1
openSUSE Leap Micro 5.3 libvirt 8.0.0-150400.7.11.2 SUSE-SU-2024:1100-1

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2 libvirt +30 4.5.0-36.amzn2.3.1 ALAS2-2024-2513

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 libvirt 10.0.0-4 —
Azure Linux 2 (CBL-Mariner) libvirt 7.10.0-9 —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 9 libvirt +30 10.0.0-6.2.0.1.el9_4 ELSA-2024-2560
Oracle Linux 8 hivex +6 1.3.18-23.module+el8.9.0+90075+85334608 ELSA-2024-3253
Oracle Linux 8 libguestfs-winsupport 8.10-1.module+el8.10.0+90308+7c659588 ELSA-2024-3253
Oracle Linux 8 libiscsi +2 1.18.0-8.module+el8.9.0+90052+d3bf71d8 ELSA-2024-3253
Oracle Linux 8 libnbd +6 1.6.0-5.module+el8.9.0+90052+d3bf71d8 ELSA-2024-3253
Oracle Linux 8 libtpms +1 0.9.1-2.20211126git1ff6fe1f43.module+el8.9.0+90052+d3bf71d8 ELSA-2024-3253
Oracle Linux 8 libvirt +27 8.0.0-23.1.0.1.module+el8.10.0+90338+8c4cc6af ELSA-2024-3253
Oracle Linux 8 libvirt-dbus 1.3.0-2.module+el8.9.0+90052+d3bf71d8 ELSA-2024-3253
Oracle Linux 8 nbdkit +18 1.24.0-5.module+el8.9.0+90052+d3bf71d8 ELSA-2024-3253
Oracle Linux 8 netcf +2 0.2.8-12.module+el8.9.0+90052+d3bf71d8 ELSA-2024-3253
Oracle Linux 8 perl-Sys-Virt 8.0.0-1.module+el8.9.0+90052+d3bf71d8 ELSA-2024-3253
Oracle Linux 8 python3-libvirt 8.0.0-2.module+el8.9.0+90052+d3bf71d8 ELSA-2024-3253
Oracle Linux 8 qemu-img +14 15:6.2.0-49.module+el8.10.0+90330+d0258130 ELSA-2024-3253
Oracle Linux 8 seabios +2 1.16.0-4.module+el8.9.0+90052+d3bf71d8 ELSA-2024-3253
Oracle Linux 8 sgabios +1 1:0.20170427git-3.module+el8.9.0+90052+d3bf71d8 ELSA-2024-3253
Oracle Linux 8 supermin +1 5.2.1-2.0.1.module+el8.9.0+90052+d3bf71d8 ELSA-2024-3253
Oracle Linux 8 swtpm +4 0.7.0-4.20211109gitb79fd91.module+el8.9.0+90052+d3bf71d8 ELSA-2024-3253
Oracle Linux 8 virt-dib +24 1:1.44.0-9.0.2.module+el8.9.0+90052+d3bf71d8 ELSA-2024-3253
Oracle Linux 8 virt-v2v +3 1:1.42.0-22.module+el8.9.0+90052+d3bf71d8 ELSA-2024-3253

Advisories 18

References