KVM: x86: Free kvm_cpuid_entry2 array on post-KVM_RUN KVM_SET_CPUID{,2}
Summary
GSD-2022-1000611: KVM: x86: Free kvm_cpuid_entry2 array on post-KVM_RUN KVM_SET_CPUID{,2}. Affects Kernel versions >= 24e7590c60aa9487b8e43583dc9885f62f8216c1, < b9ee734a14bb685b2088f2176d82b34cb4e30dbc. No fix is published. 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 Kernel is a critical component of the Linux operating system, responsible for managing system resources and facilitating communication between hardware and software. It provides essential functionalities such as process management, memory management, and device drivers. The vulnerability in question affects the Kernel's KVM (Kernel-based Virtual Machine) module, specifically the x86 architecture. KVM allows users to run virtual machines on a Linux host, providing a virtualized environment for various operating systems. This vulnerability pertains to the handling of the kvm_cpuid_entry2 array after the KVM_RUN operation and the KVM_SET_CPUID{,2} ioctl calls.
Vulnerability Detail
The vulnerability arises from a failure to properly free the kvm_cpuid_entry2 array after the KVM_RUN operation and the KVM_SET_CPUID{,2} ioctl calls. This can lead to memory leaks and potential exploitation by malicious actors. While the exact impact and attack vectors have not been proven, it is crucial to address this vulnerability to ensure the security and stability of virtualized environments. The vulnerability was introduced in Linux Kernel version v5.16.3 and has been fixed in version v5.16.5.
How To Fix
No fixed version is published for this vulnerability.
To fix this vulnerability, it is recommended to update the Linux Kernel to version v5.16.5 or later. This can be done by downloading the updated Kernel source code from the official Git repository (https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/) and compiling it according to the provided instructions. Alternatively, users can wait for their Linux distribution to release an updated package containing the fixed Kernel version.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a temporary workaround, users can disable the affected functionality by preventing the execution of the KVM_RUN operation and the KVM_SET_CPUID{,2} ioctl calls. This can be achieved by modifying the relevant code or configuration files in the virtualization setup. However, it is important to note that this workaround may impact the functionality and performance of virtual machines.
Conclusion
The vulnerability in the KVM module of the Linux Kernel can lead to memory leaks and potential exploitation in virtualized environments. It is crucial to update the Kernel to version v5.16.5 or later to mitigate this vulnerability. Alternatively, users can apply a temporary workaround by disabling the affected functionality, although this may impact virtual machine performance. For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The Kernel is a critical component of the Linux operating system, responsible for managing system resources and facilitating communication between hardware and software.
KVM (Kernel-based Virtual Machine) is a module in the Linux Kernel that allows users to run virtual machines on a Linux host, providing a virtualized environment for various operating systems.
The exact impact of this vulnerability is not yet proven, but it can potentially lead to memory leaks and exploitation by malicious actors in virtualized environments.
To fix this vulnerability, it is recommended to update the Linux Kernel to version v5.16.5 or later. Instructions for updating the Kernel can be found in the official Git repository.
Yes, a temporary workaround is to disable the affected functionality by preventing the execution of the KVM_RUN operation and the KVM_SET_CPUID{,2} ioctl calls. However, this may impact the functionality and performance of virtual machines.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.
Follow Vulert in Google
Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.