Linux vfio/nvgrace-gpu: fallback-mode open leaks a poison-handling node, blocking reopen and causing a UAF after rebind
Impact
On Grace-based GPU hosts that pass the GPU through with the nvgrace-gpu VFIO variant driver, the driver drops into a fallback mode when the ACPI memory properties are missing or the C2C link is down. In that mode, opening the device registers a poison-handling range covering the whole address space, and closing it never removes the range. As a result, a second open of the device fails with -EBUSY, so the GPU cannot be handed to the next VM. If the device is unbound and rebound, the stale node points into freed memory and the next open hits a slab use-after-free in the host kernel. This hits only hosts where the GPU is already in a degraded fallback state.
Who can reach it
Host-side only. The VMM opens the VFIO device, and the use-after-free needs a driver unbind/rebind through sysfs, which requires root on the host. A guest tenant cannot trigger it directly.
What to do
Install a host kernel with the upstream fix (stable commits linked; no distro versions in the record). Live-migrate or stop the guests, then reboot the host. Until then, on a host whose GPU is in fallback mode, avoid unbinding and rebinding nvgrace-gpu, and expect reassignment to fail until the host reboots.
References
Related entries
- GPU / accelerator firmware (VBIOS, GSP, NVSwitch): GPU-resident firmware sits below the host OS and is not coveredNCVD-0000-012-gpu-accelerator-firmware-vbios-g · GPU / accelerator firmware (VBIOS, GSP, NVSwitch)Unscored
- NVIDIA Multi-Instance GPU (MIG) partitioning: MIG gives each instance its own SM slice, L2 slice, memory slice andNCVD-2020-001-nvidia-multi-instance-gpu-mig-pa · NVIDIA Multi-Instance GPU (MIG) partitioningUnscored
- NVIDIA Multi-Instance GPU (MIG) partitioning: MIG gives each instance its own SM slice, L2 slice, memory slice andNCVD-2020-003-nvidia-multi-instance-gpu-mig-pa · NVIDIA Multi-Instance GPU (MIG) partitioningUnscored
- Integrated GPU graphics data compression (Intel, AMD, Apple, Arm, Qualcomm, NVIDIA): GPUs apply data-dependent losslessNCVD-2023-003-integrated-gpu-graphics-data-com · Integrated GPU graphics data compression (Intel, AMD, Apple, Arm, Qualcomm, NVIDIA)Unscored
- NVIDIA Confidential Computing (H100/H200/B100/B200/GB200) - CC-DevTools operating mode: NVIDIA GPU confidentialNCVD-2023-004-nvidia-confidential-computing-h1 · NVIDIA Confidential Computing (H100/H200/B100/B200/GB200) - CC-DevTools operating modeUnscored
- Integrated GPU graphics data compression (Intel, AMD, Apple, Arm, Qualcomm, NVIDIA): GPUs apply data-dependent losslessNCVD-2023-005-integrated-gpu-graphics-data-com · Integrated GPU graphics data compression (Intel, AMD, Apple, Arm, Qualcomm, NVIDIA)Unscored
This entry is curated: imported from vendor advisories with machine assistance, not yet individually verified. Confirm against your vendor's advisory before acting, and report anything wrong.