[PATCH 01/02] wmaker: fix integer overflow in _NET_WM_ICON parser
2 views
Skip to first unread message
david.m...@gmail.com
unread,
May 10, 2026, 11:31:43 PM (9 days ago) May 10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Window Maker Development
findBestIcon() multiplies two attacker-controlled 32-bit ints (icon width * height) without overflow checking. A client setting _NET_WM_ICON = {2, 0x7FFFFFFF} makes "size" wrap to 0 so "i += size" never advances and wmaker spins forever at 100% CPU.
The same loop also never verifies that the claimed icon actually fits inside the property buffer, allowing a 2-element property to drive a multi-KB OOB read in makeRImageFromARGBData().
Validate dimensions against a 4096-pixel cap (safe from unsigned long overflow) and reject icons whose pixel data would extend past the end of the property.