summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Anusuri <vanusuri@mvista.com>2025-03-05 19:02:13 +0530
committerSteve Sakoman <steve@sakoman.com>2025-03-08 06:22:56 -0800
commitbf6991091ce519caea7220fa56a9ff6b27d49c21 (patch)
tree29cf81230b63a0fab75a3075da3872a40cc93107
parent9df0c884d620de74f7a494ec9af08c47c6ce05be (diff)
downloadpoky-bf6991091ce519caea7220fa56a9ff6b27d49c21.tar.gz
xwayland: Fix CVE-2025-26600
Upstream-Status: Backport from https://gitlab.freedesktop.org/xorg/xserver/-/commit/6e0f332b (From OE-Core rev: f84fd297131deda3e13377f0b3555a71e67f1d74) Signed-off-by: Vijay Anusuri <vanusuri@mvista.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-graphics/xwayland/xwayland/CVE-2025-26600.patch68
-rw-r--r--meta/recipes-graphics/xwayland/xwayland_23.2.5.bb1
2 files changed, 69 insertions, 0 deletions
diff --git a/meta/recipes-graphics/xwayland/xwayland/CVE-2025-26600.patch b/meta/recipes-graphics/xwayland/xwayland/CVE-2025-26600.patch
new file mode 100644
index 0000000000..43b47b3ca3
--- /dev/null
+++ b/meta/recipes-graphics/xwayland/xwayland/CVE-2025-26600.patch
@@ -0,0 +1,68 @@
1From 6e0f332ba4c8b8c9a9945dc9d7989bfe06f80e14 Mon Sep 17 00:00:00 2001
2From: Olivier Fourdan <ofourdan@redhat.com>
3Date: Mon, 16 Dec 2024 16:18:04 +0100
4Subject: [PATCH] dix: Dequeue pending events on frozen device on removal
5
6When a device is removed while still frozen, the events queued for that
7device remain while the device itself is freed.
8
9As a result, replaying the events will cause a use after free.
10
11To avoid the issue, make sure to dequeue and free any pending events on
12a frozen device when removed.
13
14CVE-2025-26600, ZDI-CAN-25871
15
16This vulnerability was discovered by:
17Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
18
19Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
20Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
21Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1828>
22
23Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/6e0f332b]
24CVE: CVE-2025-26600
25Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
26---
27 dix/devices.c | 18 ++++++++++++++++++
28 1 file changed, 18 insertions(+)
29
30diff --git a/dix/devices.c b/dix/devices.c
31index 1516147..459f1ed 100644
32--- a/dix/devices.c
33+++ b/dix/devices.c
34@@ -962,6 +962,23 @@ FreeAllDeviceClasses(ClassesPtr classes)
35
36 }
37
38+static void
39+FreePendingFrozenDeviceEvents(DeviceIntPtr dev)
40+{
41+ QdEventPtr qe, tmp;
42+
43+ if (!dev->deviceGrab.sync.frozen)
44+ return;
45+
46+ /* Dequeue any frozen pending events */
47+ xorg_list_for_each_entry_safe(qe, tmp, &syncEvents.pending, next) {
48+ if (qe->device == dev) {
49+ xorg_list_del(&qe->next);
50+ free(qe);
51+ }
52+ }
53+}
54+
55 /**
56 * Close down a device and free all resources.
57 * Once closed down, the driver will probably not expect you that you'll ever
58@@ -1026,6 +1043,7 @@ CloseDevice(DeviceIntPtr dev)
59 free(dev->last.touches[j].valuators);
60 free(dev->last.touches);
61 dev->config_info = NULL;
62+ FreePendingFrozenDeviceEvents(dev);
63 dixFreePrivates(dev->devPrivates, PRIVATE_DEVICE);
64 free(dev);
65 }
66--
672.25.1
68
diff --git a/meta/recipes-graphics/xwayland/xwayland_23.2.5.bb b/meta/recipes-graphics/xwayland/xwayland_23.2.5.bb
index cafddc62b5..ac0408ea67 100644
--- a/meta/recipes-graphics/xwayland/xwayland_23.2.5.bb
+++ b/meta/recipes-graphics/xwayland/xwayland_23.2.5.bb
@@ -19,6 +19,7 @@ SRC_URI = "https://www.x.org/archive/individual/xserver/xwayland-${PV}.tar.xz \
19 file://CVE-2025-26598.patch \ 19 file://CVE-2025-26598.patch \
20 file://CVE-2025-26599-1.patch \ 20 file://CVE-2025-26599-1.patch \
21 file://CVE-2025-26599-2.patch \ 21 file://CVE-2025-26599-2.patch \
22 file://CVE-2025-26600.patch \
22" 23"
23SRC_URI[sha256sum] = "33ec7ff2687a59faaa52b9b09aa8caf118e7ecb6aed8953f526a625ff9f4bd90" 24SRC_URI[sha256sum] = "33ec7ff2687a59faaa52b9b09aa8caf118e7ecb6aed8953f526a625ff9f4bd90"
24 25