Fix scale-offset filter errors (#5864)

A security fix from 1.14.6 introduced a regression in the scale-offset
filter where normal data values could cause the library to emit an
error (not a crash/segfault).

Fixes GitHub #5861
This commit is contained in:
Dana Robinson
2025-09-24 20:16:40 -05:00
committed by GitHub
parent ad82570cfe
commit 562a2e2d0c
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -495,6 +495,12 @@ Simple example programs showing how to use complex number datatypes have been ad
## Library
### Fixed a problem with the scale-offset filter
A security fix added to 1.14.6 introduced a regression where certain data values could trigger a library error (not a crash or segfault).
Fixes GitHub issue #5861
### Fixed security issue CVE-2025-6857
An HDF5 file had a corrupted v1 B-tree that would result in a stack overflow when performing a lookup on it. This has been fixed with additional integrity checks.
+1 -1
View File
@@ -1211,7 +1211,7 @@ H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_valu
minbits_mask <<= i * 8;
minbits |= minbits_mask;
}
if (minbits >= p.size * 8)
if (minbits > p.size * 8)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "minimum number of bits exceeds size of type");
/* retrieval of minval takes into consideration situation where sizeof