CVE-2026-72412: s390/mm: Fix handling of _PAGE_UNUSED pte bit
From: Greg Kroah-Hartman <[email protected]>
Description
===========
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.
The Linux kernel CVE team has assigned CVE-2026-72412 to this issue.
Affected and fixed versions
===========================
Issue introduced in 7.0 with commit c98175b7917fa81cd499b1527c4a57fd7d36711e and fixed in 7.1.5 with commit fda07c8e4b54b9105f1ca73f0adea7b244d405f4 Issue introduced in 7.0 with commit c98175b7917fa81cd499b1527c4a57fd7d36711e and fixed in 7.2-rc1 with commit d4bb00704a66024502261fa7a523c07420249fea
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-72412
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
arch/s390/include/asm/pgtable.h arch/s390/mm/gmap_helpers.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/fda07c8e4b54b9105f1ca73f0adea7b244d405f4 https://git.kernel.org/stable/c/d4bb00704a66024502261fa7a523c07420249fea