VYPR
Unrated severityNVD Advisory· Published Dec 24, 2025· Updated Apr 15, 2026

CVE-2022-50738

CVE-2022-50738

Description

In the Linux kernel, the following vulnerability has been resolved:

vhost-vdpa: fix an iotlb memory leak

Before commit 3d5698793897 ("vhost-vdpa: introduce asid based IOTLB") we called vhost_vdpa_iotlb_unmap(v, iotlb, 0ULL, 0ULL - 1) during release to free all the resources allocated when processing user IOTLB messages through vhost_vdpa_process_iotlb_update(). That commit changed the handling of IOTLB a bit, and we accidentally removed some code called during the release.

We partially fixed this with commit 037d4305569a ("vhost-vdpa: call vhost_vdpa_cleanup during the release") but a potential memory leak is still there as showed by kmemleak if the application does not send VHOST_IOTLB_INVALIDATE or crashes:

unreferenced object 0xffff888007fbaa30 (size 16): comm "blkio-bench", pid 914, jiffies 4294993521 (age 885.500s) hex dump (first 16 bytes): 40 73 41 07 80 88 ff ff 00 00 00 00 00 00 00 00 @sA............. backtrace: [<0000000087736d2a>] kmem_cache_alloc_trace+0x142/0x1c0 [<0000000060740f50>] vhost_vdpa_process_iotlb_msg+0x68c/0x901 [vhost_vdpa] [<0000000083e8e205>] vhost_chr_write_iter+0xc0/0x4a0 [vhost] [<000000008f2f414a>] vhost_vdpa_chr_write_iter+0x18/0x20 [vhost_vdpa] [<00000000de1cd4a0>] vfs_write+0x216/0x4b0 [<00000000a2850200>] ksys_write+0x71/0xf0 [<00000000de8e720b>] __x64_sys_write+0x19/0x20 [<0000000018b12cbb>] do_syscall_64+0x3f/0x90 [<00000000986ec465>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

Let's fix this calling vhost_vdpa_iotlb_unmap() on the whole range in vhost_vdpa_remove_as(). We move that call before vhost_dev_cleanup() since we need a valid v->vdev.mm in vhost_vdpa_pa_unmap(). vhost_iotlb_reset() call can be removed, since vhost_vdpa_iotlb_unmap() on the whole range removes all the entries.

The kmemleak log reported was observed with a vDPA device that has use_va set to true (e.g. VDUSE). This patch has been tested with both types of devices.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

In the Linux kernel, an iotlb memory leak in vhost-vdpa occurs when an application does not send VHOST_IOTLB_INVALIDATE or crashes, fixed by calling vhost_vdpa_iotlb_unmap on the whole range during release.

Vulnerability

Description

A memory leak vulnerability exists in the Linux kernel's vhost-vdpa driver. Before commit 3d5698793897, the release path called vhost_vdpa_iotlb_unmap() over the entire address range to free resources allocated from vhost_vdpa_process_iotlb_update(). The ASID-based IOTLB change inadvertently removed that cleanup code, and although commit 037d4305569a partially fixed it, a potential leak remained [1][2].

Exploitation and

Attack Surface

An attacker who can interact with a vhost-vdpa device (e.g., via a virtual machine or application such as blkio-bench) can trigger the leak by performing IOTLB updates without sending a corresponding VHOST_IOTLB_INVALIDATE, or by forcing the application to crash. The leak is visible in kmemleak logs showing unreferenced IOTLB map entries. No authentication is required beyond the ability to write to the vhost-vdpa character device; local user access is sufficient.

Impact

An unprivileged local attacker can exhaust system memory by repeatedly allocating IOTLB mappings that are never freed, leading to a denial of service (system hang or crash). The kmemleak report confirms that each leaked entry is a 16-byte allocation, though in practice the leak can grow with repeated operations.

Mitigation

The fix, applied in kernel commits a2907867e2c8 and 4e92cb33bfb5, ensures that vhost_vdpa_iotlb_unmap() is called on the entire range in vhost_vdpa_remove_as() before vhost_dev_cleanup(). This also removes the need for vhost_iotlb_reset() [1][2]. Users should update to a kernel containing these patches.

AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

1

Patches

3

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

3

News mentions

0

No linked articles in our index yet.