Validate metadata cache load sizes before allocation#6506
Open
Alb3e3 wants to merge 3 commits into
Open
Conversation
Contributor
Author
|
Pushed a follow-up for the CI failures. The first issue was formatting in The update keeps the non-SWMR metadata size checks in place, removes the too-early continuation-message EOA check, and skips this cache-entry EOA validation only for Local verification:
|
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.
Describe your changes
This hardens malformed-file handling for metadata cache entry loads:
ohdrregression that creates an object header continuation chunk, corrupts the encoded continuation size on disk, and verifies the malformed object header is rejected before the cache allocates that size.This prevents malformed metadata from driving very large allocations before the later file-read/EOA checks run.
AI assistance disclosure: this patch was prepared with assistance from OpenAI Codex. I reviewed the changes and ran the verification below locally.
Issue ticket number (GitHub or JIRA)
N/A
Checklist before requesting a review
Local verification
git diff --check origin/develop..HEADcmake --build build-asan-o0 --target ohdr h5dump -j$(nproc)ASAN_OPTIONS=detect_leaks=0:allocator_may_return_null=0:abort_on_error=1 timeout 180s build-asan-o0/bin/ohdrbuild-asan-o0/bin/h5dump -H test/testfiles/tmtimeo.h5