CVE-2024-21886: Xorg-x11-server: heap buffer overflow in disabledevice

Published Jan 2, 2024
·
Updated

A heap buffer overflow flaw was found in the DisableDevice function in the X.Org server. This issue may lead to an application crash or, in some circumstances, remote code execution in SSH X11 forwarding environments.

Other sources

Xorg-x11-server: heap buffer overflow in disabledevice

Microsoft

ZDI-CAN-22840 - VULNERABILITY DETAILS Version tested:1.21.1.7 Installer file:- Platform tested:debian-live-12.2.0-amd64-xfce.iso

Analysis

The exploit doesn't work if the OS installed on vmware and default virtualbox it works on virtualbox with VBoxVGA graphic controller

DisableDevice() function is called whenever an enabled device is disabled. However, its link/unlink operation has issue during the recursive call to DisableDevice(). It leads to the length mismatch between the total number of device and the number of device in the list. Then, it leads to heap overflow and LPE for some distribution (xorg in debian xfce is run as root under specific display driver) and RCE for sshx11 forwarding environment.

Reference: https://gitlab.freedesktop.org/xorg/xserver/-/blob/8cce7f5d64d4f1027801892631b65b2c859cc559/dix/devices.c#L449

Red Hat

Affected Software

6 affected componentsFixes available
debian/xorg-server
2:1.20.11-1+deb11u132:1.20.11-1+deb11u152:21.1.7-3+deb12u92:21.1.16-1
debian/xwayland<=2:22.1.9-1
2:24.1.6-1
redhat/xorg-server<21.1.11
21.1.11
redhat/xwayland<23.2.4
23.2.4
Microsoft cbl2 xorg-x11-server 1.20.10-12
Microsoft cbl2 xorg-x11-server 1.20.10-15

Event History

Jan 2, 2024
Data Sourced
via Red Hat·10:14 PM
DescriptionSeverityAffected Software
Feb 28, 2024
CVE Published
via MITRE·12:13 PM
Data Sourced
via MITRE·12:13 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·01:15 PM
DescriptionSeverityWeakness
May 31, 2024
Data Sourced
via Launchpad·05:29 PM
Description
Sep 16, 2024
Data Sourced
via Ubuntu·05:46 PM
RemedyDescriptionSeverityAffected Software
Sep 20, 2024
Data Sourced
via Microsoft·07:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·07:00 AM
Affected Software
Updated
via Microsoft·07:00 AM
Affected Software
Updated
via Microsoft·07:00 AM
DescriptionSeverity

Frequently Asked Questions

1

What is the severity of CVE-2024-21886?

CVE-2024-21886 is categorized as a critical vulnerability due to the potential for remote code execution.

2

How do I fix CVE-2024-21886?

To fix CVE-2024-21886, update the xorg-server to version 21.1.11 or xwayland to version 23.2.4 for Red Hat systems, or the relevant patched versions for Debian.

3

What causes the CVE-2024-21886 vulnerability?

CVE-2024-21886 is caused by a heap buffer overflow in the DisableDevice function within the X.Org server.

4

Can CVE-2024-21886 lead to application crashes?

Yes, CVE-2024-21886 can cause application crashes in addition to potentially enabling remote code execution in specific environments.

5

Is CVE-2024-21886 present in all versions of X.Org server?

No, CVE-2024-21886 affects specific versions of the xorg-server and xwayland packages, especially older versions prior to the recommended updates.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203