Description
FreeImage (danoli3 fork) through 3.19.23 contains a heap out-of-bounds read vulnerability in Unpack32Bits() in PluginPICT.cpp because rowBytes is never checked against the file-controlled PixMap width. Attackers can supply a crafted PICT file with a truncated or undersized rowBytes to over-read up to 64 KiB of heap, leaking memory into decoded pixels or crashing the process.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| danoli3 | FreeImage | ≤ 3.19.23 | — |
| FreeImage | FreeImage | ≤ 3.18.0 | — |
References
- https://hackmd.io/@haind-pwn/freeimage-pict-unpack32bits-plane-conversion-oob-read technical-description exploit
- https://github.com/danoli3/FreeImage/blob/cc2bfc1b67d3a10e2c203c56932b09ffb52a4477/Source/FreeImage/PluginPICT.cpp#L605-L650 technical-description
- https://github.com/danoli3/FreeImage product
- VulnCheck Advisory: FreeImage through 3.19.23 Heap Out-of-Bounds Read via PICT Unpack32Bits third-party-advisory