fs_read_glyphs() heap OOB read/write via encoding array index mismatch in libXfont2
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in 2.0.3-150000.3.6.1, 2.0.7-160000.5.1, 2.0.3-3.6.1 and 4 more.
fs_read_glyphs() in the libXfont2 font-server client (src/fc/fserve.c) indexes the per-character encoding[] array using num_chars from the FS_QueryXBitmaps16 reply, but that array was allocated with a size derived from num_extents in the separate FS_QueryXExtents16 reply. The two CARD32 fields are never cross-checked. A malicious or compromised font server can send a small num_extents (e.g. 1) in the extents reply, then a large num_chars (e.g. 100000) in the bitmaps reply. This causes attacker-controlled out-of-bounds heap read and writes.
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| SUSE | >=? <2.0.3-150000.3.6.1, >=? <2.0.7-160000.5.1, >=? <2.0.3-3.6.1, >=? <2.0.7-3.1, >=? <2.0.6-5.el10_2.3, >=? <2.0.3-2.el8_10.3, >=? <2.0.3-12.el9_8.3 | 2.0.3-150000.3.6.1, 2.0.7-160000.5.1, 2.0.3-3.6.1, 2.0.7-3.1, 2.0.6-5.el10_2.3, 2.0.3-2.el8_10.3, 2.0.3-12.el9_8.3 | |
| libXfont2 | >=? <=2.0.8 |
Timeline
Every event on this vulnerability
Embed
A live severity badge for an advisory, README or ticket