KVM: nSVM: Raise #UD if unhandled VMMCALL isn't intercepted by L1
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
KVM: nSVM: Raise #UD if unhandled VMMCALL isn't intercepted by L1
Explicitly synthesize a #UD for VMMCALL if L2 is active, L1 does NOT want to intercept VMMCALL, nested_svm_l2_tlb_flush_enabled() is true, and the hypercall is something other than one of the supported Hyper-V hypercalls. When all of the above conditions are met, KVM will intercept VMMCALL but never forward it to L1, i.e. will let L2 make hypercalls as if it were L1.
The TLFS says a whole lot of nothing about this scenario, so go with the architectural behavior, which says that VMMCALL #UDs if it's not intercepted.
Opportunistically do a 2-for-1 stub trade by stub-ifying the new API instead of the helpers it uses. The last remaining "single" stub will soon be dropped as well.
[sean: rewrite changelog and comment, tag for stable, remove defunct stubs]
From the CVE record · Linux
A flaw in Linux kernel KVM nSVM can let an L2 guest make an unsupported VMMCALL as though it were L1, rather than receiving the expected #UD exception. This occurs when L1 does not intercept VMMCALL and nested L2 TLB flushing is enabled.
Engineers running the Linux kernel with KVM nSVM should check their systems; affected versions are not specified.