KVM: s390: Take srcu when importing watchpoint data
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 27291e2165b6de70c476b7b675308113edd69a60 · < a4e482def8533ebace517d9f67f1465841b1f982| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
KVM: s390: Take srcu when importing watchpoint data
__import_wp_info() backs up the original guest memory contents of a watchpoint with read_guest_abs(), which is kvm_read_guest() and therefore resolves the memslot via __kvm_memslots(). That requires kvm->srcu (or kvm->slots_lock) to be held, otherwise a concurrent memslot update can free the memslots array under us once its SRCU grace period has elapsed.
As this is not fast path, following lock ordering (mutex first, then srcu) take the big hammer and hold the srcu for the full import.
From the CVE record · Linux
KVM on s390 imports watchpoint data without holding the required SRCU lock while reading guest memory. A concurrent memslot update can free the memslots array during that read. The input does not establish an attack path or specify authentication or user-interaction requirements.
Engineers running Linux kernels with KVM on s390 should check their kernel versions; affected versions are not specified.