summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2025-26594-2.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2025-26594-2.patch')
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2025-26594-2.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2025-26594-2.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2025-26594-2.patch
new file mode 100644
index 0000000000..6ebf540ab9
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2025-26594-2.patch
@@ -0,0 +1,51 @@
1From b0a09ba6020147961acc62d9c73d807b4cccd9f7 Mon Sep 17 00:00:00 2001
2From: Peter Hutterer <peter.hutterer@who-t.net>
3Date: Wed, 4 Dec 2024 15:49:43 +1000
4Subject: [PATCH] dix: keep a ref to the rootCursor
5
6CreateCursor returns a cursor with refcount 1 - that refcount is used by
7the resource system, any caller needs to call RefCursor to get their own
8reference. That happens correctly for normal cursors but for our
9rootCursor we keep a variable to the cursor despite not having a ref for
10ourselves.
11
12Fix this by reffing/unreffing the rootCursor to ensure our pointer is
13valid.
14
15Related to CVE-2025-26594, ZDI-CAN-25544
16
17Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
18Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1828>
19
20Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/b0a09ba6]
21CVE: CVE-2025-26594
22Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
23---
24 dix/main.c | 4 ++++
25 1 file changed, 4 insertions(+)
26
27diff --git a/dix/main.c b/dix/main.c
28index bfc8add..38e29ce 100644
29--- a/dix/main.c
30+++ b/dix/main.c
31@@ -231,6 +231,8 @@ dix_main(int argc, char *argv[], char *envp[])
32 FatalError("could not open default cursor font");
33 }
34
35+ rootCursor = RefCursor(rootCursor);
36+
37 #ifdef PANORAMIX
38 /*
39 * Consolidate window and colourmap information for each screen
40@@ -271,6 +273,8 @@ dix_main(int argc, char *argv[], char *envp[])
41
42 Dispatch();
43
44+ UnrefCursor(rootCursor);
45+
46 UndisplayDevices();
47 DisableAllDevices();
48
49--
502.25.1
51