Patch "drm/exynos: fix race condition UAF in exynos_g2d_exec_ioctl" has been added to the 5.4-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.4-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.4 subdirectory.

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



commit 6fc8b6e1886a55141c9e6b20b3755da81ea3d3e5
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 fcee33a43aca3..2df04de7f4354 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
@@ -1332,7 +1332,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