Description
Imager versions before 1.036 for Perl exit the process reading a TGA with a colour map length of 32768 or more in tga_palette_read.
The reader unpacks the two-byte colour map length into a signed short, so a length of 32768 or more becomes negative. tga_palette_read() casts that value to size_t and asks mymalloc() for a size near SIZE_MAX. The allocation fails and Imager's allocator calls exit(3).
Reading an attacker-supplied file through Imager->read() triggers an uncatchable exit.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| — | Imager | < 1.036 | 1.036 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | libimager-perl | 1.036+dfsg-1 | — |
| Debian 13 | libimager-perl | No fix yet | — |
| Debian 12 | libimager-perl | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | libimager-perl | No fix yet | — |
| Ubuntu 26.04 LTS | libimager-perl | No fix yet | — |
| Ubuntu 24.04 LTS | libimager-perl | No fix yet | — |
| Ubuntu 22.04 LTS | libimager-perl | No fix yet | — |
| Ubuntu 20.04 LTS | libimager-perl | No fix yet | — |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | libimager-perl | No fix yet | — |
| Ubuntu 16.04 LTS | libimager-perl | No fix yet | — |