Skip to content

(release/25.0) xkb: Fix out-of-bounds array access in xkmread.c ReadXkmGeometry#2811

Open
metux wants to merge 1 commit into
release/25.0from
pr/release/25.0-xkb-fix-out-of-bounds-array-access-in-xkmread-c-readxkmgeometry-_2026-05-18_20-30-45
Open

(release/25.0) xkb: Fix out-of-bounds array access in xkmread.c ReadXkmGeometry#2811
metux wants to merge 1 commit into
release/25.0from
pr/release/25.0-xkb-fix-out-of-bounds-array-access-in-xkmread-c-readxkmgeometry-_2026-05-18_20-30-45

Conversation

@metux
Copy link
Copy Markdown
Contributor

@metux metux commented May 18, 2026

The primary_ndx and approx_ndx fields from the XKM shape wire
description are used as indices into the shape->outlines[] array without
bounds checking against num_outlines.

Exploiting this (if it can be exploited) requires a malicious xkbcomp -
the path of which is built-in at compile time. There are lower-hanging
targets than trying to exploit through an XKM file.

Assisted-by: Claude:claude-claude-opus-4-6
Part-of: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2207

The primary_ndx and approx_ndx fields from the XKM shape wire
description are used as indices into the shape->outlines[] array without
bounds checking against num_outlines.

Exploiting this (if it can be exploited) requires a malicious xkbcomp -
the path of which is built-in at compile time. There are lower-hanging
targets than trying to exploit through an XKM file.

Assisted-by: Claude:claude-claude-opus-4-6
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2207>
@metux metux self-assigned this May 18, 2026
@metux metux requested a review from a team May 18, 2026 18:31
metux pushed a commit that referenced this pull request May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants