REDHAT-BUG-2496165: Buffer Overflow
glamorfontget() builds a per-font texture atlas by laying out every glyph in the font into a single backing buffer. It computes the slot dimensions from the font's declared maxbounds, but copies each per-glyph bitmap using the individual glyph's metrics (GLYPHHEIGHTPIXELS/GLYPHWIDTHBYTES macros). There is no check that maxbounds actually bounds the per-glyph values.
When the font is loaded from a malicious PCF file whose per-glyph metrics exceed the file's maxbounds, the per-glyph memcpy writes far beyond the heap-allocated slot, producing a heap buffer overflow with attacker-controlled extent and attacker-controlled content.
An authenticated X client can trigger this by using SetFontPath to add a directory containing a crafted PCF font, loading the font with OpenFont, and drawing text on a glamor-backed drawable. Only servers using the glamor acceleration backend (Xorg with modesetting driver, Xwayland) are affected.
Affected Software
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-2496165?
The severity of REDHAT-BUG-2496165 is classified as high with a score of 7.
What is the risk associated with REDHAT-BUG-2496165?
The risk associated with REDHAT-BUG-2496165 is rated at 33.
What vulnerability type is identified in REDHAT-BUG-2496165?
REDHAT-BUG-2496165 involves a buffer overflow vulnerability.
How do I fix REDHAT-BUG-2496165?
To fix REDHAT-BUG-2496165, it is recommended to apply the latest patches provided by the X.Org Foundation or relevant dependencies.
Which software is affected by REDHAT-BUG-2496165?
The affected software includes X.Org Foundation Xorg Server with glamor acceleration backend and freedesktop.org Xwayland.