CVE-2021-3782

wayland: libwayland-server wl_shm reference-count overflow

Published Sep 23, 2022 CVSS 3.1 · 6.6 Medium EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2021-27046 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.
Ubuntu USN Ubuntu USN USN-5614-1 Wayland vulnerability
Ubuntu USN Ubuntu USN USN-5614-2 Wayland vulnerability
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Metrics epss

{'score': 0.00016}

epss

{'score': 0.00018}

Weaknesses

Sources

Status
PUBLISHED
Assigner
redhat
Published
Updated
May 22, 2025, 6:21 PM
Reserved
Sep 9, 2021, 12:00 AM
Status
Modified
Published
Sep 23, 2022, 4:15 PM
Modified
Jun 17, 2026, 4:05 AM
Severity
Moderate
Public date
Jul 30, 2022, 4:05 PM