CVE-2021-3782 is a medium-severity vulnerability affecting Wayland, specifically its wl_shm buffer pool. It stems from an integer overflow in the internal reference count, which can occur on LP64 systems if a client creates a large number of buffer objects or forces the server to create many external references. This overflow can lead to a use-after-free condition on the wl_shm_pool tracking structure, potentially allowing for memory manipulation or a limited 4-byte memory leak. The vulnerability has a CVSS score of 6.6 (Medium), indicating a local attack vector with low attack complexity and low privileges required. Its potential impact includes low confidentiality and integrity, but high availability impact. Despite its potential, there is no evidence of active exploitation, nor are there any public exploit codes available in Metasploit, Nuclei, or ExploitDB. Community discussion and media coverage are also minimal, suggesting a low level of public awareness or concern.
| Vendor | Product | Version(s) | CPE |
|---|---|---|---|
< 1.20.91CPE matchmatch criteria | cpe:2.3:a:wayland:wayland:*:*:*:*:*:*:*:* |
CVSS version used by this source: 3.1
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H
The average CVE in this peer group has 0.0 Twitter, 0.0 Reddit, 0.0 Bluesky, 0.0 Mastodon, and 0.1 GitHub mentions.
No media coverage found for this CVE.
The average CVE in this peer group has 0.1 InfoSec Media, 0.0 Vendor Blog, and 0.0 Security Researcher mentions.
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.
Sep 13, 2022wayland: libwayland-server wl_shm reference-count overflow
Jul 30, 2022