Skip to content

xcursor: Fix heap overflows when parsing malicious files

Simon Ser requested to merge github/fork/emersion/xcursor-heap into master

It is possible to trigger heap overflows due to an integer overflow while parsing images.

The integer overflow occurs because the chosen limit 0x10000 for dimensions is too large for 32 bit systems, because each pixel takes 4 bytes. Properly chosen values allow an overflow which in turn will lead to less allocated memory than needed for subsequent reads.

See also:

Merge request reports