Files
xserver/dix
Olivier Fourdan fb6dd658d7 Cursor: Refuse to free the root cursor
If a cursor reference count drops to 0, the cursor is freed.

The root cursor however is referenced with a specific global variable,
and when the root cursor is freed, the global variable may still point
to freed memory.

Make sure to prevent the rootCursor from being explicitly freed by a
client.

CVE-2025-26594, ZDI-CAN-25544

This vulnerability was discovered by:
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative

v2: Explicitly forbid XFreeCursor() on the root cursor (Peter Hutterer
<peter.hutterer@who-t.net>)
v3: Return BadCursor instead of BadValue (Michel Dänzer
<michel@daenzer.net>)

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Suggested-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1828>
(cherry picked from commit 01642f263f)
2026-01-25 10:40:00 -08:00
..
2020-07-05 13:07:33 -07:00
2015-07-08 16:41:29 -04:00
2014-11-12 10:25:00 +10:00
2026-01-25 10:40:00 -08:00
2026-01-25 10:39:57 -08:00
2026-01-25 10:39:57 -08:00
2019-10-30 16:17:04 +00:00
2015-04-21 16:57:07 -07:00
2026-01-19 12:32:20 -08:00
2013-07-23 23:56:58 +01:00
2020-07-05 13:07:33 -07:00