Files
linux/drivers/gpu/drm/vgem
Daniel Vetter 4b848f20ed drm/vgem: Close use-after-free race in vgem_gem_create
There's two references floating around here (for the object reference,
not the handle_count reference, that's a different thing):

- The temporary reference held by vgem_gem_create, acquired by
  creating the object and released by calling
  drm_gem_object_put_unlocked.

- The reference held by the object handle, created by
  drm_gem_handle_create. This one generally outlives the function,
  except if a 2nd thread races with a GEM_CLOSE ioctl call.

So usually everything is correct, except in that race case, where the
access to gem_object->size could be looking at freed data already.
Which again isn't a real problem (userspace shot its feet off already
with the race, we could return garbage), but maybe someone can exploit
this as an information leak.

Cc: Dan Carpenter <[email protected]>
Cc: Hillf Danton <[email protected]>
Reported-by: [email protected]
Cc: [email protected]
Cc: Emil Velikov <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Sean Paul <[email protected]>
Cc: Chris Wilson <[email protected]>
Cc: Eric Anholt <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Cc: Rob Clark <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-02-06 19:04:41 +01:00
..
2019-07-17 12:52:55 +02:00