{"id":"CVE-2025-21632","title":"x86/fpu: Ensure shadow stack is active before \"getting\" registers","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nx86/fpu: Ensure shadow stack is active before \"getting\" registers\n\nThe x86 shadow stack support has its own set of registers. Those registers\nare XSAVE-managed, but the…","severity":"none","vendor":"Linux","product":"Linux","affected":["Linux >= 2fab02b25ae7cf5f714ab456b03d9a3fe5ae98c9 < 0a3a872214188e4268d31581ed0cd44508e038cf","Linux >= 2fab02b25ae7cf5f714ab456b03d9a3fe5ae98c9 < 6bfe1fc22f462bec87422cdcbec4d7a2f43ff01d","Linux >= 2fab02b25ae7cf5f714ab456b03d9a3fe5ae98c9 < a9d9c33132d49329ada647e4514d210d15e31d81","Linux 6.6"],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-11-05T20:33:59.017819Z"},"published":"2025-01-19","updated":"2026-11-05","sourceUpdated":"2026-11-05T20:41:40.063Z","source":"CVEORG","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2025-21632","references":[{"url":"https://git.kernel.org/stable/c/0a3a872214188e4268d31581ed0cd44508e038cf"},{"url":"https://git.kernel.org/stable/c/6bfe1fc22f462bec87422cdcbec4d7a2f43ff01d"},{"url":"https://git.kernel.org/stable/c/a9d9c33132d49329ada647e4514d210d15e31d81"}],"tags":["cve.org"],"epss":0.00206,"epssPercentile":0.10698,"ingestedAt":"2026-11-05T22:38:31.847Z","slug":"CVE-2025-21632","body":"## Overview\n\nIn the Linux kernel, the following vulnerability has been resolved:\n\nx86/fpu: Ensure shadow stack is active before \"getting\" registers\n\nThe x86 shadow stack support has its own set of registers. Those registers\nare XSAVE-managed, but they are \"supervisor state components\" which means\nthat userspace can not touch them with XSAVE/XRSTOR.  It also means that\nthey are not accessible from the existing ptrace ABI for XSAVE state.\nThus, there is a new ptrace get/set interface for it.\n\nThe regset code that ptrace uses provides an ->active() handler in\naddition to the get/set ones. For shadow stack this ->active() handler\nverifies that shadow stack is enabled via the ARCH_SHSTK_SHSTK bit in the\nthread struct. The ->active() handler is checked from some call sites of\nthe regset get/set handlers, but not the ptrace ones. This was not\nunderstood when shadow stack support was put in place.\n\nAs a result, both the set/get handlers can be called with\nXFEATURE_CET_USER in its init state, which would cause get_xsave_addr() to\nreturn NULL and trigger a WARN_ON(). The ssp_set() handler luckily has an\nssp_active() check to avoid surprising the kernel with shadow stack\nbehavior when the kernel is not ready for it (ARCH_SHSTK_SHSTK==0). That\ncheck just happened to avoid the warning.\n\nBut the ->get() side wasn't so lucky. It can be called with shadow stacks\ndisabled, triggering the warning in practice, as reported by Christina\nSchimpe:\n\nWARNING: CPU: 5 PID: 1773 at arch/x86/kernel/fpu/regset.c:198 ssp_get+0x89/0xa0\n[...]\nCall Trace:\n<TASK>\n? show_regs+0x6e/0x80\n? ssp_get+0x89/0xa0\n? __warn+0x91/0x150\n? ssp_get+0x89/0xa0\n? report_bug+0x19d/0x1b0\n? handle_bug+0x46/0x80\n? exc_invalid_op+0x1d/0x80\n? asm_exc_invalid_op+0x1f/0x30\n? __pfx_ssp_get+0x10/0x10\n? ssp_get+0x89/0xa0\n? ssp_get+0x52/0xa0\n__regset_get+0xad/0xf0\ncopy_regset_to_user+0x52/0xc0\nptrace_regset+0x119/0x140\nptrace_request+0x13c/0x850\n? wait_task_inactive+0x142/0x1d0\n? do_syscall_64+0x6d/0x90\narch_ptrace+0x102/0x300\n[...]\n\nEnsure that shadow stacks are active in a thread before looking them up\nin the XSAVE buffer. Since ARCH_SHSTK_SHSTK and user_ssp[SHSTK_EN] are\nset at the same time, the active check ensures that there will be\nsomething to find in the XSAVE buffer.\n\n[ dhansen: changelog/subject tweaks ]\n\n## Affected\n\n- `Linux >= 2fab02b25ae7cf5f714ab456b03d9a3fe5ae98c9 < 0a3a872214188e4268d31581ed0cd44508e038cf`\n- `Linux >= 2fab02b25ae7cf5f714ab456b03d9a3fe5ae98c9 < 6bfe1fc22f462bec87422cdcbec4d7a2f43ff01d`\n- `Linux >= 2fab02b25ae7cf5f714ab456b03d9a3fe5ae98c9 < a9d9c33132d49329ada647e4514d210d15e31d81`\n- `Linux 6.6`\n\n## Remediation\n\nRefer to the linked advisories for vendor-supplied fixes and affected version ranges.","depth":"sunlit","depthScore":3,"depthScoreParts":{"impact":2.8,"likelihood":0,"exploitation":0,"ransomware":0},"changes":[]}