In the Linux kernel, the following vulnerability has been resolved:
s390/mm: Fix handling of _PAGE_UNUSED pte bit
The _PAGE_UNUSED softbit should not really be lying around. Its sole
purpose is to signal to try_to_unmap_one() and try_to_migrate_one()
that the page can be discarded instead of being moved / swapped.
KVM has no way to know why a page is being unmapped, so it sets the bit
on userspace ptes corresponding to unused guest pages every time they
get unmapped. KVM has no reasonable way to clear the bit once the page
is in use again.
While set_ptes() checks and clears the bit, other paths that set new
ptes did not. This led to used pages being thrown out as if they were
unused, causing guest corruption.
Fix the issue by clearing the _PAGE_UNUSED bit for present ptes in
set_pte(), i.e. whenever a present pte is getting set. The check in
set_ptes() is then redundant and can be removed.
Also fix gmap_helper_try_set_pte_unused() to only set the bit if the
pte is present; the _PAGE_UNUSED bit is only defined for present ptes
and thus should not be set for non-present ptes.
CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
CVSS Score: 9.3
AV:L - The bug is only reachable on s390 KVM hosts when a guest drives CMMA/ESSA page-state changes and gmap unmaps that reach gmap_helper_try_set_pte_unused() and host try_to_unmap_one()/try_to_migrate_one() on kvm->mm; there is no network or physical-bus entry point.
AC:L - A guest can deterministically mark pages unused via ESSA, remap them through PTE-install paths that left stale _PAGE_UNUSED set, then induce host reclaim/migration with memory pressure; no attacker-uncontrollable race or rare layout is required on CMMA-enabled s390 KVM.
PR:N - A malicious KVM guest tenant on an IBM Z/LinuxONE host with CMMA-enabled VMs needs no host root, capabilities, or /dev/kvm access—only guest supervisor memory management that issues ESSA and normal guest page reuse to trigger the stale-bit discard path.
UI:N - No victim interaction is required; once a CMMA-enabled s390 KVM guest is running, the attacker directly drives ESSA unused marking, guest remap/fault activity, and memory-pressure workloads to trigger premature host-side page discard.
S:C - The flaw corrupts host-kernel management of kvm->mm backing pages from guest-controlled CMMA state, discarding live present pages outside the guest security authority and enabling cross-boundary host memory corruption/disclosure primitives.
C:H - Prematurely discarding present backing pages while guest mappings remain can free and reallocate folios, exposing prior page contents on refault and providing UAF-class read primitives consistent with memory-corruption confidentiality impact.
I:H - Stale _PAGE_UNUSED causes try_to_unmap_one()/try_to_migrate_one() to drop in-use guest backing pages instead of swapping/migrating them, enabling arbitrary guest memory corruption and host mm metadata corruption exploitable for control-flow hijacking.
A:H - Incorrect discard during host reclaim, migration, or unmap can panic/oops the kernel or repeatedly corrupt guest RAM, causing guest or host denial of service that the attacker can retrigger with memory-pressure workloads.
| Attack Vector |
Local |
Scope |
Changed |
| Attack Complexity |
Low |
Confidentiality Impact |
High |
| Privileges Required |
None |
Integrity Impact |
High |
| User Interaction |
None |
Availability Impact |
High |
AV:L - The bug is only reachable on s390 KVM hosts when a guest drives CMMA/ESSA page-state changes and gmap unmaps that reach gmap_helper_try_set_pte_unused() and host try_to_unmap_one()/try_to_migrate_one() on kvm->mm; there is no network or physical-bus entry point.
AC:L - A guest can deterministically mark pages unused via ESSA, remap them through PTE-install paths that left stale _PAGE_UNUSED set, then induce host reclaim/migration with memory pressure; no attacker-uncontrollable race or rare layout is required on CMMA-enabled s390 KVM.
PR:N - A malicious KVM guest tenant on an IBM Z/LinuxONE host with CMMA-enabled VMs needs no host root, capabilities, or /dev/kvm access—only guest supervisor memory management that issues ESSA and normal guest page reuse to trigger the stale-bit discard path.
UI:N - No victim interaction is required; once a CMMA-enabled s390 KVM guest is running, the attacker directly drives ESSA unused marking, guest remap/fault activity, and memory-pressure workloads to trigger premature host-side page discard.
S:C - The flaw corrupts host-kernel management of kvm->mm backing pages from guest-controlled CMMA state, discarding live present pages outside the guest security authority and enabling cross-boundary host memory corruption/disclosure primitives.
C:H - Prematurely discarding present backing pages while guest mappings remain can free and reallocate folios, exposing prior page contents on refault and providing UAF-class read primitives consistent with memory-corruption confidentiality impact.
I:H - Stale _PAGE_UNUSED causes try_to_unmap_one()/try_to_migrate_one() to drop in-use guest backing pages instead of swapping/migrating them, enabling arbitrary guest memory corruption and host mm metadata corruption exploitable for control-flow hijacking.
A:H - Incorrect discard during host reclaim, migration, or unmap can panic/oops the kernel or repeatedly corrupt guest RAM, causing guest or host denial of service that the attacker can retrigger with memory-pressure workloads.
CVSS 3.1