diff options
Diffstat (limited to 'meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2024-0229-4.patch')
-rw-r--r-- | meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2024-0229-4.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2024-0229-4.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2024-0229-4.patch new file mode 100644 index 0000000000..d1a6214793 --- /dev/null +++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2024-0229-4.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From 37539cb0bfe4ed96d4499bf371e6b1a474a740fe Mon Sep 17 00:00:00 2001 | ||
2 | From: Peter Hutterer <peter.hutterer@who-t.net> | ||
3 | Date: Thu, 21 Dec 2023 14:10:11 +1000 | ||
4 | Subject: [PATCH] Xi: require a pointer and keyboard device for | ||
5 | XIAttachToMaster | ||
6 | |||
7 | If we remove a master device and specify which other master devices | ||
8 | attached slaves should be returned to, enforce that those two are | ||
9 | indeeed a pointer and a keyboard. | ||
10 | |||
11 | Otherwise we can try to attach the keyboards to pointers and vice versa, | ||
12 | leading to possible crashes later. | ||
13 | |||
14 | Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/37539cb0bfe4ed96d4499bf371e6b1a474a740fe] | ||
15 | CVE: CVE-2024-0229 | ||
16 | Signed-off-by: Vijay Anusuri <vanusuri@mvista.com> | ||
17 | --- | ||
18 | Xi/xichangehierarchy.c | 4 ++-- | ||
19 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
20 | |||
21 | diff --git a/Xi/xichangehierarchy.c b/Xi/xichangehierarchy.c | ||
22 | index 504defe566..d2d985848d 100644 | ||
23 | --- a/Xi/xichangehierarchy.c | ||
24 | +++ b/Xi/xichangehierarchy.c | ||
25 | @@ -270,7 +270,7 @@ remove_master(ClientPtr client, xXIRemoveMasterInfo * r, int flags[MAXDEVICES]) | ||
26 | if (rc != Success) | ||
27 | goto unwind; | ||
28 | |||
29 | - if (!IsMaster(newptr)) { | ||
30 | + if (!IsMaster(newptr) || !IsPointerDevice(newptr)) { | ||
31 | client->errorValue = r->return_pointer; | ||
32 | rc = BadDevice; | ||
33 | goto unwind; | ||
34 | @@ -281,7 +281,7 @@ remove_master(ClientPtr client, xXIRemoveMasterInfo * r, int flags[MAXDEVICES]) | ||
35 | if (rc != Success) | ||
36 | goto unwind; | ||
37 | |||
38 | - if (!IsMaster(newkeybd)) { | ||
39 | + if (!IsMaster(newkeybd) || !IsKeyboardDevice(newkeybd)) { | ||
40 | client->errorValue = r->return_keyboard; | ||
41 | rc = BadDevice; | ||
42 | goto unwind; | ||
43 | -- | ||
44 | GitLab | ||
45 | |||