CVE-2024-39483
JSON

7.1high

KVM: SVM: WARN on vNMI + NMI window iff NMIs are outright masked

Severity
7.1high CVSS:3.1 by Linux
Exploit likelihood
0.22% (higher than 13% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

Description

In the Linux kernel, the following vulnerability has been resolved: KVM: SVM: WARN on vNMI + NMI window iff NMIs are outright masked When requesting an NMI window, WARN on vNMI support being enabled if and only if NMIs are actually masked, i.e. if the vCPU is already handling an NMI. KVM's ABI for NMIs that arrive simultanesouly (from KVM's point of view) is to inject one NMI and pend the other. When using vNMI, KVM pends the second NMI simply by setting V_NMI_PENDING, and lets the CPU do the rest (hardware automatically sets V_NMI_BLOCKING when an NMI is injected). However, if KVM can't immediately inject an NMI, e.g. because the vCPU is in an STI shadow or is running with GIF=0, then KVM will request an NMI window and trigger the WARN (but still function correctly). Whether or not the GIF=0 case makes sense is debatable, as the intent of KVM's behavior is to provide functionality that is as close to real hardware as possible. E.g. if two NMIs are sent in quick succession, the probability of both NMIs arriving in an STI shadow is infinitesimally low on real hardware, but significantly larger in a virtual environment, e.g. if the vCPU is preempted in the STI shadow. For GIF=0, the argument isn't as clear cut, because the window where two NMIs can collide is much larger in bare metal (though still small). That said, KVM should not have divergent behavior for the GIF=0 case based on whether or not vNMI support is enabled. And KVM has allowed simultaneous NMIs with GIF=0 for over a decade, since commit 7460fb4a3400 ("KVM: Fix simultaneous NMIs"). I.e. KVM's GIF=0 handling shouldn't be modified without a *really* good reason to do so, and if KVM's behavior were to be modified, it should be done irrespective of vNMI support.

Affected

Product or packageVersionsReported by
Linux Linuxfrom fa4c027a7956f5e07697bfcb580d25eeb8471257 before f79edaf7370986d73d204b36c50cc563a4c0f356, from fa4c027a7956f5e07697bfcb580d25eeb8471257 before 1d87cf2eba46deaff6142366127f2323de9f84d1, from fa4c027a7956f5e07697bfcb580d25eeb8471257 before b4bd556467477420ee3a91fbcba73c579669edc6, 6.4
Not affected: before 6.4, from 6.6.34 up to 6.6.*, from 6.9.5 up to 6.9.*, from 6.10 up to *
CVE List
linux linux_kernelbefore 6.4, from 6.6 before 6.6.34, from 6.9 before 6.9.5, 6.10.0NVD

All scores

Linux7.1high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:N/A:H
NVD5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Classification

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

What each source says

CVE List

In the Linux kernel, the following vulnerability has been resolved: KVM: SVM: WARN on vNMI + NMI window iff NMIs are outright masked When requesting an NMI window, WARN on vNMI support being enabled if and only if NMIs are actually masked, i.e. if the vCPU is already handling an NMI. KVM's ABI for NMIs that arrive simultanesouly (from KVM's point of view) is to inject one NMI and pend the other. When using vNMI, KVM pends the second NMI simply by setting V_NMI_PENDING, and lets the CPU do the rest (hardware automatically sets V_NMI_BLOCKING when an NMI is injected). However, if KVM can't immediately inject an NMI, e.g. because the vCPU is in an STI shadow or is running with GIF=0, then KVM will request an NMI window and trigger the WARN (but still function correctly). Whether or not the GIF=0 case makes sense is debatable, as the intent of KVM's behavior is to provide functionality that is as close to real hardware as possible. E.g. if two NMIs are sent in quick succession, the probability of both NMIs arriving in an STI shadow is infinitesimally low on real hardware, but significantly larger in a virtual environment, e.g. if the vCPU is preempted in the STI shadow. For GIF=0, the argument isn't as clear cut, because the window where two NMIs can collide is much larger in bare metal (though still small). That said, KVM should not have divergent behavior for the GIF=0 case based on whether or not vNMI support is enabled. And KVM has allowed simultaneous NMIs with GIF=0 for over a decade, since commit 7460fb4a3400 ("KVM: Fix simultaneous NMIs"). I.e. KVM's GIF=0 handling shouldn't be modified without a *really* good reason to do so, and if KVM's behavior were to be modified, it should be done irrespective of vNMI support.

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: KVM: SVM: WARN en la ventana vNMI + NMI si los NMI están completamente enmascarados Al solicitar una ventana NMI, WARN en la ventana de vNMI está habilitado si y solo si los NMI están realmente enmascarados, es decir, si la vCPU ya está manejando una NMI. La ABI de KVM para NMI que llegan simultáneamente (desde el punto de vista de KVM) es inyectar un NMI y esperar el otro. Cuando se usa vNMI, KVM suspende el segundo NMI simplemente configurando V_NMI_PENDING y deja que la CPU haga el resto (el hardware configura automáticamente V_NMI_BLOCKING cuando se inyecta un NMI). Sin embargo, si KVM no puede inyectar inmediatamente una NMI, por ejemplo, porque la vCPU está en una sombra STI o se está ejecutando con GIF=0, entonces KVM solicitará una ventana NMI y activará el WARN (pero seguirá funcionando correctamente). Es discutible si el caso GIF=0 tiene sentido o no, ya que la intención del comportamiento de KVM es proporcionar una funcionalidad lo más cercana posible al hardware real. Por ejemplo, si se envían dos NMI en rápida sucesión, la probabilidad de que ambos NMI lleguen a una sombra de STI es infinitamente baja en hardware real, pero significativamente mayor en un entorno virtual, por ejemplo, si la vCPU tiene prioridad en la sombra de STI. Para GIF=0, el argumento no es tan claro, porque la ventana donde dos NMI pueden colisionar es mucho mayor en el metal desnudo (aunque aún es pequeña). Dicho esto, KVM no debería tener un comportamiento divergente para el caso GIF=0 en función de si la compatibilidad con vNMI está habilitada o no. Y KVM ha permitido NMI simultáneas con GIF=0 durante más de una década, desde el commit 7460fb4a3400 ("KVM: Reparar NMI simultáneas"). Es decir, el manejo de GIF=0 de KVM no debe modificarse sin una *realmente* buena razón para hacerlo, y si se modifica el comportamiento de KVM, debe hacerse independientemente del soporte de vNMI.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-39483 changed 2026-08-05CVE Terms of Use
NVDCVE-2024-39483 changed 2026-08-04Public domain