Open gabe-sherman opened 7 months ago
I did not see the heap-buffer-overflow, only a small memory leaks:
HDF5-DIAG: Error detected in HDF5 (1.15.0):
major: Datatype
minor: Unable to decode value
major: Datatype
minor: Unable to decode value
major: Object header
minor: Unable to decode value
major: Object header
minor: Unable to decode value
major: Datatype
minor: Unable to decode value
major: Datatype
minor: Unable to load metadata into cache
================================================================= ==492430==ERROR: LeakSanitizer: detected memory leaks
After I added free(v0), the memory leaks were gone too. Please advise.
H5Tdecode()
doesn't take a parameter specifying the size of the buffer, so it's not possible for the library to do normal bounds checking on it - instead, bounds checking has to be skipped (see H5_IS_KNOWN_BUFFER_OVERFLOW
).
I'm not sure there is a solution for 'user passes a malformed buffer to H5Tdecode()
' short of deprecating it in favor of a new H5Tdecode2()
which take the parameters necessary to do real bounds checking.
H5Tdecode()
doesn't take a parameter specifying the size of the buffer, so it's not possible for the library to do normal bounds checking on it - instead, bounds checking has to be skipped (seeH5_IS_KNOWN_BUFFER_OVERFLOW
).I'm not sure there is a solution for 'user passes a malformed buffer to
H5Tdecode()
' short of deprecating it in favor of a newH5Tdecode2()
which take the parameters necessary to do real bounds checking.
We should create an issue for 2.0.0 to update the API call to take a buffer size.
H5Tdecode()
doesn't take a parameter specifying the size of the buffer, so it's not possible for the library to do normal bounds checking on it - instead, bounds checking has to be skipped (seeH5_IS_KNOWN_BUFFER_OVERFLOW
). I'm not sure there is a solution for 'user passes a malformed buffer toH5Tdecode()
' short of deprecating it in favor of a newH5Tdecode2()
which take the parameters necessary to do real bounds checking.We should create an issue for 2.0.0 to update the API call to take a buffer size.
If H5Tdecode() is going to be deprecated, should this issue be closed?
A heap-buffer-overflow occurs in the below program. This behavior occurs at line 149 in H5Odtype.c.
How to trigger
./filename
Test Environment
Ubuntu 22.04, 64bit
Version
Latest: 0394b03f66dc45fe96e2c772b7bce293e4316ad2
Address Sanitizer Output