Skip to content

Conversation

bmribler
Copy link
Collaborator

@bmribler bmribler commented Oct 17, 2025

When two entries in the cache image have the same address, the library did not fail and later crashed. This occurred in the debug build of the issue #5579, CVE-2025-6269.

The cache reconstruction functions now detect duplicate addresses. When a failure occurs during the reconstruction, the cache is not clean properly. H5C__reconstruct_cache_contents now expunges any prefetched entries that were already added to the cache during the reconstruction.


Important

Fix crash by detecting and handling duplicate addresses during cache reconstruction in H5C__reconstruct_cache_contents.

  • Behavior:
    • H5C__reconstruct_cache_contents in H5Cimage.c now detects duplicate addresses using a hash table and fails gracefully if duplicates are found.
    • On failure during reconstruction, expunges prefetched entries already added to the cache.
  • Structures:
    • Adds H5C_recon_entry_t structure to track addresses and entries during reconstruction.
  • Error Handling:
    • Improved error handling in H5C__reconstruct_cache_contents to clean up partially processed entries and hash table on failure.

This description was created by Ellipsis for 9b19286. You can customize this summary. It will automatically update as commits are pushed.

When two entries in the cache image have the same address, the library
did not fail and later crashed.

The cache reconstruction functions now detect duplicate addresses.  When
a failure occurs during the reconstruction, the cache is not clean properly.
H5C__reconstruct_cache_contents now expunges any prefetched entries that
were already added to the cache during the reconstruction.
@bmribler bmribler changed the title Fix a crash when duplicate addesses occur Fix a crash when duplicate addesses occur (related to CVE-2025-6269) Oct 17, 2025

/* Only touch entries from the image reconstruction */
if (entry_ptr->type->id == H5AC_PREFETCHED_ENTRY_ID) {
/* if (!entry_ptr->is_pinned && !entry_ptr->is_protected)
Copy link
Collaborator Author

@bmribler bmribler Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fortnern I'm not sure if I need to check for pin and protect here...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To be triaged

Development

Successfully merging this pull request may close these issues.

3 participants