Critical Vulnerability in Linux Kernel: KVM Iterator Mismanagement
Summary
CVE-2021-47094: In the Linux kernel, the following vulnerability has been resolved: KVM: x86/mmu: Don't advance iterator after restart due to yielding After dropping mmu_lock in the TDP MMU, restart the iterator during tdp_iter_next() a... Affects linux versions 5.10.103-1 – 6.9.9-1. 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 Linux kernel is the core component of a Linux operating system, managing hardware and system resources. It provides essential services for all other parts of the operating system. The kernel's KVM (Kernel-based Virtual Machine) module enables virtualization, allowing multiple operating systems to run concurrently on a host machine. This vulnerability affects the KVM module's memory management unit (MMU), specifically in the handling of shadow page table entries (SPTEs), which are crucial for virtual memory management in KVM.
Vulnerability Detail
The vulnerability, identified as CVE-2021-47094, arises from improper handling of the iterator in the TDP MMU during the zapping of SPTEs. When the mmu_lock is dropped, the iterator is incorrectly advanced after a yield, leading to the potential skipping of top-level SPTEs and their children. This can result in a shadow page leak or a use-after-free condition, causing data corruption and kernel errors. The issue was exacerbated by a previous commit that altered the yielding behavior, allowing the iterator to advance incorrectly.
How To Fix
No fixed version is published for this vulnerability.
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 avoid using the KVM module until the kernel is updated. This may involve disabling virtualization features in the BIOS or using alternative virtualization solutions that do not rely on KVM.
Conclusion
CVE-2021-47094 is a critical vulnerability in the Linux kernel's KVM module that can lead to severe consequences if left unaddressed. Users are strongly advised to update their systems to the latest kernel version to mitigate the risks associated with this vulnerability. Utilizing tools like Vulert can help monitor and manage open-source vulnerabilities effectively.
See every vulnerability recorded for linux →
FAQ
CVE-2021-47094 is a vulnerability in the Linux kernel's KVM module that can lead to shadow page leaks and potential data corruption due to improper iterator management.
If exploited, this vulnerability can cause instability in virtual machines, data corruption, and may lead to unauthorized access to sensitive information.
The vulnerability affects Debian-based systems running specific versions of the Linux kernel prior to the fixed versions 5.15.15-1.
You can use tools like Vulert, which monitors and alerts for open-source vulnerabilities in your software. You can check your application against this vulnerability using the Vulert playground without signing up.
If an immediate update is not possible, consider disabling KVM or using alternative virtualization solutions until the kernel can be patched.
Related vulnerabilities
Recent vulnerabilities recorded for linux.