vfio/pci: Release the VGA arbiter client on register_device() failure
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 4aeec3984ddc853f7c65903bde472ffdef738bae · < 52adb2dff7ce3d8430e2bdc5988b618a430def85| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
vfio/pci: Release the VGA arbiter client on register_device() failure
The re-order in the Fixes commit below displaced vfio_pci_vga_init() as the last failure point of what is now vfio_pci_core_register_device() without introducing an unwind for the VGA arbiter registration.
In current kernels this is mostly benign because vfio_pci_set_decode() only uses pci_dev state, but the original failure path could leave a callback with a freed vdev cookie. The stale registration also becomes unsafe again once the callback follows drvdata to the vfio device.
Add the required VGA unwind callout.
From the CVE record · Linux
A failure in vfio_pci_core_register_device() can leave a VGA arbiter callback registered with a freed device cookie. The input does not establish how an attacker could trigger this path or whether access, authentication, or user interaction is required.
Engineers running Linux kernels with vfio/pci should check their versions; affected versions are not specified.