CVE-2024-21885 Xorg-x11-server: heap buffer overflow in xisenddevicehierarchyevent

High 7.8 Published Updated

Heap buffer overflow in X.Org server allows remote code execution or crashes via SSH X11 forwarding.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2024-21885?

CVE-2024-21885 is a high-severity memory corruption vulnerability in Red Hat Enterprise Linux 6, published on 28 Feb 2024. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

A flaw was found in X.Org server. In the XISendDeviceHierarchyEvent function, it is possible to exceed the allocated array length when certain new device IDs are added to the xXIHierarchyInfo struct. This can trigger a heap buffer overflow condition, which may lead to an application crash or remote code execution in SSH X11 forwarding environments.

Weakness: CWE-122

Which versions are affected by CVE-2024-21885?

How do I fix CVE-2024-21885?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2024-21885 being exploited?

There is no known exploitation of CVE-2024-21885 in the wild and no public exploit code.

Sources

Also known as AZL-110537, AZL-35405, AZL-44142, BELL-CVE-2024-21885, DEBIAN-CVE-2024-21885, GHSA-2x93-8973-5mgq and 1 more.

Is CVE-2024-21885 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free