Vulnerability · Published May 1, 2025 · Assigned by Linux

CVE-2022-49783x86/fpu: Drop fpregs lock before inheriting FPU permissions

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 6% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS NVD)5.5Medium
Exploit odds (30 days)0.2%top 93.5% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

In the Linux kernel, the following vulnerability has been resolved: x86/fpu: Drop fpregs lock before inheriting FPU permissions Mike Galbraith reported the following against an old fork of preempt-rt but the same issue also applies to the current preempt-rt tree. BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:46 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1, name: systemd preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 Preemption disabled at: fpu_clone CPU: 6 PID: 1 Comm: systemd Tainted: G E (unreleased) Call Trace: <TASK> dump_stack_lvl ? fpu_clone __might_resched rt_spin_lock fpu_clone ? copy_thread ? copy_process ? shmem_alloc_inode ? kmem_cache_alloc ? kernel_clone ? __do_sys_clone ? do_syscall_64 ? __x64_sys_rt_sigprocmask ? syscall_exit_to_user_mode ? do_syscall_64 ? syscall_exit_to_user_mode ? do_syscall_64 ? syscall_exit_to_user_mode ? do_syscall_64 ? exc_page_fault ? entry_SYSCALL_64_after_hwframe </TASK> Mike says: The splat comes from fpu_inherit_perms() being called under fpregs_lock(), and us reaching the spin_lock_irq() therein due to fpu_state_size_dynamic() returning true despite static key __fpu_state_size_dynamic having never been enabled. Mike's assessment looks correct. fpregs_lock on a PREEMPT_RT kernel disables preemption so calling spin_lock_irq() in fpu_inherit_perms() is unsafe. This problem exists since commit 9e798e9aa14c ("x86/fpu: Prepare fpu_clone() for dynamically enabled features"). Even though the original bug report should not have enabled the paths at all, the bug still exists. fpregs_lock is necessary when editing the FPU registers or a task's FP state but it is not necessary for fpu_inherit_perms(). The only write of any FP state in fpu_inherit_perms() is for the new child which is not running yet and cannot context switch or be borrowed by a kernel thread yet. Hence, fpregs_lock is not protecting anything in the new child until clone() completes and can be dropped earlier. The siglock still needs to be acquired by fpu_inherit_perms() as the read of the parent's permissions has to be serialised. [ bp: Cleanup splat. ]

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12linux6.0.10-1DEBIAN-CVE-2022-49783
Debian:13linux6.0.10-1DEBIAN-CVE-2022-49783
Debian:14linux6.0.10-1DEBIAN-CVE-2022-49783
Ubuntu:22.04:LTSlinuxno fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-awsno fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-azureno fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-azure-fdeno fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-gcpno fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-gkeno fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-gkeopno fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-ibmno fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-intel-iot-realtimeno fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-intel-iotgno fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-kvmno fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-lowlatencyno fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-nvidiano fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-nvidia-6.5no fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-nvidia-tegrano fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-nvidia-tegra-igxno fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-oracleno fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-raspino fix listedUBUNTU-CVE-2022-49783
Ubuntu:24.04:LTSlinux-raspi-realtimeno fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2022-49783
Ubuntu:24.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2022-49783
Ubuntu:22.04:LTSlinux-xilinx-zynqmpno fix listedUBUNTU-CVE-2022-49783

Affected products (as reported)

VendorProductVersions
Linux Linux 9e798e9aa14c45fb94e47b30bf6347b369ce9df7 – before c6e8a7a1780af3da65e78a615f7d0874da6aabb09e798e9aa14c45fb94e47b30bf6347b369ce9df7 – before 36b038791e1e2baea892e9276588815fd14894b4
Linux Linux 5.16

References