image/tiff
John Wright 3bbf4a659e tiff: Validate palette indices when parsing palette-color images
The existing implementation will succeed to parse a corrupt or malicious
image with color indices out of range of the actual palette, which will
eventually result in a panic when the consumer tries to read the color
at any corrupted pixel.

This issue was originally discovered and filed against a downstream
library: https://github.com/disintegration/imaging/issues/165. This is
also referenced in https://osv.dev/vulnerability/GHSA-q7pp-wcgr-pffx.

Fixes golang/go#67624

Change-Id: I7d7577adb7d549ecfcd59e84e04a92d198d94c18
Reviewed-on: https://go-review.googlesource.com/c/image/+/588115
Auto-Submit: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
2024-06-18 20:19:45 +00:00
..
lzw tiff, tiff/lzw, vector: use single space in comments 2023-02-17 19:05:04 +00:00
buffer.go go.image/tiff: optimize reading uncompressed files from a tiff.buffer. 2012-02-21 11:25:19 +11:00
buffer_test.go go.image: initial code. 2012-01-31 11:32:50 +11:00
compress.go go.image/tiff: remove unreachable code. 2014-06-30 11:43:54 +10:00
consts.go tiff: Add support for CCITT group 3/4 compression 2019-06-22 00:34:08 +00:00
fuzz.go go.mod: update go directive to 1.18 2023-09-08 23:15:45 +00:00
reader.go tiff: Validate palette indices when parsing palette-color images 2024-06-18 20:19:45 +00:00
reader_test.go tiff: Validate palette indices when parsing palette-color images 2024-06-18 20:19:45 +00:00
writer.go tiff, tiff/lzw, vector: use single space in comments 2023-02-17 19:05:04 +00:00
writer_test.go tiff: do not crash when encoding with unsupported compression 2022-03-21 03:14:19 +00:00