CVE-2022-49557
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2022-49557 affects the Linux kernel's x86/fpu KVM (Kernel-based Virtual Machine) component. The vulnerability was discovered when setting the uABI size to the host's default size, which resulted in out-of-bounds writes and data corruption when running on hosts without XSAVE support, particularly on Core2 CPUs (Kernel Git).

Technical details

The vulnerability occurs in the FPU (Floating Point Unit) state handling for KVM guests. When saving FPU state for userspace, KVM sets the FP+SSE bits in the XSAVE header even if the host doesn't support XSAVE. This operation can lead to out-of-bounds writes when setting the FP+SSE bits and potential data corruption, which was detected by KASAN (Kernel Address Sanitizer). The issue specifically manifests when the uABI size is set to the host's default size instead of KVM's historical uABI size (Kernel Git).

Impact

The vulnerability can result in data corruption and potential system instability when running KVM virtual machines on hosts without XSAVE support, particularly affecting systems using Core2 CPUs. The issue primarily impacts the migration of VM states between hosts with different XSAVE support configurations (Kernel Git).

Mitigation and workarounds

The fix involves setting the starting uABI size of KVM's guest FPU to 'struct kvmxsave', which represents KVM's historical uABI size. Additionally, a warning (WARNON_ONCE) was implemented to detect if the default size is larger than KVM's base uABI size, as all features that can expand the uABI size must be opt-in (Kernel Git).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

“Best User Experience I have ever seen, provides full visibility to cloud workloads.”
David EstlickCISO
“Wiz provides a single pane of glass to see what is going on in our cloud environments.”
Adam FletcherChief Security Officer
“We know that if Wiz identifies something as critical, it actually is.”
Greg PoniatowskiHead of Threat and Vulnerability Management