summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2023-5574-3.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2023-5574-3.patch')
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2023-5574-3.patch54
1 files changed, 0 insertions, 54 deletions
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2023-5574-3.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2023-5574-3.patch
deleted file mode 100644
index 47c247ef0c..0000000000
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2023-5574-3.patch
+++ /dev/null
@@ -1,54 +0,0 @@
1From ab2c58ba4719fc31c19c7829b06bdba8a88bd586 Mon Sep 17 00:00:00 2001
2From: Peter Hutterer <peter.hutterer@who-t.net>
3Date: Tue, 24 Oct 2023 12:09:36 +1000
4Subject: [PATCH] dix: always initialize pScreen->CloseScreen
5
6CloseScreen is wrapped by the various modules, many of which do not
7check if they're the last ones unwrapping. This is fine if the order of
8those modules never changes but when it does we might get a NULL-pointer
9dereference by some naive code doing a
10
11 pScreen->CloseScreen = priv->CloseScreen;
12 free(priv);
13 return (*pScreen->CloseScreen)(pScreen);
14
15To avoid this set it to a default function that just returns TRUE that's
16guaranteed to be the last one.
17
18Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/ab2c58ba4719fc31c19c7829b06bdba8a88bd586]
19CVE: CVE-2023-5574
20Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
21---
22 dix/dispatch.c | 9 +++++++++
23 1 file changed, 9 insertions(+)
24
25diff --git a/dix/dispatch.c b/dix/dispatch.c
26index eaac39b7c9..cd092fd409 100644
27--- a/dix/dispatch.c
28+++ b/dix/dispatch.c
29@@ -3890,6 +3890,12 @@ static int indexForScanlinePad[65] = {
30 3 /* 64 bits per scanline pad unit */
31 };
32
33+static Bool
34+DefaultCloseScreen(ScreenPtr screen)
35+{
36+ return TRUE;
37+}
38+
39 /*
40 grow the array of screenRecs if necessary.
41 call the device-supplied initialization procedure
42@@ -3949,6 +3955,9 @@ static int init_screen(ScreenPtr pScreen, int i, Bool gpu)
43 PixmapWidthPaddingInfo[depth].notPower2 = 0;
44 }
45 }
46+
47+ pScreen->CloseScreen = DefaultCloseScreen;
48+
49 return 0;
50 }
51
52--
53GitLab
54