summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2024-31081.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2024-31081.patch')
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2024-31081.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2024-31081.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2024-31081.patch
new file mode 100644
index 0000000000..d2c551a0e5
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2024-31081.patch
@@ -0,0 +1,47 @@
1From 3e77295f888c67fc7645db5d0c00926a29ffecee Mon Sep 17 00:00:00 2001
2From: Alan Coopersmith <alan.coopersmith@oracle.com>
3Date: Fri, 22 Mar 2024 18:56:27 -0700
4Subject: [PATCH] Xi: ProcXIPassiveGrabDevice needs to use unswapped length to
5 send reply
6
7CVE-2024-31081
8
9Fixes: d220d6907 ("Xi: add GrabButton and GrabKeysym code.")
10Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
11Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1463>
12
13Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/3e77295f888c67fc7645db5d0c00926a29ffecee]
14CVE: CVE-2024-31081
15Signed-off-by: Ashish Sharma <asharma@mvista.com>
16
17 Xi/xipassivegrab.c | 5 ++++-
18 1 file changed, 4 insertions(+), 1 deletion(-)
19
20diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c
21index c9ac2f8553..896233bec2 100644
22--- a/Xi/xipassivegrab.c
23+++ b/Xi/xipassivegrab.c
24@@ -93,6 +93,7 @@ ProcXIPassiveGrabDevice(ClientPtr client)
25 GrabParameters param;
26 void *tmp;
27 int mask_len;
28+ uint32_t length;
29
30 REQUEST(xXIPassiveGrabDeviceReq);
31 REQUEST_FIXED_SIZE(xXIPassiveGrabDeviceReq,
32@@ -247,9 +248,11 @@ ProcXIPassiveGrabDevice(ClientPtr client)
33 }
34 }
35
36+ /* save the value before SRepXIPassiveGrabDevice swaps it */
37+ length = rep.length;
38 WriteReplyToClient(client, sizeof(rep), &rep);
39 if (rep.num_modifiers)
40- WriteToClient(client, rep.length * 4, modifiers_failed);
41+ WriteToClient(client, length * 4, modifiers_failed);
42
43 out:
44 free(modifiers_failed);
45--
46GitLab
47