Repository navigation
Conversation
The length of the driver info block in a version 0/1 superblock was used to extend the EOA without being checked against the file's stored EOF. If a malformed file declared a block extending past the EOF, it would be loaded and pinned in the metadata cache, then left beyond the EOA after the EOA was reset to the stored EOF. For files opened read-write, closing the file would then fail to write the driver info block back, so H5Fclose() failed and the file's metadata cache was leaked, leaving the library unable to shut down cleanly. The library now validates that the block lies within the stored EOF when decoding its prefix, so such files fail to open. Resolves HDFGroup#6677
mattjala
requested review from
fortnern,
glennsong09,
hyoklee,
jhendersonHDF,
lrknox and
vchoi-hdfgroup
as code owners
September 23, 2026 15:51
Contributor
Review ChecklistThis PR touches the following areas. Each needs a sign-off
|
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Add regression coverage for version-1 superblocks, including valid and rejected extents.
Review effort: Lite
Findings: None
What changed in this PR
This PR rejects legacy driver-info blocks extending beyond the stored EOF, preventing metadata-cache leaks during close.
Changes:
- Passes stored EOF into driver-info decoding.
- Rejects out-of-bounds driver-info blocks.
- Adds regression coverage and changelog documentation.
| File | Changes |
|---|---|
test/tfile.c |
Adds malformed-file regression tests; version-1 coverage is still needed. |
src/H5Fsuper.c |
Supplies stored EOF to driver-info loading. |
src/H5Fsuper_cache.c |
Validates driver-info block bounds. |
src/H5Fpkg.h |
Extends cache callback metadata. |
release_docs/CHANGELOG.md |
Documents the fix. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
github-actions
Bot
removed request for
fortnern,
glennsong09,
hyoklee and
jhendersonHDF
September 23, 2026 16:05
lrknox
previously approved these changes
Sep 23, 2026
# Conflicts: # release_docs/CHANGELOG.md
# Conflicts: # release_docs/CHANGELOG.md
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The length of the driver info block in a version 0/1 superblock was used to extend the EOA without being checked against the file's stored EOF. If a malformed file declared a block extending past the EOF, it would be loaded and pinned in the metadata cache, then left beyond the EOA after the EOA was reset to the stored EOF.
For files opened read-write, closing the file would then fail to write the driver info block back, so H5Fclose() failed and the file's metadata cache was leaked, leaving the library unable to shut down cleanly.
The library now validates that the block lies within the stored EOF when decoding its prefix, so such files fail to open.
Resolves #6677