Skip to contentSkip to conversation

CVE-2026-99685: iommu/virtio: Reset device before deleting virtqueues on probe failure

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Nov 20

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

iommu/virtio: Reset device before deleting virtqueues on probe failure

viommu_probe() marks the device DRIVER_OK before populating the event virtqueue and registering the IOMMU device in sysfs. viommu_fill_evtq() hands the device a set of device-writable buffers through virtqueue_add_inbuf(), so from that point on the device may write into them and into the rings.

If either step fails, the error path deletes the virtqueues without resetting the device first. The event buffers are allocated with devm_kmalloc_array() and are released as probe unwinds, so the device can go on writing to memory that has been freed.

Reset the device before deleting the virtqueues, the way viommu_remove() already does.

The Linux kernel CVE team has assigned CVE-2026-99685 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 5.3 with commit edcd69ab9a323b7ac7a86e1c44b6c9c46598391f and fixed in 6.12.118 with commit e09d65fd554b78c7277f6379517c773ff36d55d1
	Issue introduced in 5.3 with commit edcd69ab9a323b7ac7a86e1c44b6c9c46598391f and fixed in 6.18.64 with commit e60e6db9d07b2ebaff2e055a086fa8e8d14f565c
	Issue introduced in 5.3 with commit edcd69ab9a323b7ac7a86e1c44b6c9c46598391f and fixed in 7.3.5 with commit cfdb3b6915299ebb6ffc98566f9cf73d4d1f1598
	Issue introduced in 5.3 with commit edcd69ab9a323b7ac7a86e1c44b6c9c46598391f and fixed in 7.4-rc2 with commit 1f8efac19a0870cdfdf8477e447e5a07ddce9623

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-99685

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/iommu/virtio-iommu.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/e09d65fd554b78c7277f6379517c773ff36d55d1
	https://git.kernel.org/stable/c/e60e6db9d07b2ebaff2e055a086fa8e8d14f565c
	https://git.kernel.org/stable/c/cfdb3b6915299ebb6ffc98566f9cf73d4d1f1598
	https://git.kernel.org/stable/c/1f8efac19a0870cdfdf8477e447e5a07ddce9623