diff options
author | Mathias Krause <minipli@grsecurity.net> | 2022-01-27 09:34:19 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-01-27 16:55:20 +0100 |
commit | a0f90c8815706981c483a652a6aefca51a5e191c (patch) | |
tree | 4a6833bd11235602d4c8986c77bfa35936b98fd3 /net | |
parent | Merge tag 'rpmsg-v5.17-fixes' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff) | |
download | linux-a0f90c8815706981c483a652a6aefca51a5e191c.tar.xz linux-a0f90c8815706981c483a652a6aefca51a5e191c.zip |
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: c906965dee22 ("drm/vmwgfx: Add export fence to file descriptor support")
Signed-off-by: Mathias Krause <minipli@grsecurity.net>
Signed-off-by: Zack Rusin <zackr@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions