Vulnerability · Published Sep 23, 2022 · Assigned by redhat

CVE-2021-3782

Medium 6.6

In plain English

A medium-severity integer overflow in wayland. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 25% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)6.6Medium
Exploit odds (30 days)0.3%top 75.3% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8libwayland-client1.21.0-1.el8ALSA-2023:2786
AlmaLinux:8libwayland-cursor1.21.0-1.el8ALSA-2023:2786
AlmaLinux:8libwayland-egl1.21.0-1.el8ALSA-2023:2786
AlmaLinux:8libwayland-server1.21.0-1.el8ALSA-2023:2786
AlmaLinux:8wayland-devel1.21.0-1.el8ALSA-2023:2786
Debian:12wayland1.21.0-1DEBIAN-CVE-2021-3782
Debian:13wayland1.21.0-1DEBIAN-CVE-2021-3782
Debian:14wayland1.21.0-1DEBIAN-CVE-2021-3782
Rocky Linux:8wayland0:1.21.0-1.el8RLSA-2023:2786
Ubuntu:22.04:LTSwayland1.20.0-1ubuntu0.1USN-5614-1
Ubuntu:22.04:LTSwayland1.20.0-1ubuntu0.1UBUNTU-CVE-2021-3782

Affected products (as reported)

VendorProductVersions
n/a wayland wayland 1.20.91

Weakness: CWE-190 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H

References