Patch "drm/exynos: fix race condition UAF in exynos_g2d_exec_ioctl" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/exynos: fix race condition UAF in exynos_g2d_exec_ioctl

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-exynos-fix-race-condition-uaf-in-exynos_g2d_exec.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 9f1036062f65c0a5efa4eac09642d7e4fa54a84a
Author: Min Li <lm0963hack@xxxxxxxxx>
Date:   Fri May 26 21:01:31 2023 +0800

    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@xxxxxxxxx>
    Reviewed-by: Andi Shyti <andi.shyti@xxxxxxxxxx>
    Signed-off-by: Inki Dae <inki.dae@xxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
index 471fd6c8135f2..27613abeed961 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
@@ -1335,7 +1335,7 @@ int exynos_g2d_exec_ioctl(struct drm_device *drm_dev, void *data,
 	/* Let the runqueue know that there is work to do. */
 	queue_work(g2d->g2d_workq, &g2d->runqueue_work);
 
-	if (runqueue_node->async)
+	if (req->async)
 		goto out;
 
 	wait_for_completion(&runqueue_node->complete);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux