Vghost: A 9-year-old Linux vhost bug enabling local root and VM escape
A stale metadata cache in Linux's vhost subsystem was not invalidated when vring addresses were changed, so a cached IOTLB mapping was reused to translate new addresses without re-validation. This gave an unprivileged local user arbitrary kernel read and write leading to root, and let a guest behind a virtual IOMMU write out of bounds into the host QEMU heap and redirect its control flow.
matrix.tencent.com
Published on matrix.tencent.com
The issue is tracked as CVE-2026-74580. The kernel.org CNA rates it 8.8 High (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H).
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the metadata cache in vq->meta_iotlb[] was not reset on VHOST_SET_VRING_ADDR, so a cache hit in iotlb_access_ok() skipped the deferred GIOVA validation and the new address was translated through the old mapping.
Impact
An unprivileged local user could escalate to root on several distributions, and a guest with a virtio device behind a virtual IOMMU could gain control of the host QEMU process's control flow or crash it; the guest vector requires device-IOTLB mode with iommu_platform enabled, and Ubuntu limited the device node to the kvm group.
What the attacker needed
Access to a /dev/vhost-* device node; device IOTLB mode for the guest vector; virtio device behind a vIOMMU; iommu_platform enabled
The fix
The fix resets the metadata cache in vhost_vring_set_num_addr() so reconfigured addresses go through the slow validation path, and it entered mainline as de845981da67.
How it was found
- Populate the metadata cache for the used ring with a normal packet transmission or reception.
- From the guest, write queue_reset, repoint the used ring to an unmapped new GIOVA, and write queue_enable so QEMU issues VHOST_SET_VRING_ADDR without clearing the cache.
- Kick the queue so the stale cache entry is hit and the address is extrapolated from the old mapping.
- Choose a large enough offset so the resulting host address falls outside guest RAM and into the QEMU process heap.
- Overwrite an 8-byte pointer in QEMU's QOM method table with a guest-chosen value.
- Wait for QEMU's next indirect call through that pointer to transfer control to the chosen address.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
The kernel's vhost code speeds up virtual machines by remembering where a queue's memory lives, so it does not have to check the same address twice. When the address was changed, that memory of the old location was not thrown away, so the kernel kept using the old map and trusted it as already checked. Because of that, a normal user on the machine could make the kernel read or write memory it should not touch, and a program inside a virtual machine could reach into the host's virtual machine process.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.