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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.24% (percentile 9, 2026-11-26)
- **Published:** 2025-05-01T14:09:17.054Z
- **Modified:** 2026-11-05T20:17:11.143Z

## Who should check

- Anyone running Linux \>= 9e798e9aa14c45fb94e47b30bf6347b369ce9df7, \< c6e8a7a1780af3da65e78a615f7d0874da6aabb0; \>= 9e798e9aa14c45fb94e47b30bf6347b369ce9df7, \< 36b038791e1e2baea892e9276588815fd14894b4
- Anyone running Linux 5.16

## 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 and fixed versions

- Linux: \>= 9e798e9aa14c45fb94e47b30bf6347b369ce9df7, \< c6e8a7a1780af3da65e78a615f7d0874da6aabb0; \>= 9e798e9aa14c45fb94e47b30bf6347b369ce9df7, \< 36b038791e1e2baea892e9276588815fd14894b4 (cvelist)
- Linux: 5.16 (cvelist)

## Mitigation

- Upgrade Linux to 36b038791e1e2baea892e9276588815fd14894b4 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-49783. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-49783.md
Affected: Linux >= 9e798e9aa14c45fb94e47b30bf6347b369ce9df7, < c6e8a7a1780af3da65e78a615f7d0874da6aabb0; >= 9e798e9aa14c45fb94e47b30bf6347b369ce9df7, < 36b038791e1e2baea892e9276588815fd14894b4; Linux 5.16
Fixed in: Linux 36b038791e1e2baea892e9276588815fd14894b4

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-49783 being exploited?

There is no confirmed exploitation: CVE-2022-49783 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.24% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-49783?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-49783?

Linux \>= 9e798e9aa14c45fb94e47b30bf6347b369ce9df7, \< c6e8a7a1780af3da65e78a615f7d0874da6aabb0; \>= 9e798e9aa14c45fb94e47b30bf6347b369ce9df7, \< 36b038791e1e2baea892e9276588815fd14894b4; Linux 5.16.

### Is there a fix for CVE-2022-49783?

Yes. Fixed in Linux 36b038791e1e2baea892e9276588815fd14894b4. Upgrade Linux to 36b038791e1e2baea892e9276588815fd14894b4 or later.

### How do I check if I'm affected by CVE-2022-49783?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/c6e8a7a1780af3da65e78a615f7d0874da6aabb0>
- patch: <https://git.kernel.org/stable/c/36b038791e1e2baea892e9276588815fd14894b4>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-49783>

HTML: <https://flawdb.com/CVE-2022-49783> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-49783>
