CVE-2022-46340 Memory corruption in xorg-x11-server

High 8.8 Published Updated

A stack corruption flaw in the X.Org X server allows local privilege escalation and remote code execution via X forwarding.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-46340?

CVE-2022-46340 is a high-severity memory corruption vulnerability in Debian Debian Linux, published on 14 Dec 2022. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

A vulnerability was found in X.Org. This security flaw occurs becuase the swap handler for the XTestFakeInput request of the XTest extension may corrupt the stack if GenericEvents with lengths larger than 32 bytes are sent through a the XTestFakeInput request. This issue can lead to local privileges elevation on systems where the X server is running privileged and remote code execution for ssh X forwarding sessions. This issue does not affect systems where client and server use the same byte order.

Weakness: CWE-787

Which versions are affected by CVE-2022-46340?

It affects 3 products.

Linux distribution packages (31)
xorg-x11-server SUSE:Enterprise Storage 7All versions1.20.3-150200.22.5.69.1
xorg-x11-server SUSE:Enterprise Storage 7.1All versions1.20.3-150200.22.5.69.1
xorg-x11-server SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSSAll versions1.20.3-150100.14.5.39.1
xorg-x11-server SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSSAll versions1.20.3-150200.22.5.69.1
xorg-x11-server SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOSAll versions1.20.3-150200.22.5.69.1
xorg-x11-server SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSSAll versions1.20.3-150200.22.5.69.1
xorg-x11-server SUSE:Linux Enterprise Module for Basesystem 15 SP4All versions1.20.3-150400.38.19.1
xorg-x11-server SUSE:Linux Enterprise Module for Development Tools 15 SP4All versions1.20.3-150400.38.19.1
xorg-x11-server SUSE:Linux Enterprise Real Time 15 SP3All versions1.20.3-150200.22.5.69.1
xorg-x11-server SUSE:Linux Enterprise Server 12 SP2-BCLAll versions7.6_1.18.3-76.63.1
xorg-x11-server SUSE:Linux Enterprise Server 12 SP4-ESPOSAll versions1.19.6-4.45.1
xorg-x11-server SUSE:Linux Enterprise Server 12 SP4-LTSSAll versions1.19.6-4.45.1
xorg-x11-server SUSE:Linux Enterprise Server 12 SP5All versions1.19.6-10.46.1
xorg-x11-server SUSE:Linux Enterprise Server 15 SP1-LTSSAll versions1.20.3-150100.14.5.39.1
xorg-x11-server SUSE:Linux Enterprise Server 15 SP2-LTSSAll versions1.20.3-150200.22.5.69.1
xorg-x11-server SUSE:Linux Enterprise Server 15 SP3-LTSSAll versions1.20.3-150200.22.5.69.1
xorg-x11-server SUSE:Linux Enterprise Server for SAP Applications 12 SP4All versions1.19.6-4.45.1
xorg-x11-server SUSE:Linux Enterprise Server for SAP Applications 12 SP5All versions1.19.6-10.46.1
xorg-x11-server SUSE:Linux Enterprise Server for SAP Applications 15 SP1All versions1.20.3-150100.14.5.39.1
xorg-x11-server SUSE:Linux Enterprise Server for SAP Applications 15 SP2All versions1.20.3-150200.22.5.69.1
xorg-x11-server SUSE:Linux Enterprise Server for SAP Applications 15 SP3All versions1.20.3-150200.22.5.69.1
xorg-x11-server SUSE:Linux Enterprise Software Development Kit 12 SP5All versions1.19.6-10.46.1
xorg-x11-server SUSE:Linux Enterprise Workstation Extension 15 SP4All versions1.20.3-150200.22.5.69.1
xwayland SUSE:Linux Enterprise Workstation Extension 15 SP4All versions21.1.4-150400.3.12.1
xorg-x11-server SUSE:Manager Proxy 4.2All versions1.20.3-150200.22.5.69.1
xorg-x11-server SUSE:Manager Server 4.2All versions1.20.3-150200.22.5.69.1
xorg-x11-server SUSE:OpenStack Cloud 9All versions1.19.6-4.45.1
xorg-x11-server SUSE:OpenStack Cloud Crowbar 9All versions1.19.6-4.45.1
xorg-x11-server openSUSE:Leap 15.4All versions1.20.3-150200.22.5.69.1
xorg-x11-server openSUSE:Leap 15.4All versions1.20.3-150400.38.19.1
xwayland openSUSE:Leap 15.4All versions21.1.4-150400.3.12.1

Products include Debian Debian Linux, Fedoraproject Fedora, X.org X Server.

How do I fix CVE-2022-46340?

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-2022-46340 being exploited?

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

All Debian Debian Linux vulnerabilities

Sources

Also known as AZL-44697, DEBIAN-CVE-2022-46340, GHSA-hvwj-m4ph-92v4, SUSE-SU-2023:0653-1, SUSE-SU-2023:0654-1, SUSE-SU-2023:0655-1 and 5 more.

Is CVE-2022-46340 in your software?

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

Check your SBOMs for free