CVE-2022-49556·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: KVM: SVM: Use kzalloc for sev ioctl interfaces to prevent kernel data leak For some sev ioctl interfaces, the length parameter that is passed maybe less than or equal to SEV_FW_BLOB_MAX_SIZE, but larger than the data that PSP firmware returns. In this case, kmalloc will allocate memory that is the size of the input rather than the size of the data. Since PSP firmware doesn't fully overwrite the allocated buffer, these sev ioctl interface may return uninitialized kernel slab memory.
- Severity
- high
- Software
- Kernel
- Fixed in
- 5.18.2
- Published
- 2025-02-26
Affected versions
From: 5.18
Until: 5.18.2
Fixed in: 5.18.2
How to fix this CVE
Update your Linux kernel to version 5.18.2 or later to fix the memory initialization vulnerability in KVM/SVM ioctl handlers. This patch replaces kmalloc with kzalloc to ensure allocated buffers are zeroed before use, preventing uninitialized kernel memory from being returned to userspace. Systems running kernel versions 5.18 through 5.18.1 should prioritize this update to eliminate the risk of information disclosure.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check installed kernel version with `uname -r` and compare against affected range 5.18.0-5.18.1
- Step 2: Verify KVM/SEV support is enabled with `grep -E 'CONFIG_KVM|CONFIG_KVM_AMD' /boot/config-$(uname -r)`
- Step 3: Review kernel logs for SEV-related ioctl calls using `journalctl -k | grep -i sev` or `dmesg | grep -i sev`
- Step 4: After patching, confirm new kernel version with `uname -r` and verify it is 5.18.2 or later
FAQ
What is CVE-2022-49556?
This vulnerability exists in the KVM/SVM subsystem where certain SEV (Secure Encrypted Virtualization) ioctl handlers allocate buffers using kmalloc but fail to initialize them completely, allowing uninitialized kernel memory to leak to userspace applications.
Is CVE-2022-49556 being actively exploited?
No, this vulnerability is not listed on the CISA Known Exploited Vulnerabilities catalog and no public exploits are currently available.
What versions of Kernel are affected by CVE-2022-49556?
Linux kernel versions 5.18.0 through 5.18.1 are affected. Version 5.18.2 and all later versions contain the fix.
How do I check if my server is vulnerable to CVE-2022-49556?
Run `uname -r` to display your kernel version. If it shows 5.18.0 or 5.18.1 and you have KVM with AMD virtualization enabled, your system is vulnerable.
Does Defensia detect CVE-2022-49556?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2022-49556 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/401bef1f95de92c3a8c6eece46e02fa88d7285ee
- https://git.kernel.org/stable/c/57a01725339f9d82b099102ba2751621b1caab93
- https://git.kernel.org/stable/c/bbdcc644b59e01e98c68894a9fab42b9687f42b0
- https://git.kernel.org/stable/c/d22d2474e3953996f03528b84b7f52cc26a39403
- https://git.kernel.org/stable/c/d8fdb4b24097472ff6b3c0559448200d420b1418
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2022-49556. Free for 1 server.
Get started free