libraw: lack of thumbnail size range check can lead to buffer overflow (CVE-2020-15503)
LibRaw before 0.20-RC1 lacks a thumbnail size range check. This affects decoders/unpack_thumb.cpp, postprocessing/mem_image.cpp, and utils/thumb_utils.cpp. For example, malloc(sizeof(libraw_processed_image_t)+T.tlength) occurs without validating T.tlength.
References:
- https://nvd.nist.gov/vuln/detail/CVE-2020-15503
- https://security-tracker.debian.org/tracker/CVE-2020-15503
Patch:
https://github.com/LibRaw/LibRaw/commit/20ad21c0d87ca80217aee47533d91e633ce1864d