Bug 2295921 (CVE-2024-39483) - CVE-2024-39483 kernel: KVM: SVM: WARN on vNMI + NMI window iff NMIs are outright masked
Summary: CVE-2024-39483 kernel: KVM: SVM: WARN on vNMI + NMI window iff NMIs are outri...
Keywords:
Status: NEW
Alias: CVE-2024-39483
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-07-05 09:22 UTC by OSIDB Bzimport
Modified: 2024-10-29 18:52 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2024:8165 0 None None None 2024-10-16 04:22:25 UTC
Red Hat Product Errata RHBA-2024:8242 0 None None None 2024-10-17 12:40:59 UTC
Red Hat Product Errata RHBA-2024:8412 0 None None None 2024-10-24 00:50:49 UTC
Red Hat Product Errata RHBA-2024:8441 0 None None None 2024-10-24 10:11:20 UTC
Red Hat Product Errata RHBA-2024:8578 0 None None None 2024-10-29 18:52:57 UTC
Red Hat Product Errata RHSA-2024:8162 0 None None None 2024-10-16 00:51:49 UTC

Description OSIDB Bzimport 2024-07-05 09:22:55 UTC
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.

Comment 6 errata-xmlrpc 2024-10-16 00:51:48 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2024:8162 https://access.redhat.com/errata/RHSA-2024:8162


Note You need to log in before you can comment on or make changes to this bug.