CVE-2021-3782
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.
What to do
Fixed builds are available from AlmaLinux, Debian, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 22.04 | wayland | Fixed | 1.20.0-1ubuntu0.1 | UBUNTU-CVE-2021-3782 |
| Ubuntu 20.04 | wayland | Fixed | 1.18.0-1ubuntu0.1 | UBUNTU-CVE-2021-3782 |
| Ubuntu 18.04 | wayland | Fixed | 1.16.0-1ubuntu1.1~18.04.4 | UBUNTU-CVE-2021-3782 |
| Ubuntu 16.04 | wayland | Fix pending | 1.12.0-1~ubuntu16.04.3+esm1 (Ubuntu Pro) | UBUNTU-CVE-2021-3782 |
| Ubuntu 14.04 | wayland | Fix pending | ||
| Debian 14 | wayland | Fixed | 1.21.0-1 | DEBIAN-CVE-2021-3782 |
| Debian 13 | wayland | Fixed | 1.21.0-1 | DEBIAN-CVE-2021-3782 |
| Debian 12 | wayland | Fixed | 1.21.0-1 | DEBIAN-CVE-2021-3782 |
| Red Hat Enterprise Linux 9 | libwayland-client | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 9 | libwayland-cursor | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 9 | libwayland-egl | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 9 | libwayland-server | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 9 | wayland-devel | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 8 | libwayland-client | Fixed | 0:1.21.0-1.el8 | RHSA-2023:2786 |
| Red Hat Enterprise Linux 8 | libwayland-cursor | Fixed | 0:1.21.0-1.el8 | RHSA-2023:2786 |
| Red Hat Enterprise Linux 8 | libwayland-egl | Fixed | 0:1.21.0-1.el8 | RHSA-2023:2786 |
| Red Hat Enterprise Linux 8 | libwayland-server | Fixed | 0:1.21.0-1.el8 | RHSA-2023:2786 |
| Red Hat Enterprise Linux 8 | wayland | Fixed | 0:1.21.0-1.el8 | RHSA-2023:2786 |
| Red Hat Enterprise Linux 8 | wayland-devel | Fixed | 0:1.21.0-1.el8 | RHSA-2023:2786 |
| Red Hat Enterprise Linux 7 | libwayland-client | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | libwayland-cursor | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | libwayland-egl | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | libwayland-server | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | wayland | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | wayland-devel | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | wayland-doc | Will not fix Will not fix | ||
| AlmaLinux 8 | libwayland-client | Fixed | 1.21.0-1.el8 | ALSA-2023:2786 |
| AlmaLinux 8 | libwayland-cursor | Fixed | 1.21.0-1.el8 | ALSA-2023:2786 |
| AlmaLinux 8 | libwayland-egl | Fixed | 1.21.0-1.el8 | ALSA-2023:2786 |
| AlmaLinux 8 | libwayland-server | Fixed | 1.21.0-1.el8 | ALSA-2023:2786 |
| AlmaLinux 8 | wayland-devel | Fixed | 1.21.0-1.el8 | ALSA-2023:2786 |
| Rocky Linux 8 | wayland | Fixed | 0:1.21.0-1.el8 | RLSA-2023:2786 |
What the vendor says
As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- wayland: affected: wayland 1.20.91
References
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.