Skip to content
Commit d01d6d2b authored by Rob Clark's avatar Rob Clark Committed by Greg Kroah-Hartman
Browse files

drm/virtio: Fix GEM handle creation UAF

[ Upstream commit 52531258

 ]

Userspace can guess the handle value and try to race GEM object creation
with handle close, resulting in a use-after-free if we dereference the
object after dropping the handle's reference.  For that reason, dropping
the handle's reference must be done *after* we are done dereferencing
the object.

Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
Reviewed-by: default avatarChia-I Wu <olvaffe@gmail.com>
Fixes: 62fb7a5e

 ("virtio-gpu: add 3d/virgl support")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarDmitry Osipenko <dmitry.osipenko@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221216233355.542197-2-robdclark@gmail.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 3030f11f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment