Description (CNA)
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.
Affected (CNA)
| Vendor / product | Versions |
|---|---|
| Linux / Linux | affected 5d74781ebc86c5fa9e9d6934024c505412de9b52 before 4f1000a30f67cf7d328059242776a858611d5ef9; affected 5d74781ebc86c5fa9e9d6934024c505412de9b52 before d97708701434ce72968e771976aaf9d3438fcafd |
| Linux / Linux | affected 6.19; unaffected 0 before 6.19; unaffected 7.0.10 through 7.0.*; unaffected 7.1 through * |
CWE
No CWE identifiers supplied.
References
- https://git.kernel.org/stable/c/4f1000a30f67cf7d328059242776a858611d5ef9
- https://git.kernel.org/stable/c/d97708701434ce72968e771976aaf9d3438fcafd
ADP enrichment
A flaw was found in the Linux kernel's vfio/pci subsystem. During device shutdown, an improper order of operations in cleaning up Direct Memory Access Buffers (DMABUFs) before disabling the function creates a brief window. In this window, a device's Base Address Registers (BARs) could still be accessed via DMABUFs even after memory space enable (MSE) is cleared. This could potentially allow a different driver to access freed resources, leading to information disclosure or unauthorized resource access.