Libvirt: negative g_new0 length can lead to unbounded memory allocation
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Partial Red Hat: 4 fixed, 3 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and Red Hat. Impact type from CWE-789.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | libvirt | 9.0.0 to before 9.7.0 | 9.7.0 | Patch available | CNA |
| Red Hat | Red Hat Enterprise Linux 8 | — | 8100020240409073027.489197e6 | Patch available | CNA |
| Red Hat | Red Hat Enterprise Linux 8 | — | 8100020240409073027.489197e6 | Patch available | CNA |
| Red Hat | Red Hat Enterprise Linux 9 | — | 10.0.0-6.2.el9_4 | Patch available | CNA |
| Red Hat | Red Hat Enterprise Linux 6 | — | — | No fix listed | CNA |
| Red Hat | Red Hat Enterprise Linux 7 | — | — | No fix listed | CNA |
| Red Hat | Red Hat Enterprise Linux 8 Advanced Virtualization | — | — | No fix listed | CNA |
- libvirt Vendor— Affected 9.0.0 to before 9.7.0 Fixed in 9.7.0 Patch available CNA
- Red Hat Enterprise Linux 8 VendorRed Hat Affected — Fixed in 8100020240409073027.489197e6 Patch available CNA
- Red Hat Enterprise Linux 8 VendorRed Hat Affected — Fixed in 8100020240409073027.489197e6 Patch available CNA
- Red Hat Enterprise Linux 9 VendorRed Hat Affected — Fixed in 10.0.0-6.2.el9_4 Patch available CNA
- Red Hat Enterprise Linux 6 VendorRed Hat Affected — Fixed in — No fix listed CNA
- Red Hat Enterprise Linux 7 VendorRed Hat Affected — Fixed in — No fix listed CNA
- Red Hat Enterprise Linux 8 Advanced Virtualization VendorRed Hat Affected — Fixed in — No fix listed CNA
CPE names CNA · 7
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:/a:redhat:enterprise_linux:8::appstream | 8 | — | Red Hat |
| cpe:/a:redhat:enterprise_linux:8::crb | 8 | — | Red Hat |
| cpe:/a:redhat:enterprise_linux:9::appstream | 9 | — | Red Hat |
| cpe:/a:redhat:enterprise_linux:9::crb | 9 | — | Red Hat |
| cpe:/o:redhat:rhel_els:6 | 6 | — | Red Hat |
| cpe:/o:redhat:rhel_els:7 | 7 | — | Red Hat |
| cpe:/a:redhat:advanced_virtualization:8::el8 | 8 | — | Red Hat |
- cpe:/a:redhat:enterprise_linux:8::appstream Versions 8 — ·Red Hat
- cpe:/a:redhat:enterprise_linux:8::crb Versions 8 — ·Red Hat
- cpe:/a:redhat:enterprise_linux:9::appstream Versions 9 — ·Red Hat
- cpe:/a:redhat:enterprise_linux:9::crb Versions 9 — ·Red Hat
- cpe:/o:redhat:rhel_els:6 Versions 6 — ·Red Hat
- cpe:/o:redhat:rhel_els:7 Versions 7 — ·Red Hat
- cpe:/a:redhat:advanced_virtualization:8::el8 Versions 8 — ·Red Hat
Remediation
- Fix · CNA libvirt Fixed in 9.7.0
Red Hat 2 advisories
- RHSA-2024:3253 Released 2024-05-22 · Red Hat rating Moderatevirt:rhel and virt-devel:rhel security update
- Red Hat Enterprise Linux AppStream (v. 8) SLOF-20210217-2.module+el8.10.0+20141+6faa2812.noarch::virt:rhel, SLOF-20210217-2.module+el8.10.0+20141+6faa2812.src::virt:rhel, hivex-1.3.18-23.module+el8.9.0+18724+20190c23.aarch64::virt:rhel +47
- Red Hat Enterprise Linux CRB (v. 8) SLOF-20210217-2.module+el8.10.0+20141+6faa2812.src::virt-devel:rhel, hivex-1.3.18-23.module+el8.9.0+18724+20190c23.i686::virt-devel:rhel, hivex-devel-1.3.18-23.module+el8.9.0+18724+20190c23.i686::virt-devel:rhel +47
- RHSA-2024:2560 Released 2024-04-30 · Red Hat rating Moderatelibvirt security and bug fix update
- Red Hat Enterprise Linux AppStream (v. 9) libvirt-10.0.0-6.2.el9_4, libvirt-client-10.0.0-6.2.el9_4, libvirt-client-qemu-10.0.0-6.2.el9_4 +25
- Red Hat Enterprise Linux CRB (v. 9) libvirt-daemon-plugin-sanlock-10.0.0-6.2.el9_4, libvirt-devel-10.0.0-6.2.el9_4, libvirt-docs-10.0.0-6.2.el9_4
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 6 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux 7 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux 8 Advanced Virtualization | Affected | No fix planned: Will not fix |
| Red Hat Enterprise Linux AppStream (v. 8) | Fixed | RHSA-2024:3253 |
| Red Hat Enterprise Linux AppStream (v. 9) | Fixed | RHSA-2024:2560 |
| Red Hat Enterprise Linux CRB (v. 8) | Fixed | RHSA-2024:3253 |
| Red Hat Enterprise Linux CRB (v. 9) | Fixed | RHSA-2024:2560 |
Timeline
- 2026-10-02 Threatist record created from CVE-2024-2494
- 2026-10-03 Alias added: GHSA-h9fq-4hj4-g596
References
More Red Hat vulnerabilities
- TI-2019-15875 Protection mechanism failure in Jenkins Pipeline: Groovy Plugin KEVCVSS 3.1CRITICAL 9.9
- TI-2019-15874 Protection mechanism failure in Jenkins Script Security Plugin KEVCVSS 3.1CRITICAL 9.9
- TI-2019-08259 Underflow in PHP-FPM can lead to RCE KEVCVSS 3.1CRITICAL 9.8
- TI-2019-05363 Code injection in Elastic Kibana KEVCVSS 3.1CRITICAL 10.0
- TI-2019-03949 Out-of-bounds write in ESXi and Horizon DaaS KEVCVSS 3.1CRITICAL 9.8
- TI-2018-16080 A code execution vulnerability exists in the Stapler web framework used by Jenkins 2.153… KEVCVSS 3.1CRITICAL 9.8
Sources
- CVE-2024-2494 · CVE Program
- CVE-2024-2494 · NVD
- FIRST EPSS
- GHSA-h9fq-4hj4-g596 · GitHub Advisory Database · CC BY 4.0
- CVE-2024-2494 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences