{"id":"CVE-2024-2494","summary":"Libvirt: negative g_new0 length can lead to unbounded memory allocation","details":"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.","modified":"2026-08-12T03:30:39.654956719Z","published":"2024-03-21T13:39:08.847Z","related":["ALSA-2024:2560","SUSE-SU-2024:1078-1","SUSE-SU-2024:1083-1","SUSE-SU-2024:1099-1","SUSE-SU-2024:1100-1","openSUSE-SU-2024:13796-1"],"database_specific":{"cwe_ids":["CWE-789"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/2xxx/CVE-2024-2494.json","cna_assigner":"redhat"},"references":[{"type":"WEB","url":"https://access.redhat.com/downloads/content/package-browser/"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2024/04/msg00000.html"},{"type":"WEB","url":"https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/BKRQXPLPC6B7FLHJXSBQYW7HNDEBW6RJ/"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2024:2560"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2024:3253"},{"type":"ADVISORY","url":"https://access.redhat.com/security/cve/CVE-2024-2494"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/2xxx/CVE-2024-2494.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-2494"},{"type":"ADVISORY","url":"https://security.netapp.com/advisory/ntap-20240517-0009/"},{"type":"REPORT","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2270115"},{"type":"PACKAGE","url":"https://gitlab.com/libvirt/libvirt/"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://gitlab.com/libvirt/libvirt","events":[{"introduced":"21b0099b79eccb5e89cea037db6d58480ae02553"},{"fixed":"8cb0572d7a791d7254274191201fe9fb4ca8c27f"}],"database_specific":{"source":"AFFECTED_FIELD","extracted_events":[{"introduced":"9.0.0"},{"fixed":"9.7.0"}]}}],"versions":["v9.7.0-rc2","v9.7.0-rc1","v9.6.0","v9.6.0-rc2","v9.6.0-rc1","CVE-2023-3750","v9.5.0","v9.5.0-rc2","v9.5.0-rc1","v9.4.0","v9.4.0-rc2","v9.4.0-rc1","v9.3.0","v9.3.0-rc2","v9.3.0-rc1","v9.2.0","v9.2.0-rc2","v9.2.0-rc1","v9.1.0","v9.1.0-rc2","v9.1.0-rc1","v9.0.0"],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-2494.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}]}