Out-of-Bounds Write Vulnerability in Linux Kernel Affecting KVM's Guest FPU State
Summary
CVE-2022-49557: 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. Affects linux versions < 5.18.2-1. Fixed in 5.18.2-1. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The Linux kernel is a core component of many operating systems, providing essential services for hardware management and system resources. It supports various functionalities, including virtualization through Kernel-based Virtual Machine (KVM). This vulnerability specifically impacts the FPU (Floating Point Unit) state management in KVM, which is crucial for running virtual machines efficiently. The issue arises when the kernel attempts to save the FPU state for a guest operating system, leading to potential data corruption.
Vulnerability Detail
The vulnerability, identified as CVE-2022-49557, originates from the improper handling of the FPU state size in KVM. When the kernel saves the FPU state for a guest, it sets the XSAVE header bits even if the host does not support XSAVE. This can lead to out-of-bounds writes when the uABI size is set incorrectly, resulting in data corruption. The issue is particularly severe on hosts without XSAVE support, such as Core2 CPUs, where it can cause system instability and crashes.
How To Fix
Minimum fixed version
5.18.2-1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade linux
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
Currently, there are no specific workarounds mentioned for this vulnerability. However, users are advised to avoid running virtual machines on hosts that do not support XSAVE until the patch is applied.
Conclusion
CVE-2022-49557 is a significant vulnerability in the Linux kernel affecting KVM's handling of FPU state, which can lead to data corruption and system instability. Users are urged to update to the patched version to mitigate risks associated with this vulnerability.
See every vulnerability recorded for linux →
FAQ
CVE-2022-49557 is a vulnerability in the Linux kernel that affects the handling of the FPU state in KVM, leading to potential out-of-bounds writes and data corruption.
If your system runs virtual machines using KVM on hardware that does not support XSAVE, it may experience instability or crashes due to data corruption.
If you are using a version of the Linux kernel prior to 5.18.2-1 and your hardware does not support XSAVE, your system is likely vulnerable.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.
If an immediate update is not possible, consider avoiding the use of KVM on unsupported hardware until the patch is applied.
Related vulnerabilities
Recent vulnerabilities recorded for linux.