Changes from 3.3.4 to 3.3.5
This is a bugfix and maintenance release addressing several robustness and
security issues reported via OSS-Fuzz in BloscLZ, ZFP codec plugins, and frame
handling.
-
Fixed integer overflow in BloscLZ match-length accumulation (heap-buffer-overflow):
Inblosclz_decompress, theMATCH_LONGdecoding loop (ctrl >> 5 == 7)
accumulated continuation bytes (0xFF) into a signed 32-bit integer (len)
without overflow protection. After ~8 MB of0xFFbytes,lencould wrap
pastINT32_MAXinto negative values, bypassing thelen > maxoutcheck and
causing a severe out-of-bounds heap write incopy_match. This is resolved
by checkinglen > maxout - codebefore the addition, rejecting invalid matches
before any overflow can occur. Reported via OSS-Fuzz (decompress_chunk_fuzzer). -
Fixed heap-buffer-overflow in ZFP decompression paths:
Inzfp_acc_decompress,zfp_prec_decompress, andzfp_rate_decompress,
a ZFP bitstream was opened on the compressed input without checking whether the
buffer was sufficiently sized for the stream reads dictated by codec parameters
and field dimensions. A crafted frame with a largecompcode_metaand a small
payload could trigger an out-of-bounds read in ZFP'sstream_read_word. Added
validation of the required bitstream size before decompression to ensure the
input buffer is large enough, returningBLOSC2_ERROR_FAILUREotherwise.
Reported via OSS-Fuzz (decompress_frame_fuzzer). -
Fixed division by zero (FPE) in
frame_get_chunkandframe_get_lazychunk:
When processing special-value chunks, a crafted frame withchunksize <= 0
caused a floating-point exception (division by zero) in thenbytes % chunksize
calculation for the last chunk. Added validation to ensurechunksize > 0before
evaluating the modulo expression, returningBLOSC2_ERROR_INVALID_HEADERon
invalid chunk sizes. Reported via OSS-Fuzz (decompress_frame_fuzzer).
There are no API or format changes in this release.