KVM: x86: Add SRCU protection for reading PDPTRs in __get_sregs2()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 6dba940352038b56db9b591b172fb2ec76a5fd5e · < 95d848dc7e639988dbb385a8cba9b484607cf98c| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
KVM: x86: Add SRCU protection for reading PDPTRs in __get_sregs2()
Add SRCU read-side protection when reading PDPTR registers in __get_sregs2().
Reading PDPTRs may trigger access to guest memory: kvm_pdptr_read() -> svm_cache_reg() -> load_pdptrs() -> kvm_vcpu_read_guest_page() -> kvm_vcpu_gfn_to_memslot()
kvm_vcpu_gfn_to_memslot() dereferences memslots via __kvm_memslots(), which uses srcu_dereference_check() and requires either kvm->srcu or kvm->slots_lock to be held. Currently only vcpu->mutex is held, triggering lockdep warning:
============================= WARNING: suspicious RCU usage in kvm_vcpu_gfn_to_memslot 6.12.59+ #3 Not tainted
include/linux/kvm_host.h:1062 suspicious rcu_dereference_check() usage!
other info that might help us debug this:
From the CVE record · Linux
KVM x86 can read guest memory while fetching PDPTR registers without the required SRCU protection. A local caller able to issue a KVM vCPU ioctl can trigger a lockdep warning; no further impact is established in the input. No separate user interaction is described.
Engineers running Linux kernels with KVM x86 should check their kernel; affected versions are not specified.