-
-
Notifications
You must be signed in to change notification settings - Fork 270
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-2018-17439, HDFFV-10589] Stack buffer overflow in H5O_dtype_decode_helper() #2226
Labels
Component - C Library
Core C library issues (usually in the src directory)
Priority - 1. High 🔼
These are important issues that should be resolved in the next release
Type - Bug / Bugfix
Please report security issues to [email protected] instead of creating an issue on GitHub
Comments
e4t
added a commit
to e4t/hdf5
that referenced
this issue
Nov 7, 2022
… size Malformed hdf5 files may provide more dimensions than the array dim[] is able to hold. Check number of elements first by calling H5Sget_simple_extent_dims() with NULL for both 'dims' and 'maxdims' arguments. This will cause the function to return only the number of dimensions. This fixes CVE-2018-17439 / HDFFV-10589 / Bug HDFGroup#2226. Signed-off-by: Egbert Eich <[email protected]>
e4t
added a commit
to e4t/hdf5
that referenced
this issue
Nov 10, 2022
Malformed hdf5 files may provide more dimensions than the array dim[] in H5IMget_image_info() is able to hold. Check number of elements first by calling H5Sget_simple_extent_dims() with NULL for both 'dims' and 'maxdims' arguments. This will cause the function to return only the number of dimensions. The fix addresse a stack overflow on write. This fixes CVE-2018-17439 / HDFFV-10589 / Bug HDFGroup#2226. Signed-off-by: Egbert Eich <[email protected]>
e4t
added a commit
to e4t/hdf5
that referenced
this issue
Nov 10, 2022
Malformed hdf5 files may provide more dimensions than the array dim[] in H5IMget_image_info() is able to hold. Check number of elements first by calling H5Sget_simple_extent_dims() with NULL for both 'dims' and 'maxdims' arguments. This will cause the function to return only the number of dimensions. The fix addresse a stack overflow on write. This fixes CVE-2018-17439 / HDFFV-10589 / Bug HDFGroup#2226. Signed-off-by: Egbert Eich <[email protected]>
lrknox
pushed a commit
that referenced
this issue
Nov 11, 2022
Malformed hdf5 files may provide more dimensions than the array dim[] in H5IMget_image_info() is able to hold. Check number of elements first by calling H5Sget_simple_extent_dims() with NULL for both 'dims' and 'maxdims' arguments. This will cause the function to return only the number of dimensions. The fix addresse a stack overflow on write. This fixes CVE-2018-17439 / HDFFV-10589 / Bug #2226. Signed-off-by: Egbert Eich <[email protected]> Signed-off-by: Egbert Eich <[email protected]>
derobins
changed the title
[BUG,CVE-2018-17439, HDFFV-10589] Stack buffer overflow in H5O_dtype_decode_helper()
[CVE-2018-17439, HDFFV-10589] Stack buffer overflow in H5O_dtype_decode_helper()
May 4, 2023
derobins
added
Priority - 1. High 🔼
These are important issues that should be resolved in the next release
Component - C Library
Core C library issues (usually in the src directory)
Type - Bug / Bugfix
Please report security issues to [email protected] instead of creating an issue on GitHub
labels
May 4, 2023
Definitely fixed in 1.14.3, 1.12.3, and 1.10.11. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Component - C Library
Core C library issues (usually in the src directory)
Priority - 1. High 🔼
These are important issues that should be resolved in the next release
Type - Bug / Bugfix
Please report security issues to [email protected] instead of creating an issue on GitHub
Description
A malformed hdf5 file may cause a stack overflow in H5IMget_image_info() if the rank of the data space exceeds the array size allocated on the stack:
With:
This is somewhat critical on systems with stacks growing downwards as the return address will be located above the base address of the array and thus is reachable by an out-of-bounds array index. This way, the return address can be manipulated which may open the door to arbitrary code execution.
Luckily, the fix is simple as a call to
H5Sget_simple_extent_dims()
with NULL arguments will simply return the rank which can then be checked against the array size.On later versions of HDF5 (including 1.10.8) the reproducer of CVE-2018-17439 no longer triggers: it contains a dataspace rank that doesn't match its buffer size. Due to the fix for CVE-2018-14460
H5IMget_image_info()
bails inH5Dopen2()
already. AFAICT these issues are independent of each other: an image dataspace with rank > IMAGE24_RANK but the correct buffer size would not trigger the detection added for CVE-2018-14460 and be vulnerable to this exploit.Platform
The text was updated successfully, but these errors were encountered: