Changes from 3.3.2 to 3.3.3
This is a bugfix and security release fixing bounds checking issues in BloscLZ.
-
Fixed integer and pointer overflow in BloscLZ decompression bounds checks.
Inblosclz_decompress, match length accumulation in the length-extension
loop (while (code == 255)) was unbounded, allowing crafted chunks to grow
lenarbitrarily large.On 32-bit platforms (and WebAssembly
wasm32), pointer arithmeticop + len
wrapped modulo 2^32 when destination buffers were allocated high in the
virtual address space, bypassing theop + len > op_limitguard and leading
to out-of-bounds heap writes. On 64-bit platforms, an excessively large input
could similarly trigger signedint32_toverflow.This has been resolved by:
- Capping match length accumulation inside the extension loop early with
if (len > maxout) return 0;. - Converting all pointer-addition bounds checks (
op + len > op_limit, literal
copy checks, and compressor macros) into safe subtraction form
(len > op_limit - op). - Adding a regression test in
tests/test_blosclz_bounds.c.
Thanks to Lylan from QI-ANXIN Technology Research Institute for discovering
and reporting this vulnerability. - Capping match length accumulation inside the extension loop early with
There are no API or format changes in this release.