drm/vmwgfx: Fix stale file descriptors on failed usercopy
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ c906965dee22d5e95d0651759ba107b420212a9f · < 1d833b27fb708d6fdf5de9f6b3a8be4bd4321565| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/vmwgfx: Fix stale file descriptors on failed usercopy
A failing usercopy of the fence_rep object will lead to a stale entry in the file descriptor table as put_unused_fd() won't release it. This enables userland to refer to a dangling 'file' object through that still valid file descriptor, leading to all kinds of use-after-free exploitation scenarios.
Fix this by deferring the call to fd_install() until after the usercopy has succeeded.
From the CVE record · Linux
In the Linux kernel's drm/vmwgfx component, a failed copy to user space can leave a valid file descriptor pointing to a freed file object. Local userland code can use that descriptor in use-after-free scenarios; the input does not specify an authentication requirement or user interaction.
Engineers running Linux kernels with the drm/vmwgfx component should check whether their kernel is affected; no affected versions are specified.