# CVE-2022-49557: x86/fpu: KVM: Set the base guest FPU uABI size to sizeof(struct kvm\_xsave)

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

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; 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.30% (percentile 16, 2026-11-26)
- **CWE:** CWE-787
- **Published:** 2025-02-26T02:14:04.090Z
- **Modified:** 2026-08-05T08:55:42.945Z

## Who should check

- Anyone running Linux \>= c60427dd50ba9b20063ccaed0e98d62e886d7a3b, \< 9cf15ebb7dedfe2f27120743b8ea8441c99ac73c; \>= c60427dd50ba9b20063ccaed0e98d62e886d7a3b, \< c181acbd1a427859d5fda543b95fbae28f7f6068; \>= c60427dd50ba9b20063ccaed0e98d62e886d7a3b, \< d187ba5312307d51818beafaad87d28a7d939adf
- Anyone running Linux 5.17

## Description

In the Linux kernel, the following vulnerability has been resolved:

x86/fpu: KVM: Set the base guest FPU uABI size to sizeof(struct kvm\_xsave)

Set the starting uABI size of KVM's guest FPU to 'struct kvm\_xsave',
i.e. to KVM's historical uABI size.  When saving FPU state for usersapce,
KVM (well, now the FPU) sets the FP+SSE bits in the XSAVE header even if
the host doesn't support XSAVE.  Setting the XSAVE header allows the VM
to be migrated to a host that does support XSAVE without the new host
having to handle FPU state that may or may not be compatible with XSAVE.

Setting the uABI size to the host's default size results in out-of-bounds
writes (setting the FP+SSE bits) and data corruption (that is thankfully
caught by KASAN) when running on hosts without XSAVE, e.g. on Core2 CPUs.

WARN if the default size is larger than KVM's historical uABI size; all
features that can push the FPU size beyond the historical size must be
opt-in.

  ==================================================================
  BUG: KASAN: slab-out-of-bounds in fpu\_copy\_uabi\_to\_guest\_fpstate+0x86/0x130
  Read of size 8 at addr ffff888011e33a00 by task qemu-build/681
  CPU: 1 PID: 681 Comm: qemu-build Not tainted 5.18.0-rc5-KASAN-amd64 \#1
  Hardware name:  /DG35EC, BIOS ECG3510M.86A.0118.2010.0113.1426 01/13/2010
  Call Trace:
   \<TASK\>
   dump\_stack\_lvl+0x34/0x45
   print\_report.cold+0x45/0x575
   kasan\_report+0x9b/0xd0
   fpu\_copy\_uabi\_to\_guest\_fpstate+0x86/0x130
   kvm\_arch\_vcpu\_ioctl+0x72a/0x1c50 \[kvm\]
   kvm\_vcpu\_ioctl+0x47f/0x7b0 \[kvm\]
   \_\_x64\_sys\_ioctl+0x5de/0xc90
   do\_syscall\_64+0x31/0x50
   entry\_SYSCALL\_64\_after\_hwframe+0x44/0xae
   \</TASK\>
  Allocated by task 0:
  (stack is not available)
  The buggy address belongs to the object at ffff888011e33800
   which belongs to the cache kmalloc-512 of size 512
  The buggy address is located 0 bytes to the right of
   512-byte region \[ffff888011e33800, ffff888011e33a00)
  The buggy address belongs to the physical page:
  page:0000000089cd4adb refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11e30
  head:0000000089cd4adb order:2 compound\_mapcount:0 compound\_pincount:0
  flags: 0x4000000000010200(slab\|head\|zone=1)
  raw: 4000000000010200 dead000000000100 dead000000000122 ffff888001041c80
  raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000
  page dumped because: kasan: bad access detected
  Memory state around the buggy address:
   ffff888011e33900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
   ffff888011e33980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  \>ffff888011e33a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                     ^
   ffff888011e33a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
   ffff888011e33b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
  ==================================================================
  Disabling lock debugging due to kernel taint

## Affected and fixed versions

- Linux: \>= c60427dd50ba9b20063ccaed0e98d62e886d7a3b, \< 9cf15ebb7dedfe2f27120743b8ea8441c99ac73c; \>= c60427dd50ba9b20063ccaed0e98d62e886d7a3b, \< c181acbd1a427859d5fda543b95fbae28f7f6068; \>= c60427dd50ba9b20063ccaed0e98d62e886d7a3b, \< d187ba5312307d51818beafaad87d28a7d939adf (cvelist)
- Linux: 5.17 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2022-49557.md
Affected: Linux >= c60427dd50ba9b20063ccaed0e98d62e886d7a3b, < 9cf15ebb7dedfe2f27120743b8ea8441c99ac73c; >= c60427dd50ba9b20063ccaed0e98d62e886d7a3b, < c181acbd1a427859d5fda543b95fbae28f7f6068; >= c60427dd50ba9b20063ccaed0e98d62e886d7a3b, < d187ba5312307d51818beafaad87d28a7d939adf; Linux 5.17
Fixed in: Linux 9cf15ebb7dedfe2f27120743b8ea8441c99ac73c

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-49557 being exploited?

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

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

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= c60427dd50ba9b20063ccaed0e98d62e886d7a3b, \< 9cf15ebb7dedfe2f27120743b8ea8441c99ac73c; \>= c60427dd50ba9b20063ccaed0e98d62e886d7a3b, \< c181acbd1a427859d5fda543b95fbae28f7f6068; \>= c60427dd50ba9b20063ccaed0e98d62e886d7a3b, \< d187ba5312307d51818beafaad87d28a7d939adf; Linux 5.17.

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

Yes. Fixed in Linux 9cf15ebb7dedfe2f27120743b8ea8441c99ac73c. No fix listed yet: follow the vendor advisory.

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

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/9cf15ebb7dedfe2f27120743b8ea8441c99ac73c>
- patch: <https://git.kernel.org/stable/c/c181acbd1a427859d5fda543b95fbae28f7f6068>
- patch: <https://git.kernel.org/stable/c/d187ba5312307d51818beafaad87d28a7d939adf>

## 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-49557>

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