Skip to content
OpenAdvisories
Medium · 6.6 CVE-2021-3782 EUVD-2021-27046GHSA-pvw2-9h4r-c5cr

An internal reference count is held on the buffer pool, incremented every time a new buffer is created from the pool. The reference count i…

Published Sep 23, 2022 · Updated May 22, 2025 · Assigned by redhat

Description

An internal reference count is held on the buffer pool, incremented every time a new buffer is created from the pool. The reference count is maintained as an int; on LP64 systems this can cause the reference count to overflow if the client creates a large number of wl_shm buffer objects, or if it can coerce the server to create a large number of external references to the buffer storage. With the reference count overflowing, a use-after-free can be constructed on the wl_shm_pool tracking structure, where values may be incremented or decremented; it may also be possible to construct a limited oracle to leak 4 bytes of server-side memory to the attacking client at a time.

Affected products

VendorProductAffectedFixed
— wayland wayland 1.20.91 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 wayland 1.21.0-1 —
Debian 13 wayland 1.21.0-1 —
Debian 12 wayland 1.21.0-1 —
ReleasePackageFixed inAdvisory
Ubuntu 22.04 LTS wayland 1.20.0-1ubuntu0.1 USN-5614-1
Ubuntu 20.04 LTS wayland 1.18.0-1ubuntu0.1 USN-5614-1
Ubuntu 18.04 LTS wayland 1.16.0-1ubuntu1.1~18.04.4 USN-5614-1
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 16.04 LTS wayland 1.12.0-1~ubuntu16.04.3+esm1 USN-5614-2
ReleasePackageFixed inAdvisory
RHEL 8 wayland +5 1.21.0-1.el8 RHSA-2023:2786

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 8 wayland-devel +4 1.21.0-1.el8 ALSA-2023:2786

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 8 wayland 1.21.0-1.el8 RLSA-2023:2786
ReleasePackageFixed inAdvisory
SLES 15 SP4 wayland 1.19.0-150400.3.3.1 SUSE-SU-2023:1860-1
SLES 15 SP3 wayland 1.18.0-150200.3.3.1 SUSE-SU-2023:1873-1
SLES 15 SP2 wayland 1.18.0-150200.3.3.1 SUSE-SU-2023:1873-1
SLES 15 SP1 wayland 1.16.0-150100.7.3.1 SUSE-SU-2023:1874-1
SLES 12 SP5 wayland 1.13.0-3.3.1 SUSE-SU-2023:1864-1
Show 15 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 15 SP3 wayland 1.18.0-150200.3.3.1 SUSE-SU-2023:1873-1
SLES for SAP 15 SP2 wayland 1.18.0-150200.3.3.1 SUSE-SU-2023:1873-1
SLES for SAP 15 SP1 wayland 1.16.0-150100.7.3.1 SUSE-SU-2023:1874-1
SLES for SAP 12 SP5 wayland 1.13.0-3.3.1 SUSE-SU-2023:1864-1
SLE Real Time 15 SP3 wayland 1.18.0-150200.3.3.1 SUSE-SU-2023:1873-1
SLE Micro 5.4 wayland 1.19.0-150400.3.3.1 SUSE-SU-2023:1860-1
SLE Micro 5.3 wayland 1.19.0-150400.3.3.1 SUSE-SU-2023:1860-1
SLE Micro 5.2 wayland 1.18.0-150200.3.3.1 SUSE-SU-2023:1873-1
SLE HPC 15 SP3 wayland 1.18.0-150200.3.3.1 SUSE-SU-2023:1873-1
SLE HPC 15 SP2 wayland 1.18.0-150200.3.3.1 SUSE-SU-2023:1873-1
SLE HPC 15 SP1 wayland 1.16.0-150100.7.3.1 SUSE-SU-2023:1874-1
SUSE Manager Server 4.2 wayland 1.18.0-150200.3.3.1 SUSE-SU-2023:1873-1
SUSE Manager Proxy 4.2 wayland 1.18.0-150200.3.3.1 SUSE-SU-2023:1873-1
SUSE Enterprise Storage 7.1 wayland 1.18.0-150200.3.3.1 SUSE-SU-2023:1873-1
SUSE Enterprise Storage 7 wayland 1.18.0-150200.3.3.1 SUSE-SU-2023:1873-1
ReleasePackageFixed inAdvisory
openSUSE Leap 15.4 wayland 1.19.0-150400.3.3.1 SUSE-SU-2023:1860-1
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
openSUSE Leap Micro 5.3 wayland 1.19.0-150400.3.3.1 SUSE-SU-2023:1860-1

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 wayland-doc +5 1.22.0-1.amzn2023.0.1 ALAS2023-2023-203
Amazon Linux 2 wayland-doc +5 1.17.0-1.amzn2.0.1 ALAS2-2023-2103

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 2 (CBL-Mariner) wayland 1.21.0-1 —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 8 wayland-devel +4 1.21.0-1.el8 ELSA-2023-2786

Advisories 13

References