wok-current annotate xorg-server/stuff/CVE-2023-1393.patch @ rev 25634

Mass update, new toolchain gcc 8.3.0, glibc 2.28.0
author Stanislas Leduc <shann@slitaz.org>
date Sun Jan 14 08:12:37 2024 +0000 (20 months ago)
parents
children
rev   line source
shann@25634 1 From 26ef545b3502f61ca722a7a3373507e88ef64110 Mon Sep 17 00:00:00 2001
shann@25634 2 From: Olivier Fourdan <ofourdan@redhat.com>
shann@25634 3 Date: Mon, 13 Mar 2023 11:08:47 +0100
shann@25634 4 Subject: [PATCH] composite: Fix use-after-free of the COW
shann@25634 5
shann@25634 6 ZDI-CAN-19866/CVE-2023-1393
shann@25634 7
shann@25634 8 If a client explicitly destroys the compositor overlay window (aka COW),
shann@25634 9 we would leave a dangling pointer to that window in the CompScreen
shann@25634 10 structure, which will trigger a use-after-free later.
shann@25634 11
shann@25634 12 Make sure to clear the CompScreen pointer to the COW when the latter gets
shann@25634 13 destroyed explicitly by the client.
shann@25634 14
shann@25634 15 This vulnerability was discovered by:
shann@25634 16 Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
shann@25634 17
shann@25634 18 Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
shann@25634 19 Reviewed-by: Adam Jackson <ajax@redhat.com>
shann@25634 20 ---
shann@25634 21 composite/compwindow.c | 5 +++++
shann@25634 22 1 file changed, 5 insertions(+)
shann@25634 23
shann@25634 24 diff --git a/composite/compwindow.c b/composite/compwindow.c
shann@25634 25 index 4e2494b86b..b30da589e9 100644
shann@25634 26 --- a/composite/compwindow.c
shann@25634 27 +++ b/composite/compwindow.c
shann@25634 28 @@ -620,6 +620,11 @@ compDestroyWindow(WindowPtr pWin)
shann@25634 29 ret = (*pScreen->DestroyWindow) (pWin);
shann@25634 30 cs->DestroyWindow = pScreen->DestroyWindow;
shann@25634 31 pScreen->DestroyWindow = compDestroyWindow;
shann@25634 32 +
shann@25634 33 + /* Did we just destroy the overlay window? */
shann@25634 34 + if (pWin == cs->pOverlayWin)
shann@25634 35 + cs->pOverlayWin = NULL;
shann@25634 36 +
shann@25634 37 /* compCheckTree (pWin->drawable.pScreen); can't check -- tree isn't good*/
shann@25634 38 return ret;
shann@25634 39 }
shann@25634 40 --
shann@25634 41 GitLab
shann@25634 42