CVE-2022-50738
Memory Leak in Linux Kernel vhost-vdpa Component Fixed
Publication date: 2025-12-24
Last updated on: 2025-12-24
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | kernel | * |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-UNKNOWN |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability is a memory leak in the Linux kernel's vhost-vdpa component. Specifically, it occurs because some memory allocated for IOTLB (Input-Output Translation Lookaside Buffer) entries is not properly freed during release if the application does not send a VHOST_IOTLB_INVALIDATE message or crashes. This leak happens due to changes in how IOTLB handling was implemented, where a necessary cleanup call was accidentally removed. The issue causes unreferenced memory objects to remain allocated, which can be detected by kmemleak.
How can this vulnerability impact me? :
The impact of this vulnerability is a potential memory leak in the Linux kernel when using vhost-vdpa devices. Over time, this leak can cause increased memory usage, which may degrade system performance or stability, especially if the application crashes or does not send the required invalidate messages. This could lead to resource exhaustion or unexpected behavior in systems relying on vhost-vdpa for device virtualization.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by monitoring for memory leaks related to vhost-vdpa using kmemleak or similar kernel memory leak detection tools. Specifically, look for unreferenced objects in kernel memory associated with vhost_vdpa_process_iotlb_msg as indicated by kmemleak logs. Commands such as 'echo scan > /sys/kernel/debug/kmemleak' followed by 'cat /sys/kernel/debug/kmemleak' can be used to scan and view memory leaks in the kernel.
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation involves applying the patch that fixes the memory leak by ensuring vhost_vdpa_iotlb_unmap() is called on the whole range in vhost_vdpa_remove_as(), as described in the fix. Until the patch is applied, monitor for crashes or memory leaks related to vhost-vdpa and consider restarting affected services or systems to clear leaked memory. Additionally, ensure that applications using vhost-vdpa send VHOST_IOTLB_INVALIDATE messages properly to avoid leaks.