Repository navigation
(master) test/pyxtest: cover unbounded DEVICE_RESOLUTION SwapLongs - #3772
Conversation
Send a swapped ChangeDeviceControl/DEVICE_RESOLUTION with num_valuators=255 and no valuator payload. Without the SProc length check this overruns the request buffer; with it the server returns BadLength. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2285> (cherry picked from commit ddf3edc) (cherry picked from commit 3ed09c52d4a9cfe85b5f9d2f64beac022d79b221) (cherry picked from commit 3f8dfe0)
Send a swapped ChangeDeviceControl/DEVICE_RESOLUTION with num_valuators=255 and no valuator payload. Without the SProc length check this overruns the request buffer; with it the server returns BadLength. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2285> (cherry picked from commit ddf3edc) (cherry picked from commit 3ed09c52d4a9cfe85b5f9d2f64beac022d79b221) (cherry picked from commit 3f8dfe0) PR: #3772
Review: passed with two advisoriesFirst, a process note against my own review: this PR already carried a What this test actually protectsRegression test for the The canary is the good part of this test and worth calling out: appending an Assertions verified as reachable: Advisory — the test will error instead of skipping when XInput is absent opcode = conn.query_extension(Extension.XI).opcode
ext = conn.query_extension(Extension.XI)
if not ext:
pytest.skip("XInput extension not available")That guard exists for a reason, and this file uses Advisory —
|
Send a swapped ChangeDeviceControl/DEVICE_RESOLUTION with
num_valuators=255 and no valuator payload. Without the SProc length
check this overruns the request buffer; with it the server returns
BadLength.
Co-authored-by: Cursor cursoragent@cursor.com
Signed-off-by: Olivier Fourdan ofourdan@redhat.com
Part-of: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2285
(cherry picked from commit ddf3edc)
(cherry picked from commit 3ed09c52d4a9cfe85b5f9d2f64beac022d79b221)
(cherry picked from commit 3f8dfe0)
Backports
release/25.0Release merges are manual, by the maintainer.