xserver/test/pyxtest/proto
Peter Hutterer 375d65aa2e test/pyxtest: add test for XKB num_levels stack overflow (ZDI-CAN-30160)
Add a regression test that reproduces the XKB num_levels stack overflow.

The test sends an XkbSetMap request with XkbSetMapResizeTypes that includes
a non-canonical key type with numLevels=255, exceeding XkbMaxShiftLevel
(63). Without the fix, this type would be accepted and stored in the
server's type table. A subsequent ChangeKeyboardMapping would trigger
XkbUpdateKeyTypesFromCore -> XkbKeyTypesForCoreSymbols, where the
oversized num_levels is used as groupsWidth, causing indices into the
tsyms[252] stack buffer to reach up to 1019 and overflow.

Assisted-by: Claude:claude-opus-4-6
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2228>
2026-06-02 09:39:30 +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 XKB num_levels stack overflow (ZDI-CAN-30160) 2026-06-02 09:39:30 +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 test/pyxtest: add test for XKB num_levels stack overflow (ZDI-CAN-30160) 2026-06-02 09:39:30 +10:00
xres.py pyxtest: add tests for the byteswapping patches 2026-05-10 23:42:44 +00:00