-
Notifications
You must be signed in to change notification settings - Fork 602
Upgrade hdf5 version to 1.14.6 and patch hdf5 for CVE-2025-2153, CVE-2025-2310, CVE-2025-2914, CVE-2025-2926, CVE-2025-2915, CVE-2025-6816, CVE-2025-2925, CVE-2025-2924, CVE-2025-44905,CVE-2025-6269, CVE-2025-6750, CVE-2025-6857, CVE-2025-7067, CVE-2025-7068, CVE-2025-6858, CVE_2025-2923, CVE-2025-2913, CVE-2025-6516, CVE-2025-6818, CVE-2025-6817, CVE-2025-6856, CVE-2025-7069 #15115
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
base: 3.0-dev
Are you sure you want to change the base?
Conversation
|
No significant code changes have been identified. All patches align with the upstream patches. Only minor adjustments, such as correcting indentation or removing redundant comment, may be necessary. CVE-2025-2153: SPECS/hdf5/CVE-2025-2310: CVE-2025-2914 CVE-2025-2915 CVE-2025-2924 CVE-2025-2925 CVE-2025-2926.patch and CVE-2025-2913 CVE-2025-44905 CVE-2025-6269 CVE-2025-6750 CVE-2025-6816.patch and CVE-2025-6856, CVE-2025-2923, CVE-2025-6818 CVE-2025-6857 CVE-2025-6858 CVE-2025-7067 CVE-2025-7068 |
|
|
||
| Upstream patch Reference: https://patch-diff.githubusercontent.com/raw/HDFGroup/hdf5/pull/5795.patch | ||
| --- | ||
| src/H5Ocache.c | 4 ++-- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Patch looks fine
SPECS/hdf5/CVE-2025-2310.patch
Outdated
| HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); | ||
| - if (NULL == (attr->shared->name = H5MM_strndup((const char *)p, name_len - 1))) | ||
| + | ||
| + if (NULL == (attr->shared->name = H5MM_strndup((const char *)p, name_len - 1))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is not required
| --- | ||
| src/H5Fsuper.c | 2 ++ | ||
| src/H5Ofsinfo.c | 3 +++ | ||
| 2 files changed, 5 insertions(+) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks fine
SPECS/hdf5/CVE-2025-2915.patch
Outdated
| + /* Sanity check */ | ||
| + /* Overlap size should not result in "negative" value after subtraction */ | ||
| + assert(overlap_size < accum->size); | ||
| + new_accum_size = accum->size - overlap_size; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest looks fine. Indentation
| @@ -0,0 +1,36 @@ | |||
| From 422035e1c0a30f3b363a3994e62ac46f92db9b75 Mon Sep 17 00:00:00 2001 | |||
| From: Glenn Song <[email protected]> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks fine
| static herr_t H5C__unpin_entry_from_client(H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr, bool update_rp); | ||
| static herr_t H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr); | ||
| +static herr_t H5C__discard_single_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr, | ||
| + bool destroy_entry, bool free_file_space, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation
| #ifdef H5_HAVE_PARALLEL | ||
| @@ -753,118 +756,13 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) | ||
| * Now discard the entry if appropriate. | ||
| */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rest looks fine
|
|
||
| memset(&state, 0, sizeof(H5FS_stat_t)); | ||
| @@ -4334,7 +4334,7 @@ test_mf_align_fs(const char *driver_name, hid_t fapl, hid_t new_fapl) | ||
| sect_node = H5MF__sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE700); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks fine
| --- a/src/H5Ocont.c | ||
| +++ b/src/H5Ocont.c | ||
| @@ -104,6 +104,9 @@ H5O__cont_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE | ||
| HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
SPECS/hdf5/CVE-2025-6857.patch
Outdated
|
|
||
| if (bt->level > 0) { | ||
| - if ((ret_value = H5B_find(f, type, bt->child[idx], found, udata)) < 0) | ||
| + /* Sanity check to catch the case where the current node points to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation
SPECS/hdf5/CVE-2025-6857.patch
Outdated
| Add additional checks for v1 B-tree corruption | ||
| Upstream Patch Reference :https://patch-diff.githubusercontent.com/raw/HDFGroup/hdf5/pull/5799.patch | ||
| --- | ||
| src/H5B.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++-- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine
SPECS/hdf5/CVE-2025-6816.patch
Outdated
| - size_t chkcnt = oh->nchunks; /* Count of chunks (for sanity checking) */ | ||
| -#endif /* NDEBUG */ | ||
| - | ||
| - /* Bring the chunk into the cache */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not part of the patch, causing indentation
SPECS/hdf5/CVE-2025-6816.patch
Outdated
| - assert(chk_proxy->chunkno == chkcnt); | ||
| - assert(oh->nchunks == (chkcnt + 1)); | ||
| + | ||
| + chunkno = chk_proxy->chunkno; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please fix indentation at all the places
SPECS/hdf5/CVE-2025-6816.patch
Outdated
| H5AC__NO_FLAGS_SET) < 0) | ||
| HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, NULL, "unable to release object header chunk"); | ||
|
|
||
| - /* Advance to next continuation message */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not part of the patch
SPECS/hdf5/CVE-2025-6816.patch
Outdated
|
|
||
| - /* Advance to next continuation message */ | ||
| + if (chunkno != chkcnt) | ||
| + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "incorrect chunk number for object header chunk"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation
SPECS/hdf5/CVE-2025-6816.patch
Outdated
| + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, | ||
| + "incorrect number of chunks after deserializing object header chunk"); | ||
| + | ||
| + /* Advance to next continuation message */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation
| From b6d4a76c7a9309eba6e70fde0e1ecf0dd09d3d23 Mon Sep 17 00:00:00 2001 | ||
| From: Jordan Henderson <[email protected]> | ||
| Date: Mon, 15 Sep 2025 12:26:10 -0500 | ||
| Subject: [PATCH] Fix issue with handling of corrupted object header |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rest looks fine
SPECS/hdf5/CVE-2025-6750.patch
Outdated
| if (mesg_size != H5O_ALIGN_OH(oh, mesg_size)) | ||
| HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "message not aligned"); | ||
|
|
||
| - /* Message flags */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not part of the patch
SPECS/hdf5/CVE-2025-6750.patch
Outdated
| + if (H5_IS_BUFFER_OVERFLOW(chunk_image, mesg_size, p_end)) | ||
| + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "message size exceeds buffer end"); | ||
| + | ||
| + /* Message flags */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation
SPECS/hdf5/CVE-2025-6750.patch
Outdated
| HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't decode refcount"); | ||
| oh->nlink = *refcount; | ||
| } | ||
| + /* Check if message is an old mtime message */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation
SPECS/hdf5/CVE-2025-44905.patch
Outdated
| unsigned minval_size = 0; | ||
|
|
||
| minbits = 0; | ||
| + if (H5_IS_BUFFER_OVERFLOW((unsigned char *)*buf, 5, (unsigned char *)*buf + *buf_size - 1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation
SPECS/hdf5/CVE-2025-44905.patch
Outdated
| minval_size = sizeof(unsigned long long) <= ((unsigned char *)*buf)[4] ? sizeof(unsigned long long) | ||
| : ((unsigned char *)*buf)[4]; | ||
| minval = 0; | ||
| + if (H5_IS_BUFFER_OVERFLOW((unsigned char *)*buf, 5 + minval_size, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here as well
| From b36c123a68f9f67f5a6de07fcd9caaf8586289c8 Mon Sep 17 00:00:00 2001 | ||
| From: Binh-Minh <[email protected]> | ||
| Date: Tue, 16 Sep 2025 11:57:03 -0400 | ||
| Subject: [PATCH 1/7] Fix CVE-2025-2926, CVE-2025-2913 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks fine
SPECS/hdf5/CVE-2025-2925.patch
Outdated
| */ | ||
| do { | ||
| if (actual_len != len) { | ||
| + /* Verify that the length isn't a bad value */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation
SPECS/hdf5/CVE-2025-2925.patch
Outdated
| + if (actual_len == 0) | ||
| + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "actual_len is a bad value"); | ||
| + | ||
| + /* Expand buffer to new size */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation
|
Regarding Pipelines - Run PR-15115+hdf5+unknown artifacts I am seeing below test failure, even though overall test passes, was it failing earlier as well. Had requested to check with the latest hdf5_2.0.0 and verify as they have all the CVE changes if these are not caused due to some issue with our patching. It seems that that failure would be there due to the changes made in the CVE patch. |
I have tried building hdf5-2.0.0 source code locally, I found some test fails but still results show 100% test passed.
|
Comment out overflow checks for address and size in H5O__mdci_decode function. These checks are causing many test failures. The CVE specifically asks for `HDF5__accum_free` function.
Refactor error handling for parent and non-parent entries in CVE-2025-6269 patch.
|
The test failures were actually correct, but we were ignoring make return value in spec file hence it looked like the test was succeeded but they were failing actually with the patches. Removed two checks, the updated buddy build. |
So, we are little bit deviating from the upstream patch, since the function in question for CVE-2025-2915 is only H5F__accum_free(). And by commenting the changes in H5O__mdci_decode(), the tests are passing. In future it will be better if we are in sync with the upstream and hopefully, they will be fixing the test failures due to the code H5O__mdci_decode(). Thanks |





Merge Checklist
All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)
*-staticsubpackages, etc.) have had theirReleasetag incremented../cgmanifest.json,./toolkit/scripts/toolchain/cgmanifest.json,.github/workflows/cgmanifest.json)./LICENSES-AND-NOTICES/SPECS/data/licenses.json,./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md,./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)*.signatures.jsonfilessudo make go-tidy-allandsudo make go-test-coveragepassSummary
Upgrade hdf5 version to 1.14.6 and patch hdf5 for CVE-2025-2153, CVE-2025-2310, CVE-2025-2914, CVE-2025-2926, CVE-2025-2915, CVE-2025-6816, CVE-2025-2925, CVE-2025-2924, CVE-2025-44905,CVE-2025-6269, CVE-2025-6750, CVE-2025-6857, CVE-2025-7067, CVE-2025-7068, CVE-2025-6858, CVE_2025-2923, CVE-2025-2913, CVE-2025-6516, CVE-2025-6818, CVE-2025-6817, CVE-2025-6856, CVE-2025-7069
CVE-2025-2153: https://patch-diff.githubusercontent.com/raw/HDFGroup/hdf5/pull/5795.patch
CVE-2025-2310: https://patch-diff.githubusercontent.com/raw/HDFGroup/hdf5/pull/5872.patch
CVE-2025-2914: https://patch-diff.githubusercontent.com/raw/HDFGroup/hdf5/pull/5722.patch
CVE-2025-2915: https://patch-diff.githubusercontent.com/raw/HDFGroup/hdf5/pull/5746.patch
CVE-2025-2924: https://patch-diff.githubusercontent.com/raw/HDFGroup/hdf5/pull/5814.patch
CVE-2025-2925: https://patch-diff.githubusercontent.com/raw/HDFGroup/hdf5/pull/5739.patch
CVE-2025-2926: https://patch-diff.githubusercontent.com/raw/HDFGroup/hdf5/pull/5841.patch
CVE-2025-44905: https://patch-diff.githubusercontent.com/raw/HDFGroup/hdf5/pull/5915.patch
CVE-2025-6269: https://patch-diff.githubusercontent.com/raw/HDFGroup/hdf5/pull/5850.patch
CVE-2025-6750: https://patch-diff.githubusercontent.com/raw/HDFGroup/hdf5/pull/5856.patch
CVE-2025-6816, CVE-2025-6856, CVE-2025-2923, CVE-2025-6818: https://patch-diff.githubusercontent.com/raw/HDFGroup/hdf5/pull/5829.patch
CVE-2025-6857: https://patch-diff.githubusercontent.com/raw/HDFGroup/hdf5/pull/5799.patch
CVE-2025-6858: https://patch-diff.githubusercontent.com/raw/HDFGroup/hdf5/pull/5710.patch
CVE-2025-7067: https://patch-diff.githubusercontent.com/raw/HDFGroup/hdf5/pull/5815.patch
https://patch-diff.githubusercontent.com/raw/HDFGroup/hdf5/pull/5938.patch
CVE-2025-7068: https://patch-diff.githubusercontent.com/raw/HDFGroup/hdf5/pull/5817.patch
Change Log
Does this affect the toolchain?
YES/NO
Associated issues
Links to CVEs
Test Methodology