Description
libsixel before 1.8.7-r1 and 1.9.0 through 1.10.5 contains a heap out-of-bounds write vulnerability in gif_init_frame() in src/fromgif.c, which never checks the GIF transparent color index against the palette size. Attackers can supply a crafted GIF with a small color table and large transparent index, processed with a background color set, to write bytes past the palette buffer, causing heap corruption or crashes.
Affected products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
saitoha libsixel
Default version status: unaffected
0 to < 1.8.7-r1affected1.9.0 to ≤ 1.10.5affected
pkg:github/saitoha/libsixelReferences
- https://github.com/saitoha/libsixel/issues/220 ↗
- https://github.com/saitoha/libsixel/commit/bdbab09816eb9188429c37a50b97c5e66dfe5047 ↗
- https://github.com/saitoha/libsixel/releases/tag/v1.8.7-r1 ↗
- https://github.com/saitoha/libsixel/blob/v1.8.7/src/fromgif.c#L182-L248 ↗
- https://github.com/libsixel/libsixel/blob/v1.10.5/src/fromgif.c#L219-L240 ↗
- https://hackmd.io/@haind-pwn/libsixel-gif-transparent-index-oob-write ↗
- https://www.vulncheck.com/advisories/libsixel-before-1.8.7-r1-and-1.9.0-through-1.10.5-heap-out-of-bounds-write-via-gif ↗