xserver/test/pyxtest/proto
Peter Hutterer 3568302483 test/pyxtest: add test for font alias stack overflow (ZDI-CAN-30136)
Add ListFonts, SetFontPath, and GetFontPath protocol builders to
proto/x11.py and a regression test that reproduces the
doListFontsAndAliases stack buffer overflow.

The test creates a temporary font directory with a fonts.alias file
containing an alias whose target name is 400 bytes -- exceeding the
old XLFDMAXFONTNAMELEN of 256 but under libXfont2's MAXFONTNAMELEN of
1024. It prepends this directory to the font path via SetFontPath, then
sends ListFonts matching the alias name. Without the fix, the server
would copy the oversized resolved name into a 256-byte stack buffer,
causing a stack buffer overflow.

ZDI-CAN-30136

Assisted-by: Claude:claude-opus-4-6
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2228>
2026-06-02 09:41:02 +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 font alias stack overflow (ZDI-CAN-30136) 2026-06-02 09:41:02 +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