drm/vmwgfx: drop dma_buf reference on foreign-fd prime import
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 65981f7681abdf92b25942222b629b9c512d0705 · < a8434b145b1e467940334c58c00af241e9494c5f| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/vmwgfx: drop dma_buf reference on foreign-fd prime import
ttm_prime_fd_to_handle() returns -ENOSYS when the imported fd's dma_buf->ops do not match the ttm_object_device's ops, but does so without releasing the reference acquired by dma_buf_get(). Any unprivileged renderD client passing a non-vmwgfx prime fd through the DRM_VMW_GB_SURFACE_REF{,_EXT} path leaks one dma_buf reference per call and indefinitely pins the foreign exporter's GEM resources.
Funnel the error path through the existing dma_buf_put() so the reference is always dropped.
From the CVE record · Linux
The Linux kernel's vmwgfx PRIME import path fails to release a dma_buf reference when a foreign file descriptor is rejected. A local, unprivileged client with access to renderD can pass a non-vmwgfx PRIME file descriptor through the affected surface-reference path, leaking one reference per call and indefinitely pinning the foreign exporter's GEM resources.
Engineers running Linux kernels with vmwgfx should check their installed versions; affected versions were not provided.