CVE-2026-31482: s390/entry: Scrub r12 register on kernel entry
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
s390/entry: Scrub r12 register on kernel entry
Before commit f33f2d4c7c80 ("s390/bp: remove TIF_ISOLATE_BP"), all entry handlers loaded r12 with the current task pointer (lg %r12,__LC_CURRENT) for use by the BPENTER/BPEXIT macros. That commit removed TIF_ISOLATE_BP, dropping both the branch prediction macros and the r12 load, but did not add r12 to the register clearing sequence.
Add the missing xgr %r12,%r12 to make the register scrub consistent across all entry points.
The Linux kernel CVE team has assigned CVE-2026-31482 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.4 with commit f33f2d4c7c80c641f6ca3dfe5e7dfe1f91543780 and fixed in 6.6.131 with commit a58d298a83a3a9b7ca99ded9d60a1e77231159ef Issue introduced in 6.4 with commit f33f2d4c7c80c641f6ca3dfe5e7dfe1f91543780 and fixed in 6.12.80 with commit 95c899cd791803a5bf7b73e5994fbbe1cc1a9c36 Issue introduced in 6.4 with commit f33f2d4c7c80c641f6ca3dfe5e7dfe1f91543780 and fixed in 6.18.21 with commit 7f4e3233faa8470dd0627bc49b2809f2bfebd909 Issue introduced in 6.4 with commit f33f2d4c7c80c641f6ca3dfe5e7dfe1f91543780 and fixed in 6.19.11 with commit 99a8b420f3f0e162eb9c9c9253929d4d23f9bd30 Issue introduced in 6.4 with commit f33f2d4c7c80c641f6ca3dfe5e7dfe1f91543780 and fixed in 7.0 with commit 0738d395aab8fae3b5a3ad3fc640630c91693c27
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-31482
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/kernel/entry.S
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/a58d298a83a3a9b7ca99ded9d60a1e77231159ef https://git.kernel.org/stable/c/95c899cd791803a5bf7b73e5994fbbe1cc1a9c36 https://git.kernel.org/stable/c/7f4e3233faa8470dd0627bc49b2809f2bfebd909 https://git.kernel.org/stable/c/99a8b420f3f0e162eb9c9c9253929d4d23f9bd30 https://git.kernel.org/stable/c/0738d395aab8fae3b5a3ad3fc640630c91693c27