wok-current view xorg-server/stuff/CVE-2024-0409.patch @ rev 25672

patch tazpkg, upgrade core pkgs first
author Stanislas Leduc <shann@slitaz.org>
date Sun Mar 03 17:58:42 2024 +0000 (6 months ago)
parents
children
line source
1 From 2ef0f1116c65d5cb06d7b6d83f8a1aea702c94f7 Mon Sep 17 00:00:00 2001
2 From: Olivier Fourdan <ofourdan@redhat.com>
3 Date: Wed, 6 Dec 2023 11:51:56 +0100
4 Subject: [PATCH] ephyr,xwayland: Use the proper private key for cursor
6 The cursor in DIX is actually split in two parts, the cursor itself and
7 the cursor bits, each with their own devPrivates.
9 The cursor itself includes the cursor bits, meaning that the cursor bits
10 devPrivates in within structure of the cursor.
12 Both Xephyr and Xwayland were using the private key for the cursor bits
13 to store the data for the cursor, and when using XSELINUX which comes
14 with its own special devPrivates, the data stored in that cursor bits'
15 devPrivates would interfere with the XSELINUX devPrivates data and the
16 SELINUX security ID would point to some other unrelated data, causing a
17 crash in the XSELINUX code when trying to (re)use the security ID.
19 CVE-2024-0409
21 Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
22 Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
23 ---
24 hw/kdrive/ephyr/ephyrcursor.c | 2 +-
25 hw/xwayland/xwayland-cursor.c | 2 +-
26 2 files changed, 2 insertions(+), 2 deletions(-)
28 diff --git a/hw/kdrive/ephyr/ephyrcursor.c b/hw/kdrive/ephyr/ephyrcursor.c
29 index f991899c50..3f192d034a 100644
30 --- a/hw/kdrive/ephyr/ephyrcursor.c
31 +++ b/hw/kdrive/ephyr/ephyrcursor.c
32 @@ -246,7 +246,7 @@ miPointerSpriteFuncRec EphyrPointerSpriteFuncs = {
33 Bool
34 ephyrCursorInit(ScreenPtr screen)
35 {
36 - if (!dixRegisterPrivateKey(&ephyrCursorPrivateKey, PRIVATE_CURSOR_BITS,
37 + if (!dixRegisterPrivateKey(&ephyrCursorPrivateKey, PRIVATE_CURSOR,
38 sizeof(ephyrCursorRec)))
39 return FALSE;
41 diff --git a/hw/xwayland/xwayland-cursor.c b/hw/xwayland/xwayland-cursor.c
42 index e3c1aaa50c..bd94b0cfbb 100644
43 --- a/hw/xwayland/xwayland-cursor.c
44 +++ b/hw/xwayland/xwayland-cursor.c
45 @@ -431,7 +431,7 @@ static miPointerScreenFuncRec xwl_pointer_screen_funcs = {
46 Bool
47 xwl_screen_init_cursor(struct xwl_screen *xwl_screen)
48 {
49 - if (!dixRegisterPrivateKey(&xwl_cursor_private_key, PRIVATE_CURSOR_BITS, 0))
50 + if (!dixRegisterPrivateKey(&xwl_cursor_private_key, PRIVATE_CURSOR, 0))
51 return FALSE;
53 return miPointerInitialize(xwl_screen->screen,
54 --
55 GitLab