REDHAT-BUG-2522057: Buffer Overflow
A flaw was found in the file-pcx plugin in GIMP, affecting all versions on 32-bit builds only. When processing a PCX image file, the plugin calculates memory allocation sizes based on the image dimensions and the number of color planes. If a crafted file sets the number of planes to 4 alongside sufficiently large dimensions, the calculation exceeds the 32-bit integer limit and overflows, resulting in an undersized heap-based buffer allocation. This integer overflow issue results in a heap-based buffer overflow when the plugin subsequently writes image data into the undersized buffer, causing memory corruption, potentially leading to arbitrary code execution or a denial of service.
Affected Software
Event History
Frequently Asked Questions
Which systems are affected?
Only 32-bit builds of GIMP are affected. The issue is in the file-pcx plugin.
What must occur for exploitation?
The vulnerable plugin must process a crafted PCX image whose color-plane count is set to 4 and whose dimensions are sufficiently large to trigger a 32-bit integer overflow.
What could exploitation cause?
Processing the crafted image can corrupt heap memory through a buffer overflow. This could potentially result in arbitrary code execution or denial of service.