# CVE-2021-3782: An internal reference count is held on the buffer pool, incremented every time a new buffer is created from the pool.

- Severity: Medium 6.6 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.32%, higher than 26% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-09-23T15:26:59.000Z
- Modified: 2026-06-17T04:05:45.153Z
- Weaknesses: CWE-190
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- 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.

(As written by CVE List.)

## Affected

- wayland: wayland 1.20.91
- wayland wayland: before 1.20.91

## Every score

- CISA-ADP: CVSS:3.1 6.6 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H`
- NVD: CVSS:3.1 6.6 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H`

## References

- <https://gitlab.freedesktop.org/wayland/wayland/-/issues/224> (exploit, issue-tracking, patch, third-party-advisory)

## Sources

- CVE List: [CVE-2021-3782](https://www.cve.org/CVERecord?id=CVE-2021-3782), CVE Terms of Use, modified 2025-05-22
- NVD: [CVE-2021-3782](https://nvd.nist.gov/vuln/detail/CVE-2021-3782), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-3782 · Whole record: https://cve.day/CVE-2021-3782.json · Rebuilt by cve.day 2026-11-25T22:58:07.829Z
