vfio/pci: Clean up DMABUFs before disabling function
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
vfio/pci: Clean up DMABUFs before disabling function
On device shutdown, make vfio_pci_core_close_device() call vfio_pci_dma_buf_cleanup() before the function is disabled via vfio_pci_core_disable(). This ensures that all access via DMABUFs is revoked before the function's BARs become inaccessible.
This fixes an issue where, if the function is disabled first, a tiny window exists in which the function's MSE is cleared and yet BARs could still be accessed via the DMABUF. The resources would also be freed and up for grabs by a different driver.
From the CVE record · Linux
The Linux kernel's vfio/pci device shutdown path could disable a function before cleaning up its DMABUFs. During that brief window, access through a DMABUF could continue after the function's BARs become inaccessible, while its resources could be freed for another driver. The input does not specify attacker access requirements or user interaction.
Teams running Linux kernels that use vfio/pci should check whether their kernel includes the fix; affected versions are not specified.