Files
linux/drivers/gpu/drm/vmwgfx
Mathias Krause a0f90c8815 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.

Fixes: c906965dee ("drm/vmwgfx: Add export fence to file descriptor support")
Signed-off-by: Mathias Krause <[email protected]>
Signed-off-by: Zack Rusin <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2022-01-27 17:55:20 +02:00
..
2021-12-09 13:16:16 -05:00
2021-12-09 13:16:16 -05:00
2021-12-09 13:16:16 -05:00
2021-12-09 13:16:16 -05:00
2021-12-09 13:16:16 -05:00
2021-07-28 14:53:23 -04:00
2021-12-09 13:16:16 -05:00
2021-12-09 13:16:16 -05:00