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.
CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 7.8
AV:L - The bug is reached only through the local KVM_SET_GUEST_DEBUG vCPU ioctl on a fd from /dev/kvm (kvm_vcpu_ioctl -> kvm_arch_vcpu_ioctl_set_guest_debug -> kvm_s390_import_bp_data). No network, adjacent-radio, or physical-device path reaches this s390 watchpoint import.
AC:L - The attacker controls both sides of the race: one thread issues KVM_SET_GUEST_DEBUG with KVM_GUESTDBG_USE_HW_BP while another mutates memslots via KVM_SET_USER_MEMORY_REGION on the VM fd. Guest PER (sclp.has_gpere) is standard on s390 KVM hosts, not a rare config the attacker cannot influence.
PR:L - The ioctl path has no capability check; only s390 ucontrol VMs require CAP_SYS_ADMIN. An unprivileged user with /dev/kvm access (kvm group or mode 0666, typical on virtualization hosts) can create a VM/vCPU and trigger the import.
UI:N - The attacking process creates the VM and vCPU, installs hardware watchpoints, and races memslot updates itself. No separate victim user action such as mounting a filesystem or opening a file is required.
S:U - KVM_SET_GUEST_DEBUG is a host-userspace ioctl; a guest cannot issue it, and this is not a guest-to-host escape. Impact stays within the host kernel's security authority, matching other KVM ioctl missing-SRCU UAFs.
C:H - Without SRCU, read_guest_abs()/kvm_read_guest() resolves memslots via __kvm_memslots() while a concurrent update can kfree the kvm_memory_slot after the SRCU grace period. Use-after-free of slot metadata and gfn-tree nodes enables kernel-heap disclosure and is scored High.
I:H - The same UAF lets the attacker reclaim the freed kvm_memory_slot, plant a dangling last_used_slot pointer, and walk attacker-controlled rb_left/rb_right during search_memslots(), yielding a kernel write/control-flow primitive. Kernel UAF memory corruption is scored High integrity.
A:H - Dereferencing a freed kvm_memory_slot or walking a concurrently destroyed gfn rbtree causes a host kernel oops or panic. The unprotected srcu_dereference_check() also trips lockdep, which is fatal under panic_on_warn.
| Attack Vector |
Local |
Scope |
Unchanged |
| Attack Complexity |
Low |
Confidentiality Impact |
High |
| Privileges Required |
Low |
Integrity Impact |
High |
| User Interaction |
None |
Availability Impact |
High |
AV:L - The bug is reached only through the local KVM_SET_GUEST_DEBUG vCPU ioctl on a fd from /dev/kvm (kvm_vcpu_ioctl -> kvm_arch_vcpu_ioctl_set_guest_debug -> kvm_s390_import_bp_data). No network, adjacent-radio, or physical-device path reaches this s390 watchpoint import.
AC:L - The attacker controls both sides of the race: one thread issues KVM_SET_GUEST_DEBUG with KVM_GUESTDBG_USE_HW_BP while another mutates memslots via KVM_SET_USER_MEMORY_REGION on the VM fd. Guest PER (sclp.has_gpere) is standard on s390 KVM hosts, not a rare config the attacker cannot influence.
PR:L - The ioctl path has no capability check; only s390 ucontrol VMs require CAP_SYS_ADMIN. An unprivileged user with /dev/kvm access (kvm group or mode 0666, typical on virtualization hosts) can create a VM/vCPU and trigger the import.
UI:N - The attacking process creates the VM and vCPU, installs hardware watchpoints, and races memslot updates itself. No separate victim user action such as mounting a filesystem or opening a file is required.
S:U - KVM_SET_GUEST_DEBUG is a host-userspace ioctl; a guest cannot issue it, and this is not a guest-to-host escape. Impact stays within the host kernel's security authority, matching other KVM ioctl missing-SRCU UAFs.
C:H - Without SRCU, read_guest_abs()/kvm_read_guest() resolves memslots via __kvm_memslots() while a concurrent update can kfree the kvm_memory_slot after the SRCU grace period. Use-after-free of slot metadata and gfn-tree nodes enables kernel-heap disclosure and is scored High.
I:H - The same UAF lets the attacker reclaim the freed kvm_memory_slot, plant a dangling last_used_slot pointer, and walk attacker-controlled rb_left/rb_right during search_memslots(), yielding a kernel write/control-flow primitive. Kernel UAF memory corruption is scored High integrity.
A:H - Dereferencing a freed kvm_memory_slot or walking a concurrently destroyed gfn rbtree causes a host kernel oops or panic. The unprotected srcu_dereference_check() also trips lockdep, which is fatal under panic_on_warn.
CVSS 3.1