Vulnerability · Published Jan 19, 2025 · Assigned by Linux
CVE-2025-21632x86/fpu: Ensure shadow stack is active before "getting" registers
Medium 5.5
In plain English
A medium-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 11% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: x86/fpu: Ensure shadow stack is active before "getting" registers The x86 shadow stack support has its own set of registers. Those registers are XSAVE-managed, but they are "supervisor state components" which means that userspace can not touch them with XSAVE/XRSTOR. It also means that they are not accessible from the existing ptrace ABI for XSAVE state. Thus, there is a new ptrace get/set interface for it. The regset code that ptrace uses provides an ->active() handler in addition to the get/set ones. For shadow stack this ->active() handler verifies that shadow stack is enabled via the ARCH_SHSTK_SHSTK bit in the thread struct. The ->active() handler is checked from some call sites of the regset get/set handlers, but not the ptrace ones. This was not understood when shadow stack support was put in place. As a result, both the set/get handlers can be called with XFEATURE_CET_USER in its init state, which would cause get_xsave_addr() to return NULL and trigger a WARN_ON(). The ssp_set() handler luckily has an ssp_active() check to avoid surprising the kernel with shadow stack behavior when the kernel is not ready for it (ARCH_SHSTK_SHSTK==0). That check just happened to avoid the warning. But the ->get() side wasn't so lucky. It can be called with shadow stacks disabled, triggering the warning in practice, as reported by Christina Schimpe: WARNING: CPU: 5 PID: 1773 at arch/x86/kernel/fpu/regset.c:198 ssp_get+0x89/0xa0 [...] Call Trace: <TASK> ? show_regs+0x6e/0x80 ? ssp_get+0x89/0xa0 ? __warn+0x91/0x150 ? ssp_get+0x89/0xa0 ? report_bug+0x19d/0x1b0 ? handle_bug+0x46/0x80 ? exc_invalid_op+0x1d/0x80 ? asm_exc_invalid_op+0x1f/0x30 ? __pfx_ssp_get+0x10/0x10 ? ssp_get+0x89/0xa0 ? ssp_get+0x52/0xa0 __regset_get+0xad/0xf0 copy_regset_to_user+0x52/0xc0 ptrace_regset+0x119/0x140 ptrace_request+0x13c/0x850 ? wait_task_inactive+0x142/0x1d0 ? do_syscall_64+0x6d/0x90 arch_ptrace+0x102/0x300 [...] Ensure that shadow stacks are active in a thread before looking them up in the XSAVE buffer. Since ARCH_SHSTK_SHSTK and user_ssp[SHSTK_EN] are set at the same time, the active check ensures that there will be something to find in the XSAVE buffer. [ dhansen: changelog/subject tweaks ]
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:13 | linux | 6.12.10-1 | DEBIAN-CVE-2025-21632 |
| Debian:14 | linux | 6.12.10-1 | DEBIAN-CVE-2025-21632 |
| Ubuntu:24.04:LTS | linux | 6.8.0-60.63 | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1029.31 | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1029.31~22.04.1 | UBUNTU-CVE-2025-21632 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1029.34 | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | 6.11.0-1012.12~24.04.1 | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1029.34~22.04.1 | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | 6.8.0-1016.17 | UBUNTU-CVE-2025-21632 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1030.32 | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | 6.11.0-1011.11~24.04.1 | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1030.32~22.04.1 | UBUNTU-CVE-2025-21632 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1025.29 | UBUNTU-CVE-2025-21632 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1012.14 | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:24.04:LTS | linux-hwe-6.11 | 6.11.0-21.21~24.04.1 | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-60.63~22.04.1 | UBUNTU-CVE-2025-21632 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1026.26 | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1026.26~22.04.1 | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-60.63.1 | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-60.63.1~22.04.1 | UBUNTU-CVE-2025-21632 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1028.31 | UBUNTU-CVE-2025-21632 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | 6.11.0-1007.7 | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1028.31~22.04.1 | UBUNTU-CVE-2025-21632 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1028.31.1 | UBUNTU-CVE-2025-21632 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | 6.8.0-1008.8 | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | 6.11.0-1017.17 | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1028.28 | UBUNTU-CVE-2025-21632 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1026.27 | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1026.27~22.04.1 | UBUNTU-CVE-2025-21632 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1028.32 | UBUNTU-CVE-2025-21632 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:24.04:LTS | linux-riscv | 6.8.0-60.63.1 | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-62.65~22.04.1 | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2025-21632 |
| Ubuntu:24.04:LTS | linux-xilinx | 6.8.0-1017.18 | UBUNTU-CVE-2025-21632 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 2fab02b25ae7cf5f714ab456b03d9a3fe5ae98c9 – before 0a3a872214188e4268d31581ed0cd44508e038cf2fab02b25ae7cf5f714ab456b03d9a3fe5ae98c9 – before 6bfe1fc22f462bec87422cdcbec4d7a2f43ff01d2fab02b25ae7cf5f714ab456b03d9a3fe5ae98c9 – before a9d9c33132d49329ada647e4514d210d15e31d81 |
| Linux | Linux | 6.6 |