diff options
author | Olivier Fourdan <ofourdan@redhat.com> | 2023-12-06 11:51:56 +0100 |
---|---|---|
committer | José Expósito <jose.exposito89@gmail.com> | 2024-01-16 10:00:37 +0100 |
commit | a4f0e9466f3bc7073a8f0c28a581211c2d7adf0e (patch) | |
tree | 57f7d2c4819c4d377ef4c3ed4b191777ceddc1e5 | |
parent | 8d825f72da71d6c38cbb02cf2ee2dd9e0e0f50f2 (diff) |
ephyr,xwayland: Use the proper private key for cursor
The cursor in DIX is actually split in two parts, the cursor itself and
the cursor bits, each with their own devPrivates.
The cursor itself includes the cursor bits, meaning that the cursor bits
devPrivates in within structure of the cursor.
Both Xephyr and Xwayland were using the private key for the cursor bits
to store the data for the cursor, and when using XSELINUX which comes
with its own special devPrivates, the data stored in that cursor bits'
devPrivates would interfere with the XSELINUX devPrivates data and the
SELINUX security ID would point to some other unrelated data, causing a
crash in the XSELINUX code when trying to (re)use the security ID.
CVE-2024-0409
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 2ef0f1116c65d5cb06d7b6d83f8a1aea702c94f7)
-rw-r--r-- | hw/kdrive/ephyr/ephyrcursor.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/kdrive/ephyr/ephyrcursor.c b/hw/kdrive/ephyr/ephyrcursor.c index f991899c5..3f192d034 100644 --- a/hw/kdrive/ephyr/ephyrcursor.c +++ b/hw/kdrive/ephyr/ephyrcursor.c @@ -246,7 +246,7 @@ miPointerSpriteFuncRec EphyrPointerSpriteFuncs = { Bool ephyrCursorInit(ScreenPtr screen) { - if (!dixRegisterPrivateKey(&ephyrCursorPrivateKey, PRIVATE_CURSOR_BITS, + if (!dixRegisterPrivateKey(&ephyrCursorPrivateKey, PRIVATE_CURSOR, sizeof(ephyrCursorRec))) return FALSE; |