Use-After-Free Vulnerability in Linux Kernel's virtio-blk Package
Summary
CVE-2022-50064: In the Linux kernel, the following vulnerability has been resolved: virtio-blk: Avoid use-after-free on suspend/resume hctx->user_data is set to vq in virtblk_init_hctx(). Affects linux versions < 6.0.2-1. Fixed in 6.0.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 and hardware abstraction. The virtio-blk package is responsible for managing block device virtualization, allowing efficient data transfer between virtual machines and physical storage. This package is critical for performance in virtualized environments, but it is susceptible to vulnerabilities that can compromise system stability and security.
Vulnerability Detail
The vulnerability, identified as CVE-2022-50064, arises from a use-after-free condition in the virtio-blk implementation. Specifically, the user_data pointer in the hctx structure is set to a virtual queue (vq) during initialization. However, this vq is freed during the suspend process and reallocated upon resume, leading to an invalid pointer access after resume. This can result in kernel crashes, as evidenced by the call trace provided in the vulnerability details, which indicates various functions that may be affected by this issue.
How To Fix
Minimum fixed version
6.0.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. The best course of action is to apply the patch by updating the package as described in the 'how_to_fix' section.
Conclusion
CVE-2022-50064 is a significant vulnerability in the Linux kernel's virtio-blk package that can lead to system crashes due to improper handling of memory during suspend and resume operations. It is crucial to update to the patched version to mitigate any risks associated with this vulnerability.
See every vulnerability recorded for linux →
FAQ
CVE-2022-50064 is a vulnerability in the Linux kernel's virtio-blk package that can lead to kernel crashes due to a use-after-free condition.
If exploited, this vulnerability can cause system instability, leading to crashes and potential data loss during operations involving block device virtualization.
If you are using a version of the Linux kernel prior to 6.0.2-1, your system may be vulnerable. You can check your kernel version using the command 'uname -r'.
You can use tools like Vulert, which monitors open-source vulnerabilities in your software by analyzing manifest files such as package-lock.json. It provides real-time alerts for any vulnerabilities detected.
Detailed information about CVE-2022-50064 can be found in the official CVE database or through security advisories related to the Linux kernel.
Related vulnerabilities
Recent vulnerabilities recorded for linux.