-
-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CVE-2021-37501] buffer overflow in h5dump #2458
Comments
…roup#2459) A bogus hdf5 file may contain dataspace messages with sizes which lead to the on-disk data sizes to exceed what is addressable. When calculating the size, make sure, the multiplication does not overflow. The test case was crafted in a way that the overflow caused the size to be 0. This fixes CVE-2021-37501 / Bug HDFGroup#2458. Signed-off-by: Egbert Eich <[email protected]>
…roup#2459) A bogus hdf5 file may contain dataspace messages with sizes which lead to the on-disk data sizes to exceed what is addressable. When calculating the size, make sure, the multiplication does not overflow. The test case was crafted in a way that the overflow caused the size to be 0. This fixes CVE-2021-37501 / Bug HDFGroup#2458. Signed-off-by: Egbert Eich <[email protected]>
…roup#2458) A bogus hdf5 file may contain dataspace messages with sizes which lead to the on-disk data sizes to exceed what is addressable. When calculating the size, make sure, the multiplication does not overflow. The test case was crafted in a way that the overflow caused the size to be 0. This fixes CVE-2021-37501 / Bug HDFGroup#2458. Signed-off-by: Egbert Eich <[email protected]>
…roup#2456) A bogus hdf5 file may contain dataspace messages with sizes which lead to the on-disk data sizes to exceed what is addressable. When calculating the size, make sure, the multiplication does not overflow. The test case was crafted in a way that the overflow caused the size to be 0. This fixes CVE-2021-37501 / Bug HDFGroup#2458. Signed-off-by: Egbert Eich <[email protected]>
https://build.opensuse.org/request/show/1066251 by user eeich + dimstar_suse - Fix CVE-2021-37501 - overflow in calculation of data buffer due to bogus input file (bsc#1207973). HDFGroup/hdf5#2458 HDFGroup/hdf5#2459 Check-for-overflow-when-calculating-on-disk-attribute-data-size-2459.patch Remove-duplicate-code.patch (forwarded request 1066178 from eeich)
…roup#2459) A bogus hdf5 file may contain dataspace messages with sizes which lead to the on-disk data sizes to exceed what is addressable. When calculating the size, make sure, the multiplication hasn't overflown. The test case was crafted in a way that the overflow caused the size to be 0. This fixes CVE-2021-37501 / Bug HDFGroup#2458. Signed-off-by: Egbert Eich <[email protected]> Co-authored-by: Allen Byrne <[email protected]>
…roup#2459) A bogus hdf5 file may contain dataspace messages with sizes which lead to the on-disk data sizes to exceed what is addressable. When calculating the size, make sure, the multiplication hasn't overflown. The test case was crafted in a way that the overflow caused the size to be 0. This fixes CVE-2021-37501 / Bug HDFGroup#2458. Signed-off-by: Egbert Eich <[email protected]> Co-authored-by: Allen Byrne <[email protected]>
…roup#2459) A bogus hdf5 file may contain dataspace messages with sizes which lead to the on-disk data sizes to exceed what is addressable. When calculating the size, make sure, the multiplication hasn't overflown. The test case was crafted in a way that the overflow caused the size to be 0. This fixes CVE-2021-37501 / Bug HDFGroup#2458. Signed-off-by: Egbert Eich <[email protected]> Co-authored-by: Allen Byrne <[email protected]>
Does the version 1.8.21 have the CVE-2021-37501 issue? Thanks! |
Unfortunately, we no longer support HDF5 1.8 |
Could you help hint if the CVE-2021-37501 issue exist in hdf5 1.8.21 or not? Thanks! |
@Mingli-Yu, yes, this CVE issue exists in the 1.8.21 release, as well as 1.8.22 and 1.8.23. |
The reproducer file can be found here |
Describe the bug
CVE-2021-37501 (GHSA-rfgw-5vq3-wrjf) describes a buffer overflow in h5dump, a reproducer and description for this can be found in
https://github.com/ST4RF4LL/Something_Found.
The root cause is an artificially large size of a dimension in a dataspace message which causes the size of the on-disk data to exceed the addressable range and thus causes a multiplication to overflow.
In
src/H5Oattr.c:H5O__attr_decode()
withds_size
being set to 4611686018427387904 (0x4000000000000000) anddt_size
equal to 8, the multiplication in:overflows and is truncated to 0.
Since there is no provision to detect the overflow, the size is underestimated which will finally lead to a heap buffer overflow when the data is read with a subsequent segfault.
Expected behavior
The size overflow should be detected and the respective decode function should report an error so that the caller will terminate gracefully.
Platform
configure --enable-fortran --enable-unsupported --enable-hl --enable-shared --enable-threadsafe --enable-build-mode=production --enable-cxx --with-pthread
The text was updated successfully, but these errors were encountered: