Files
linux/drivers/gpu/drm
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-14 10:24:28 +01:00
2021-12-14 10:24:28 +01:00
…
…
…
2021-12-14 10:24:28 +01:00
…
…
…
…
2021-11-05 11:15:14 +01:00
2021-12-16 14:48:27 +01:00
…
…
2021-12-14 10:24:28 +01:00
…
…
…
…
2021-11-30 09:41:28 +01:00
…
2021-11-30 09:41:28 +01:00
…
…
…
2021-12-10 12:36:52 +01:00
2021-12-10 12:36:52 +01:00