KernelScan.io

HIGH

vfio DmaBuf UAF

CVE-2026-31468

CVSS 7.8 / 10.0 NVD

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

KernelScan AI5.7MEDIUM

01

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.

02

Engine v0.2.0

Risk summary

Systems using VFIO PCI device passthrough are at risk of kernel memory corruption. An attacker with VFIO device access could trigger a double free condition during file descriptor exhaustion, potentially leading to kernel crashes, information disclosure, or arbitrary code execution.

Affecteddrivers/vfio/pci/vfio_pci_dmabuf.c (vfio)

Vulnerability analysis

The vulnerability occurs in vfio_pci_core_feature_dma_buf() where the error path for dma_buf_fd() failure incorrectly falls through the unwind chain after dma_buf_put(). This results in a double free of allocated objects and an unbalanced refcount on the vfio device. The fix moves the dma_buf_put() call directly into the error condition and returns immediately, preventing the double free. Attack requires local access with VFIO device privileges and specific conditions during file descriptor exhaustion.

03

BranchFixed inPatch commit
6.196.19.1183ad334afc9a
mainline7.0e98137f0a874