Files
xserver/render
Peter Hutterer 1173156404 render: fix refcounting of glyphs during ProcRenderAddGlyphs
Previously, AllocateGlyph would return a new glyph with refcount=0 and a
re-used glyph would end up not changing the refcount at all. The
resulting glyph_new array would thus have multiple entries pointing to
the same non-refcounted glyphs.

AddGlyph may free a glyph, resulting in a UAF when the same glyph
pointer is then later used.

Fix this by returning a refcount of 1 for a new glyph and always
incrementing the refcount for a re-used glyph, followed by dropping that
refcount back down again when we're done with it.

CVE-2024-31083, ZDI-CAN-22880

This vulnerability was discovered by:
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1463>
(cherry picked from commit bdca6c3d1f)
2024-04-03 19:37:08 +03:00
..
2010-11-01 22:54:18 -04:00
2012-03-21 13:54:42 -07:00
2018-02-26 10:02:24 -05:00
2012-03-21 13:54:42 -07:00
2012-03-21 13:54:42 -07:00
2022-01-28 10:36:28 +01:00
2016-06-17 11:21:30 +02:00