CVE-2024-4418
JSON

6.2medium

Libvirt: stack use-after-free in virnetclientioeventloop()

Severity
6.2medium CVSS:3.1 by redhat
Exploit likelihood
0.49% (higher than 43% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
redhat

Description

A race condition leading to a stack use-after-free flaw was found in libvirt. Due to a bad assumption in the virNetClientIOEventLoop() method, the `data` pointer to a stack-allocated virNetClientIOEventData structure ended up being used in the virNetClientIOEventFD callback while the data pointer's stack frame was concurrently being "freed" when returning from virNetClientIOEventLoop(). The 'virtproxyd' daemon can be used to trigger requests. If libvirt is configured with fine-grained access control, this issue, in theory, allows a user to escape their otherwise limited access. This flaw allows a local, unprivileged user to access virtproxyd without authenticating. Remote users would need to authenticate before they could access it.

Affected

Product or packageVersionsReported by
libvirtbefore 10.4.0
Not affected: from 0:10.0.0-6.6.el9_4 before *, from 0:9.0.0-10.7.el9_2 before *
CVE List
virt-devel:rhelNot specified
Not affected: from 8100020240606142719.489197e6 before *
CVE List
virt:rhelNot specified
Not affected: from 8100020240606142719.489197e6 before *
CVE List
virt:av/libvirtNot specifiedCVE List

Classification

CWE-562

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

A race condition leading to a stack use-after-free flaw was found in libvirt. Due to a bad assumption in the virNetClientIOEventLoop() method, the `data` pointer to a stack-allocated virNetClientIOEventData structure ended up being used in the virNetClientIOEventFD callback while the data pointer's stack frame was concurrently being "freed" when returning from virNetClientIOEventLoop(). The 'virtproxyd' daemon can be used to trigger requests. If libvirt is configured with fine-grained access control, this issue, in theory, allows a user to escape their otherwise limited access. This flaw allows a local, unprivileged user to access virtproxyd without authenticating. Remote users would need to authenticate before they could access it.

NVD (es)

Se encontró en libvirt una condición de ejecución que conducía a una falla de use-after-free de la pila. Debido a una mala suposición en el método virNetClientIOEventLoop(), el puntero de `datos` a una estructura virNetClientIOEventData asignada a la pila terminó usándose en la devolución de llamada de virNetClientIOEventFD mientras el marco de pila del puntero de datos se "liberaba" simultáneamente al regresar de virNetClientIOEventLoop() . El daemon 'virtproxyd' se puede utilizar para activar solicitudes. Si libvirt está configurado con un control de acceso detallado, este problema, en teoría, permite al usuario escapar de su acceso, que de otro modo sería limitado. Esta falla permite que un usuario local sin privilegios acceda a virtproxyd sin autenticarse. Los usuarios remotos tendrían que autenticarse antes de poder acceder a él.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-4418 changed 2026-11-05CVE Terms of Use
NVDCVE-2024-4418 changed 2026-11-05Public domain