{"id":"DEBIAN-CVE-2022-50738","details":"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:       [\u003c0000000087736d2a\u003e] kmem_cache_alloc_trace+0x142/0x1c0       [\u003c0000000060740f50\u003e] vhost_vdpa_process_iotlb_msg+0x68c/0x901 [vhost_vdpa]       [\u003c0000000083e8e205\u003e] vhost_chr_write_iter+0xc0/0x4a0 [vhost]       [\u003c000000008f2f414a\u003e] vhost_vdpa_chr_write_iter+0x18/0x20 [vhost_vdpa]       [\u003c00000000de1cd4a0\u003e] vfs_write+0x216/0x4b0       [\u003c00000000a2850200\u003e] ksys_write+0x71/0xf0       [\u003c00000000de8e720b\u003e] __x64_sys_write+0x19/0x20       [\u003c0000000018b12cbb\u003e] do_syscall_64+0x3f/0x90       [\u003c00000000986ec465\u003e] 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-\u003evdev.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.","modified":"2026-09-01T20:05:00.968461287Z","published":"2025-12-24T13:16:00.503Z","upstream":["CVE-2022-50738"],"references":[{"type":"ADVISORY","url":"https://security-tracker.debian.org/tracker/CVE-2022-50738"}],"affected":[{"package":{"name":"linux","ecosystem":"Debian:12","purl":"pkg:deb/debian/linux?arch=source&distro=bookworm"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.1.7-1"}]}],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-50738.json"}},{"package":{"name":"linux","ecosystem":"Debian:13","purl":"pkg:deb/debian/linux?arch=source&distro=trixie"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.1.7-1"}]}],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-50738.json"}},{"package":{"name":"linux","ecosystem":"Debian:14","purl":"pkg:deb/debian/linux?arch=source&distro=forky"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.1.7-1"}]}],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-50738.json"}}],"schema_version":"1.9.0"}