CVE-2021-47226
JSON

7.1high

x86/fpu: Invalidate FPU state after a failed XRSTOR from a user buffer

Severity
7.1high CVSS:3.1 by Linux
Exploit likelihood
0.22% (higher than 13% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

Description

In the Linux kernel, the following vulnerability has been resolved: x86/fpu: Invalidate FPU state after a failed XRSTOR from a user buffer Both Intel and AMD consider it to be architecturally valid for XRSTOR to fail with #PF but nonetheless change the register state. The actual conditions under which this might occur are unclear [1], but it seems plausible that this might be triggered if one sibling thread unmaps a page and invalidates the shared TLB while another sibling thread is executing XRSTOR on the page in question. __fpu__restore_sig() can execute XRSTOR while the hardware registers are preserved on behalf of a different victim task (using the fpu_fpregs_owner_ctx mechanism), and, in theory, XRSTOR could fail but modify the registers. If this happens, then there is a window in which __fpu__restore_sig() could schedule out and the victim task could schedule back in without reloading its own FPU registers. This would result in part of the FPU state that __fpu__restore_sig() was attempting to load leaking into the victim task's user-visible state. Invalidate preserved FPU registers on XRSTOR failure to prevent this situation from corrupting any state. [1] Frequent readers of the errata lists might imagine "complex microarchitectural conditions".

Affected

Product or packageVersionsReported by
Linux Linuxfrom 1d731e731c4cd7cbd3b1aa295f0932e7610da82f before a7748e021b9fb7739e3cb88449296539de0b6817, from 1d731e731c4cd7cbd3b1aa295f0932e7610da82f before 002665dcba4bbec8c82f0aeb4bd3f44334ed2c14, from 1d731e731c4cd7cbd3b1aa295f0932e7610da82f before d8778e393afa421f1f117471144f8ce6deb6953a, 5.2
Not affected: before 5.2, from 5.10.46 up to 5.10.*, from 5.12.13 up to 5.12.*, from 5.13 up to *
CVE List
linux linux_kernelfrom 5.2 before 5.10.46, from 5.11 before 5.12.13, 5.13NVD

All scores

Linux7.1high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
NVD7.1high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H

Classification

CWE-203

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

In the Linux kernel, the following vulnerability has been resolved: x86/fpu: Invalidate FPU state after a failed XRSTOR from a user buffer Both Intel and AMD consider it to be architecturally valid for XRSTOR to fail with #PF but nonetheless change the register state. The actual conditions under which this might occur are unclear [1], but it seems plausible that this might be triggered if one sibling thread unmaps a page and invalidates the shared TLB while another sibling thread is executing XRSTOR on the page in question. __fpu__restore_sig() can execute XRSTOR while the hardware registers are preserved on behalf of a different victim task (using the fpu_fpregs_owner_ctx mechanism), and, in theory, XRSTOR could fail but modify the registers. If this happens, then there is a window in which __fpu__restore_sig() could schedule out and the victim task could schedule back in without reloading its own FPU registers. This would result in part of the FPU state that __fpu__restore_sig() was attempting to load leaking into the victim task's user-visible state. Invalidate preserved FPU registers on XRSTOR failure to prevent this situation from corrupting any state. [1] Frequent readers of the errata lists might imagine "complex microarchitectural conditions".

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: x86/fpu: Invalida el estado de la FPU después de un XRSTOR fallido desde un búfer de usuario. Tanto Intel como AMD consideran que es arquitectónicamente válido que XRSTOR falle con #PF pero aun así cambie el estado del registro. . Las condiciones reales bajo las cuales esto podría ocurrir no están claras [1], pero parece plausible que esto pueda desencadenarse si un hilo hermano desasigna una página e invalida el TLB compartido mientras otro hilo hermano está ejecutando XRSTOR en la página en cuestión. __fpu__restore_sig() puede ejecutar XRSTOR mientras los registros de hardware se conservan en nombre de una tarea de víctima diferente (usando el mecanismo fpu_fpregs_owner_ctx) y, en teoría, XRSTOR podría fallar pero modificar los registros. Si esto sucede, entonces hay una ventana en la que __fpu__restore_sig() podría programar la salida y la tarea de la víctima podría volver a programarse sin recargar sus propios registros FPU. Esto resultaría en parte del estado de la FPU en el que __fpu__restore_sig() intentaba cargar una filtración en el estado visible para el usuario de la tarea de la víctima. Invalide los registros FPU preservados en caso de falla de XRSTOR para evitar que esta situación corrompa cualquier estado. [1] Los lectores frecuentes de las listas de erratas podrían imaginar "condiciones microarquitectónicas complejas".

References

Sources

SourceRecordLicence
CVE ListCVE-2021-47226 changed 2026-08-05CVE Terms of Use
NVDCVE-2021-47226 changed 2026-08-04Public domain