bep/imagemeta - это библиотека Go для чтения метаданных изображений EXIF, IPTC и XMP из файлов JPEG, TIFF, PNG и WebP. До 0.17.3 imagemeta.Decode могла исчерпать память при анализе кусков PNG zTXt, ключевым словом которых является «Raw profile type iptc»: заявленная длина куска может управлять выделением намного больше, чем входной файл, а встроенный поток zlib распаковывается без предела выхода. В отчете сообщается, что 42-байтный входной сигнал вызывает выделение 256 MB и 127 KB, увеличиваясь до 460 MB.
Эффект негабаритного распределения зависит от чрезмерной приверженности платформы и настраиваемых ограничений GOMEMLIMIT или cgroup, в то время как путь декомпрессии надежно создает резидентную память. Поэтому приложения, которые декодируют ненадежный PNGs с обработкой метаданных IPTC, могут страдать от отказа в обслуживании из-за истощения памяти. Эта проблема исправлена в 0.17.3.
Показать оригинальное описание (EN)
bep/imagemeta is a Go library for reading EXIF, IPTC and XMP image meta data from JPEG, TIFF, PNG, and WebP files. Prior to 0.17.3, imagemeta.Decode could exhaust memory when parsing PNG zTXt chunks whose keyword is "Raw profile type iptc": the declared chunk length can drive an allocation far larger than the input file, and the embedded zlib stream is decompressed without an output limit. The advisory reports a 42-byte input causing a 256 MB allocation and a 127 KB input inflating to 460 MB. The oversized-allocation path's memory effect depends on platform overcommit and configured GOMEMLIMIT or cgroup limits, while the decompression path reliably creates resident memory. Applications that decode untrusted PNGs with IPTC metadata processing can therefore suffer denial of service through memory exhaustion. This issue is fixed in 0.17.3.
Характеристики атаки
Последствия
Строка CVSS v4.0