drm/vmwgfx: Type-check lookups of fence objects

commit f7652afa8e upstream.

A malicious caller could otherwise hand over handles to other objects
causing all sorts of interesting problems.

Testing done: Ran a Fedora 25 desktop using both Xorg and
gnome-shell/Wayland.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Thomas Hellstrom 2017-03-27 11:09:08 +02:00 • committed by Greg Kroah-Hartman
commit 92cc48166e