KVM: s390: keyop: use mmu_lock to read gmap->asce
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
KVM: s390: keyop: use mmu_lock to read gmap->asce
Every other dat_* consumer in this file (kvm_s390_get_skeys, set_skeys, get_cmma_bits, set_cmma_bits, MEM_CLR_CMMA, kvm_s390_fixup_prefix, kvm_test_age_gfn, kvm_age_gfn) reads kvm->arch.gmap->asce *inside* the mmu_lock read-side. keyop is the only outlier.
gmap->asce is mutated under write_lock(mmu_lock) by gmap_set_limit() and keyop might use a stale asce value for walking as KVM_S390_KEYOP and KVM_S390_VM_MEM_LIMIT_SIZE can run concurrently. This can result in memory corruption.
From the CVE record · Linux
The Linux kernel’s KVM s390 keyop can read a stale gmap address-space value while walking memory. Memory corruption can result if KVM_S390_KEYOP and KVM_S390_VM_MEM_LIMIT_SIZE run concurrently; the input does not specify network access, authentication requirements, or user interaction.
Engineers running the Linux kernel with KVM on s390 should check their systems; affected versions are not specified.