Bug 2002627 (CVE-2021-3782) - CVE-2021-3782 wayland: libwayland-server wl_shm reference-count overflow
Summary: CVE-2021-3782 wayland: libwayland-server wl_shm reference-count overflow
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2021-3782
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2122577 2122578 2122579 2122580
Blocks: 2002623 2003999
TreeView+ depends on / blocked
 
Reported: 2021-09-09 11:46 UTC by Dhananjay Arunesh
Modified: 2023-05-16 18:32 UTC (History)
4 users (show)

Fixed In Version: wayland 1.20.91
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-16 18:32:38 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2023:2786 0 None None None 2023-05-16 08:12:34 UTC

Description Dhananjay Arunesh 2021-09-09 11:46:36 UTC
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.

Comment 2 Huzaifa S. Sidhpurwala 2022-08-30 10:33:48 UTC
Upstream bug: https://gitlab.freedesktop.org/wayland/wayland/-/issues/224

Comment 3 Huzaifa S. Sidhpurwala 2022-08-30 10:36:43 UTC
Created wayland tracking bugs for this issue:

Affects: fedora-all [bug 2122577]

Comment 5 errata-xmlrpc 2023-05-16 08:12:32 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2023:2786 https://access.redhat.com/errata/RHSA-2023:2786

Comment 6 Product Security DevOps Team 2023-05-16 18:32:36 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2021-3782


Note You need to log in before you can comment on or make changes to this bug.