Stack-based buffer overflow in X.org Server - CVE-2022-46340

 

Stack-based buffer overflow in X.org Server - CVE-2022-46340

Published: December 20, 2022 / Updated: January 2, 2023


Vulnerability identifier: #VU70433
CSH Severity: Low
CVSS v4: 8.5 [CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2022-46340
CWE-ID: CWE-121
Exploitation vector: Local access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a local user to escalate privileges on the system.

The vulnerability exists due to a boundary error  within the swap handler for the XTestFakeInput request of the XTest extension if GenericEvents with lengths larger than 32 bytes are sent through a the XTestFakeInput request. A local user can trigger a stack-based buffer overflow and execute arbitrary code with elevated privileges.



Affected software

X.org Server
Amazon Linux AMI
Debian Linux
Gentoo Linux
Oracle Linux
SUSE Linux Enterprise Server 15
SUSE Linux Enterprise High Performance Computing 15
SUSE Linux Enterprise Server for SAP Applications 15
SUSE Linux Enterprise High Performance Computing 12
SUSE Linux Enterprise Server 12
SUSE Linux Enterprise High Performance Computing ESPOS 15
SUSE Linux Enterprise High Performance Computing LTSS 15
SUSE Linux Enterprise Real Time 15
SUSE Linux Enterprise Desktop 15
SUSE Linux Enterprise Workstation Extension 15
SUSE Linux Enterprise Server for SAP Applications 12
SUSE Linux Enterprise Software Development Kit 12
SUSE CaaS Platform
SUSE Manager Server
SUSE Manager Proxy
SUSE Manager Retail Branch Server
SUSE Enterprise Storage
Red Hat Enterprise Linux for Power, big endian
Red Hat Enterprise Linux for IBM z Systems
Red Hat Enterprise Linux Desktop
Red Hat Enterprise Linux Workstation
Red Hat Enterprise Linux Server
Red Hat Enterprise Linux for Power, little endian
Red Hat Enterprise Linux for Scientific Computing
CentOS
Anolis OS
Red Hat Enterprise Linux for ARM 64
Red Hat CodeReady Linux Builder for Power, little endian
Red Hat Enterprise Linux for x86_64
Red Hat CodeReady Linux Builder for IBM z Systems
Red Hat CodeReady Linux Builder for ARM 64
Red Hat CodeReady Linux Builder for x86_64
SUSE OpenStack Cloud
SUSE OpenStack Cloud Crowbar
Oracle Solaris
SUSE Linux Enterprise Server 12 SP2 BCL
SUSE Linux Enterprise Server
SUSE Linux Enterprise Server 12 SP4 ESPOS
SUSE Linux Enterprise Server for SAP
SUSE Linux Enterprise Server 12 SP4 LTSS
SUSE Linux Enterprise Server for SAP Applications
SUSE Linux Enterprise Software Development Kit
Ubuntu
Slackware Linux
SUSE Linux Enterprise High Performance Computing
SUSE Linux Enterprise High Performance Computing 15 SP1 LTSS
SUSE Linux Enterprise Server 15 SP1 LTSS
SUSE Linux Enterprise High Performance Computing 15 SP2 LTSS
SUSE Linux Enterprise Server 15 SP2 LTSS
SUSE Linux Enterprise Module for Development Tools
SUSE Linux Enterprise Workstation Extension
SUSE Linux Enterprise Module for Basesystem
SUSE Linux Enterprise Server 15 SP3 LTSS
SUSE Linux Enterprise Desktop
Development Tools Module
Basesystem Module
openSUSE Leap
openEuler
Fedora
xwayland-hwe-16.04 (Ubuntu package)
xserver-xorg-core-hwe-16.04 (Ubuntu package)
xserver-xorg-core (Ubuntu package)
xwayland (Ubuntu package)
tigervnc (Red Hat package)
tigervnc
tigervnc-server-applet
tigervnc-license
tigervnc-icons
tigervnc-server-module
tigervnc-server-minimal
tigervnc-server
tigervnc-selinux
xorg-x11-server
xorg-x11-server-extra-debuginfo
xorg-x11-server-extra
xorg-x11-server-debugsource
xorg-x11-server-debuginfo
xorg-x11-server-sdk
xorg-x11-server-source
xorg-x11-server-wayland-debuginfo
xorg-x11-server-wayland
xorg-x11-server-Xdmx
xorg-x11-server-Xephyr
xorg-x11-server-Xnest
xorg-x11-server-Xorg
xorg-x11-server-Xvfb
xorg-x11-server-Xwayland
xorg-x11-server-common
xorg-x11-server-devel
xorg-x11-server (Red Hat package)
xserver-xorg-core-hwe-18.04 (Ubuntu package)
xwayland-hwe-18.04 (Ubuntu package)
xorg-x11-server-help
xorg-server (Debian package)
xorg-x11-server-doc
xorg-server
xorg-server-xephyr
xorg-server-xnest
xorg-server-xvfb
xorg-x11-server-Xwayland (Red Hat package)
xorg-server-xwayland
xwayland-debugsource
xwayland-debuginfo
xwayland
xwayland-devel
x11-base/xorg-server
x11-base/xwayland

How to mitigate CVE-2022-46340

Install updates from vendor's website.

X.org Server - update to 21.1.5
xwayland-hwe-16.04 (Ubuntu package) - update to Ubuntu Pro
xserver-xorg-core-hwe-16.04 (Ubuntu package) - update to Ubuntu Pro (Infra-only)
xserver-xorg-core (Ubuntu package) - addressed in versions Ubuntu Pro (Infra-only), 2:1.19.6-1ubuntu4.13, 2:1.20.13-1ubuntu1~20.04.5, 2:21.1.3-2ubuntu2.5, 2:21.1.4-2ubuntu1.3
xwayland (Ubuntu package) - addressed in versions Ubuntu Pro (Infra-only), 2:1.19.6-1ubuntu4.13, 2:1.20.13-1ubuntu1~20.04.5, 2:22.1.1-1ubuntu0.4, 2:22.1.3-2ubuntu0.2
tigervnc (Red Hat package) - addressed in versions 1.1.0-25.el6_10.13, 1.8.0-23.el7_9, 1.12.0-13.el9_2, 1.12.0-15.el8_8
tigervnc - addressed in versions 1.8.0-23, 1.12.0-15
tigervnc-server-applet - update to 1.8.0-23
tigervnc-license - addressed in versions 1.8.0-23, 1.12.0-15
tigervnc-icons - addressed in versions 1.8.0-23, 1.12.0-15
tigervnc-server-module - addressed in versions 1.8.0-23, 1.12.0-15
tigervnc-server-minimal - addressed in versions 1.8.0-23, 1.12.0-15
tigervnc-server - addressed in versions 1.8.0-23, 1.12.0-15
tigervnc - addressed in versions 1.12.0, 1.13.1
tigervnc-selinux - update to 1.12.0-15
xorg-x11-server - addressed in versions 1.17.4-18.50, 1.20.14-12
xorg-x11-server-extra-debuginfo - addressed in versions 1.19.6-4.39.1, 1.19.6-4.45.1, 1.19.6-10.40.1, 1.19.6-10.46.1, 1.19.6-150000.8.47.1, 1.20.3-150100.14.5.33.1, 1.20.3-150100.14.5.39.1, 1.20.3-150200.22.5.63.1, 1.20.3-150200.22.5.69.1, 1.20.3-150400.38.13.1, 1.20.3-150400.38.19.1, 7.6_1.18.3-76.57.1, 7.6_1.18.3-76.63.1
xorg-x11-server-extra - addressed in versions 1.19.6-4.39.1, 1.19.6-4.45.1, 1.19.6-10.40.1, 1.19.6-10.46.1, 1.19.6-150000.8.47.1, 1.20.3-150100.14.5.33.1, 1.20.3-150100.14.5.39.1, 1.20.3-150200.22.5.63.1, 1.20.3-150200.22.5.69.1, 1.20.3-150400.38.13.1, 1.20.3-150400.38.19.1, 7.6_1.18.3-76.57.1, 7.6_1.18.3-76.63.1
xorg-x11-server-debugsource - addressed in versions 1.19.6-4.39.1, 1.19.6-4.45.1, 1.19.6-10.40.1, 1.19.6-10.46.1, 1.19.6-150000.8.47.1, 1.20.3-150100.14.5.33.1, 1.20.3-150100.14.5.39.1, 1.20.3-150200.22.5.63.1, 1.20.3-150200.22.5.69.1, 1.20.3-150400.38.13.1, 1.20.3-150400.38.19.1, 7.6_1.18.3-76.57.1, 7.6_1.18.3-76.63.1
xorg-x11-server-debuginfo - addressed in versions 1.19.6-4.39.1, 1.19.6-4.45.1, 1.19.6-10.40.1, 1.19.6-10.46.1, 1.19.6-150000.8.47.1, 1.20.3-150100.14.5.33.1, 1.20.3-150100.14.5.39.1, 1.20.3-150200.22.5.63.1, 1.20.3-150200.22.5.69.1, 1.20.3-150400.38.13.1, 1.20.3-150400.38.19.1, 7.6_1.18.3-76.57.1, 7.6_1.18.3-76.63.1
xorg-x11-server - addressed in versions 1.19.6-4.39.1, 1.19.6-4.45.1, 1.19.6-10.40.1, 1.19.6-10.46.1, 1.19.6-150000.8.47.1, 1.20.3-150100.14.5.33.1, 1.20.3-150100.14.5.39.1, 1.20.3-150200.22.5.63.1, 1.20.3-150200.22.5.69.1, 1.20.3-150400.38.13.1, 1.20.3-150400.38.19.1, 7.6_1.18.3-76.57.1, 7.6_1.18.3-76.63.1
xorg-x11-server-sdk - addressed in versions 1.19.6-10.40.1, 1.19.6-10.46.1, 1.19.6-150000.8.47.1, 1.20.3-150100.14.5.33.1, 1.20.3-150100.14.5.39.1, 1.20.3-150200.22.5.63.1, 1.20.3-150200.22.5.69.1, 1.20.3-150400.38.13.1, 1.20.3-150400.38.19.1
xorg-x11-server-source - addressed in versions 1.20.3-150200.22.5.63.1, 1.20.3-150400.38.13.1, 1.20.3-150400.38.19.1
xorg-x11-server-wayland-debuginfo - addressed in versions 1.20.3-150200.22.5.63.1, 1.20.3-150200.22.5.69.1
xorg-x11-server-wayland - addressed in versions 1.20.3-150200.22.5.63.1, 1.20.3-150200.22.5.69.1
xorg-x11-server-Xdmx - addressed in versions 1.20.4-21, 1.20.11-15.0.1
xorg-x11-server-Xephyr - addressed in versions 1.20.4-21, 1.20.11-15.0.1
xorg-x11-server-Xnest - addressed in versions 1.20.4-21, 1.20.11-15.0.1
xorg-x11-server-Xorg - addressed in versions 1.20.4-21, 1.20.11-15.0.1
xorg-x11-server-Xvfb - addressed in versions 1.20.4-21, 1.20.11-15.0.1
xorg-x11-server-Xwayland - addressed in versions 1.20.4-21, 21.1.3-7
xorg-x11-server-common - addressed in versions 1.20.4-21, 1.20.11-15.0.1
xorg-x11-server-devel - addressed in versions 1.20.4-21, 1.20.11-15.0.1
xorg-x11-server-source - addressed in versions 1.20.4-21, 1.20.11-15.0.1
xorg-x11-server (Red Hat package) - addressed in versions 1.20.4-21.el7_9, 1.20.11-15.el8, 1.20.11-17.el9
xserver-xorg-core-hwe-18.04 (Ubuntu package) - update to 2:1.20.8-2ubuntu2.2~18.04.9
xwayland-hwe-18.04 (Ubuntu package) - update to 2:1.20.8-2ubuntu2.2~18.04.9
xorg-x11-server - update to 1.20.8-13
xorg-x11-server-devel - update to 1.20.8-13
xorg-x11-server-Xephyr - update to 1.20.8-13
xorg-x11-server-debuginfo - update to 1.20.8-13
xorg-x11-server-help - update to 1.20.8-13
xorg-x11-server-debugsource - update to 1.20.8-13
xorg-server (Debian package) - update to 2:1.20.11-1+deb11u4
xorg-x11-server-doc - update to 1.20.11-15.0.1
xorg-server - update to 1.20.14
xorg-server-xephyr - update to 1.20.14
xorg-server-xnest - update to 1.20.14
xorg-server-xvfb - update to 1.20.14
xorg-x11-server - addressed in versions 1.20.14-11.fc36, 1.20.14-11.fc37, 1.20.14-12.fc36, 1.20.14-12.fc37
xorg-x11-server-Xwayland (Red Hat package) - addressed in versions 21.1.3-7.el9, 21.1.3-10.el8
xorg-server-xwayland - update to 21.1.4
xwayland-debugsource - addressed in versions 21.1.4-150400.3.6.1, 21.1.4-150400.3.12.1
xwayland-debuginfo - addressed in versions 21.1.4-150400.3.6.1, 21.1.4-150400.3.12.1
xwayland - addressed in versions 21.1.4-150400.3.6.1, 21.1.4-150400.3.12.1
xwayland-devel - addressed in versions 21.1.4-150400.3.6.1, 21.1.4-150400.3.12.1
x11-base/xorg-server - update to 21.1.8
xorg-x11-server-Xwayland - addressed in versions 22.1.6-1.fc36, 22.1.6-1.fc37
x11-base/xwayland - update to 23.1.1

External References

Related Security Bulletins