Impact
The heifsave
operation could incorrectly determine the presence of an alpha channel in an input when it was not possible to determine the colour interpretation, known internally within libvips as "multiband". There aren't many ways to create a "multiband" input, but it is possible with a well-crafted TIFF image.
If a "multiband" TIFF input image had 4 channels and HEIF-based output was requested, this led to libvips creating a 3 channel HEIF image without an alpha channel but then attempting to write 4 channels of data. This caused a heap buffer overflow, which could crash the process.
Patches
Workarounds
A possible workaround for users of libvips prior to version 8.16.1 is to block the VipsForeignSaveHeif
operation via vips_operation_block_set
, which is available in most language bindings.
vips_operation_block_set("VipsForeignSaveHeif", TRUE);
References
Impact
The
heifsave
operation could incorrectly determine the presence of an alpha channel in an input when it was not possible to determine the colour interpretation, known internally within libvips as "multiband". There aren't many ways to create a "multiband" input, but it is possible with a well-crafted TIFF image.If a "multiband" TIFF input image had 4 channels and HEIF-based output was requested, this led to libvips creating a 3 channel HEIF image without an alpha channel but then attempting to write 4 channels of data. This caused a heap buffer overflow, which could crash the process.
Patches
Workarounds
A possible workaround for users of libvips prior to version 8.16.1 is to block the
VipsForeignSaveHeif
operation viavips_operation_block_set
, which is available in most language bindings.References