Skip to content

xkb: Fix buffer overflow in _XkbSetCompatMap() #1092

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 3.6.x
Choose a base branch
from

Conversation

uli42
Copy link
Member

@uli42 uli42 commented May 2, 2025

Fixes #1085 (CVE-2024-9632)

Backport of this xorg-xserver upstream commit:
commit 85b776571487f52e756f68a069c768757369bfe3
Author: Matthieu Herrb matthieu@herrb.eu
Date: Thu Oct 10 10:37:28 2024 +0200

xkb: Fix buffer overflow in _XkbSetCompatMap()

The _XkbSetCompatMap() function attempts to resize the `sym_interpret`
buffer.

However, It didn't update its size properly. It updated `num_si` only,
without updating `size_si`.

This may lead to local privilege escalation if the server is run as root
or remote code execution (e.g. x11 over ssh).

CVE-2024-9632, ZDI-CAN-24756

This vulnerability was discovered by:
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: José Expósito <jexposit@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1733>

Fixes ArcticaProject#1085 (CVE-2024-9632)

Backport of this xorg-xserver upstream commit:
  commit 85b776571487f52e756f68a069c768757369bfe3
  Author: Matthieu Herrb <matthieu@herrb.eu>
  Date:   Thu Oct 10 10:37:28 2024 +0200

    xkb: Fix buffer overflow in _XkbSetCompatMap()

    The _XkbSetCompatMap() function attempts to resize the `sym_interpret`
    buffer.

    However, It didn't update its size properly. It updated `num_si` only,
    without updating `size_si`.

    This may lead to local privilege escalation if the server is run as root
    or remote code execution (e.g. x11 over ssh).

    CVE-2024-9632, ZDI-CAN-24756

    This vulnerability was discovered by:
    Jan-Niklas Sohn working with Trend Micro Zero Day Initiative

    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Tested-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: José Expósito <jexposit@redhat.com>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1733>
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.

CVE-2024-9632, CVE-2024-30180, CVE-2024-31081, CVE-2024-31083
1 participant