xserver/test/pyxtest/proto
Peter Hutterer 57129a43b7 test/pyxtest: add test for ScreenSaver CreateSaverWindow UAF (ZDI-CAN-30168)
Add screensaver protocol builders for SetAttributes, UnsetAttributes, and
ForceScreenSaver, then add a regression test that reproduces the
CreateSaverWindow use-after-free.

The test sequence:
1. SetAttributes(root, 100x100, mask=0) - creates screen private with attr
2. ForceScreenSaver(Active) - creates the saver window
3. UnsetAttributes(root) - clears pPriv->attr to NULL
4. ForceScreenSaver(Active) - re-enters CreateSaverWindow

Without the fix, step 4 triggers CheckScreenPrivate which finds all fields
empty (attr=NULL, events=NULL, hasWindow=FALSE, installedMap=None), frees
pPriv, and sets the screen private to NULL. The function then dereferences
the freed pPriv->attr pointer, causing a use-after-free.

Assisted-by: Claude:claude-opus-4-6
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2228>
2026-06-01 08:31:59 +10:00
..
__init__.py test: add pytest-based test suite 2026-05-10 23:42:43 +00:00
bigrequests.py test: add pytest-based test suite 2026-05-10 23:42:43 +00:00
glx.py test/pyxtest: add test for GLX ChangeDrawableAttributes OOB read (ZDI-CAN-30165) 2026-06-01 08:31:59 +10:00
present.py pyxtest: add test for present notify array byte-swap fix 2026-05-15 04:01:11 +00:00
randr.py pyxtest: add tests for the byteswapping patches 2026-05-10 23:42:44 +00:00
record.py byxtest: add test cases for the RECORD extension CVEs of the last years 2026-05-10 23:42:44 +00:00
render.py pyxtest: add tests for the byteswapping patches 2026-05-10 23:42:44 +00:00
screensaver.py test/pyxtest: add test for ScreenSaver CreateSaverWindow UAF (ZDI-CAN-30168) 2026-06-01 08:31:59 +10:00
shm.py pyxtest: add tests for the byteswapping patches 2026-05-10 23:42:44 +00:00
sync.py test/pyxtest: add tests for miSyncDestroyFence/FreeCounter (ZDI-CAN-30159/30163) 2026-06-01 08:31:59 +10:00
vidmode.py pyxtest: fix the vidmode SwitchToModeRequest test 2026-05-15 04:14:37 +00:00
x11.py test/pyxtest: add test for ScreenSaver CreateSaverWindow UAF (ZDI-CAN-30168) 2026-06-01 08:31:59 +10:00
xi.py pyxtest: add tests for XI property data byte-swap fix 2026-05-10 23:42:44 +00:00
xinerama.py pyxtest: add tests for the byteswapping patches 2026-05-10 23:42:44 +00:00
xkb.py pyxtest: rework the request handling to avoid to_bytes() invocations 2026-05-20 23:05:35 +00:00
xres.py pyxtest: add tests for the byteswapping patches 2026-05-10 23:42:44 +00:00