OSDN Git Service

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)
committerInki Dae <inki.dae@samsung.com>
Wed, 7 Jun 2023 04:03:16 +0000 (13:03 +0900)
commit48bfd02569f5db49cc033f259e66d57aa6efc9a3
tree7343a98845f4a94876fa7cf084ceae39fab35661
parent4a059559809fd1ddbf16f847c4d2237309c08edf
drm/exynos: fix race condition UAF in exynos_g2d_exec_ioctl

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>
drivers/gpu/drm/exynos/exynos_drm_g2d.c