]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/exynos: fix race condition UAF in exynos_g2d_exec_ioctl
authorMin Li <lm0963hack@gmail.com>
Fri, 26 May 2023 13:01:31 +0000 (21:01 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Jun 2023 08:18:41 +0000 (10:18 +0200)
commit45f574d8dfc1d7da5dce587e5061d1022b5ff035
treef05b8ddd592bdd677c891e6e3176599329e0f2a4
parentc81a542e45a0ac26a22ff207c07c46feef648b79
drm/exynos: fix race condition UAF in exynos_g2d_exec_ioctl

[ Upstream commit 48bfd02569f5db49cc033f259e66d57aa6efc9a3 ]

If it is async, runqueue_node is freed in g2d_runqueue_worker on another
worker thread. So in extreme cases, if g2d_runqueue_worker runs first, and
then executes the following if statement, there will be use-after-free.

Signed-off-by: Min Li <lm0963hack@gmail.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/exynos/exynos_drm_g2d.c