Skip to contentSkip to conversation

CVE-2026-31468: vfio/pci: Fix double free in dma-buf feature

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Apr 22

lore
Share & tools
lore
#0 lore raw

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

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

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

vfio/pci: Fix double free in dma-buf feature

The error path through vfio_pci_core_feature_dma_buf() ignores its own advice to only use dma_buf_put() after dma_buf_export(), instead falling through the entire unwind chain. In the unlikely event that we encounter file descriptor exhaustion, this can result in an unbalanced refcount on the vfio device and double free of allocated objects.

Avoid this by moving the "put" directly into the error path and return the errno rather than entering the unwind chain.

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

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

	Issue introduced in 6.19 with commit 5d74781ebc86c5fa9e9d6934024c505412de9b52 and fixed in 6.19.11 with commit 83ad334afc9a645cef1062f5346526b1e36d6516
	Issue introduced in 6.19 with commit 5d74781ebc86c5fa9e9d6934024c505412de9b52 and fixed in 7.0 with commit e98137f0a874ab36d0946de4707aa48cb7137d1c

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-31468

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/vfio/pci/vfio_pci_dmabuf.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/83ad334afc9a645cef1062f5346526b1e36d6516
	https://git.kernel.org/stable/c/e98137f0a874ab36d0946de4707aa48cb7137d1c