Steve Cohen 6a9428427d drm: hold gem reference until object is no longer accessed
commit 8490d6a7e0a0a6fab5c2d82d57a3937306660864 upstream.

A use-after-free in drm_gem_open_ioctl can happen if the
GEM object handle is closed between the idr lookup and
retrieving the size from said object since a local reference
is not being held at that point. Hold the local reference
while the object can still be accessed to fix this and
plug the potential security hole.

Signed-off-by: Steve Cohen <cohens@codeaurora.org>
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1595284250-31580-1-git-send-email-cohens@codeaurora.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-08-05 09:59:44 +02:00
..
2019-08-14 18:31:10 +02:00
2019-09-19 16:24:24 -07:00
2019-08-14 18:30:52 +02:00
2019-12-13 08:42:56 +01:00
2019-09-19 16:24:24 -07:00
2019-06-30 09:48:05 +02:00
2019-08-09 09:15:05 +02:00
2019-07-17 12:52:55 +02:00
2020-07-16 08:16:45 +02:00
2020-06-30 15:37:11 -04:00
2019-06-05 20:31:04 +02:00
2019-07-15 18:11:31 +02:00
2019-06-05 20:29:57 +02:00
2019-07-17 12:52:55 +02:00
2019-07-15 18:11:30 +02:00
2019-07-17 12:52:55 +02:00
2020-04-23 10:36:39 +02:00
2019-10-12 14:11:21 -07:00
2019-07-22 21:24:10 +02:00
2019-05-27 18:07:03 +02:00
2019-05-27 18:07:03 +02:00
2019-05-27 18:07:03 +02:00
2019-05-27 18:07:03 +02:00
2019-05-27 18:07:03 +02:00
2019-06-19 12:07:29 +02:00
2019-05-27 18:07:03 +02:00
2019-07-22 21:24:10 +02:00
2019-05-27 18:07:03 +02:00
2019-05-27 18:07:03 +02:00
2019-06-19 12:07:29 +02:00
2020-02-11 04:35:36 -08:00
2019-06-19 12:07:29 +02:00
2019-08-09 16:04:31 +10:00