CVE-2021-47227: x86/fpu: Prevent state corruption in __fpu__restore_sig()
In the Linux kernel, the following vulnerability has been resolved:
x86/fpu: Prevent state corruption in __fpu__restore_sig()
The non-compacted slowpath uses __copy_from_user() and copies the entire
user buffer into the kernel buffer, verbatim. This means that the kernel
buffer may now contain entirely invalid state on which XRSTOR will #GP.
validate_user_xstate_header() can detect some of that corruption, but that
leaves the onus on callers to clear the buffer.
Prior to XSAVES support, it was possible just to reinitialize the buffer,
completely, but with supervisor states that is not longer possible as the
buffer clearing code split got it backwards. Fixing that is possible but
not corrupting the state in the first place is more robust.
Avoid corruption of the kernel XSAVE buffer by using copy_user_to_xstate()
which validates the XSAVE header contents before copying the actual states
to the kernel. copy_user_to_xstate() was previously only called for
compacted-format kernel buffers, but it works for both compacted and
non-compacted forms.
Using it for the non-compacted form is slower because of multiple
__copy_from_user() operations, but that cost is less important than robust
code in an already slow path.
[ Changelog polished by Dave Hansen ]
Security readout for executives and security teams
Plain-English summary
This is a Linux kernel x86/FPU bug where user-supplied signal state could corrupt the kernel XSAVE buffer. The public record says the kernel now validates XSAVE header data before copying state. Business risk depends on whether affected Linux kernel builds are running; the source bundle does not provide CVSS, CWE, or confirmed impact severity.
Executive priority
Treat this as a kernel hygiene and patch-management item, not an emergency based on current evidence. Prioritize normal security update cycles, with faster handling for shared or sensitive Linux infrastructure.
Technical view
In __fpu__restore_sig(), the non-compacted slow path copied a full user buffer into a kernel XSAVE buffer before validation. Invalid state could later trigger XRSTOR #GP. The fix uses copy_user_to_xstate() for non-compacted buffers so XSAVE header contents are validated before actual state is copied.
Likely exposure
Exposure is most relevant to x86 Linux systems running affected kernel versions listed in the CVE bundle. The bundle references Linux 5.8-era affected data and stable kernel fixes, but distribution-specific package status must be verified against vendor advisories.
Exploitation context
The provided bundle marks KEV as false and includes no cited evidence of active exploitation. It also lacks CVSS, CWE, and exploitability details, so exploitation likelihood and practical impact should be treated as unconfirmed from these sources.
Researcher notes
The key condition is the signal-restore XSAVE path on x86. The source record describes prevention of kernel XSAVE buffer corruption by validating before copy. The bundle does not establish a concrete attacker model, privilege impact, or affected distribution matrix.
Mitigation direction
Check Linux distribution advisories for CVE-2021-47227 patch availability.
Upgrade affected Linux kernels to vendor-supported fixed builds.
Prioritize internet-facing, multi-user, and workload-hosting Linux systems.
Track the cited upstream stable commits in kernel maintenance records.
Avoid unsupported kernels where vendor backport status cannot be confirmed.
Validation and detection
Inventory x86 Linux hosts and record exact kernel versions.
Map each kernel package to its distribution security advisory status.
Confirm whether the cited upstream stable fix is present or backported.
Review vulnerability scanner results for CVE-2021-47227 with kernel package evidence.
Document exceptions where vendor guidance is unavailable or unclear.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2021-47227 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.