Commit Graph
24189 Commits
Author SHA1 Message Date
jhendersonHDF 7dd110251d Fix issue with handling of failure during discard of metadata cache entries (#5817)
When discarding a metadata cache entry after flushing it, errors
during the discard process could cause the library to skip calling
the 'free_icr' callback for the entry. This could result in resource
leaks and the inability of the cache to be fully flushed and closed
due to issues such as pinned entries remaining in the cache. This
has been fixed by noting errors during the discard process, but
attempting to fully free a cache entry before signalling that an
error has occurred.

Fixes CVE-2025-7068
2025-10-16 16:37:02 -05:00
H. Joe Lee 92ca55cb3b Update nvhpc.yml to NVHPC 25.9 and CUDA 13.0 (#5918)
- Update NVHPC version from 25.7 to 25.9
- Update CUDA version from 12.9 to 13.0
- Update MPI paths from openmpi4/bin to hpcx/bin
This aligns with the latest NVHPC SDK distribution which uses hpcx for MPI libraries.
* Set UCX_WARN_UNUSED_ENV_VARS to 'n' in workflow
Closes #5917
2025-10-16 08:46:39 -05:00
Matt L 21aaab4885 Close resources in h5dumpgentest properly (#5913)
Ensure proper closure of resources in gent_array1_big, gent_nested_compound_dt, and gent_intscalars in h5dumpgentest.c.
Add error handling and cleanup logic to prevent resource leaks.
2025-10-16 08:43:41 -05:00
Matt L d17773e209 Disable szip/deflate VOL tests when those files can't be generated (#5909) 2025-10-16 08:34:29 -05:00
Erik Schnetter 2ff6c6497c Update HDF5UseFortran.cmake (#5920)
Remove extraneous curly braces from log output
2025-10-15 15:28:15 -05:00
bmribler 09e3cfe652 Add buffer overflow detection (#5884)
Add buffer overflow checks to H5C__decode_cache_image_header() in H5Cimage.c for security hardening.

Security Hardening:
Add buffer overflow checks in H5C__decode_cache_image_header() in H5Cimage.c.
Use H5_IS_BUFFER_OVERFLOW() to verify buffer space before accessing elements.
Checks added for signature, version, flags, image data length, and number of entries.
Misc:
Adjust H5C__reconstruct_cache_contents() to use updated buffer handling logic.
2025-10-15 09:36:35 -05:00
Larry Knox 849de4ec05 Increment subversion to -4 after snapshot release 2.0.0-3. (#5916) 2025-10-14 22:30:05 -05:00
Scot Breitenfeld 5047b30ff6 Fortran changes to adhere to the filename/module convention (#5914)
Update the documentation table for using H5* API prefixes convention for naming files and modules.

Builds on PR #5912
2025-10-12 17:32:23 -05:00
Allen Byrne fb35cde24a Rework Fortran configure to allow cross compile overrides (#5720)
Behavior:
Modify HDF5UseFortran.cmake to handle cross-compilation by providing default KINDs and sizes when CMAKE_CROSSCOMPILING is true.
Default values for INTEGER and REAL KINDs and their sizes are set when cross-compiling.
Error messages are adjusted to reflect cross-compilation scenarios.
Logic:
Conditional checks added for CMAKE_CROSSCOMPILING to determine if default values should be used.
Default values include INTEGER KINDs {1,2,4,8,16} and REAL KINDs {4,8,10,16}.
Default sizes for native kinds are set to 4 for INTEGER and REAL, and 8 for DOUBLE PRECISION when cross-compiling.
Misc:
Adjustments to verbose messages to indicate when defaults are used during cross-compilation.
2025-10-12 17:30:46 -05:00
Zbigniew Piotrowski 61cfe6ca93 Fix Fortran compilation by adding a missing copy of the h5vfd.mod at the install stage. (#5912) 2025-10-10 16:45:54 -05:00
Matt L 6c86f97e03 Fix CVE-2025-2310 (#5872)
Malformed files can have a zero name-length, which when subtracted lead to an overflow and an out-of-bounds read.

Check that name length is not too small in addition to checking for an overflow directly.
2025-10-09 16:10:23 -05:00
Glenn Song 4310c19608 Fix CVE-2025-2925 (#5739)
This PR fixes issue #5383, which was occurring due to actual_len + H5C_IMAGE_EXTRA_SPACE being 0. When realloc was called, it freed image, but gets sent to done before new_image can be assigned to image. Because the pointer for image isn't null, it attempts to free it here again, causing the double free to occur. This PR addresses Quincey's concern and fixes the issue while preserving new_image and image.

The bug was first reproduced using the fuzzer and the POC file from #5383. With this change, the double free no longer occurs.
2025-10-09 14:48:55 -05:00
Glenn Song 38954615fc Fix CVE-2025-2153 (#5795)
This PR fixes #5329. Previously, the message flags field was able to be modified such that a message that is not sharable according to the share_flags field in H5O_msg_class_t could be treated as sharable. A check has been added to make sure messages that are not sharable can't be modified so that they indicate they can be shared.

The bug was first reproduced using the fuzzer and the POC file from #5329. With this change, the heap based buffer overflow no longer occurs.
2025-10-09 07:51:49 -05:00
Allen Byrne 701b46daed Rename the HDF5Examples build option prefix (#5906)
Renamed all HDF5 examples build options from H5EX_* to H5EXAMPLE_* to better distinguish them from library options when building examples alongside the library.

Updated all CMake files, including:
Main examples CMakeLists.txt files
CMake configuration files in config/ directory
CMake preset files
Updated documentation files to reflect new option names
2025-10-08 15:53:44 -05:00
Matt L ac169ed3e8 Optimize VDS operations with r-tree (#5843)
Optimize VDS operations using R-tree spatial index, adding new API functions and tests for improved performance.

Behavior:
Introduces R-tree spatial index for optimizing VDS operations in H5Dvirtual.c.
Adds H5Pset_dset_use_spatial_tree() and H5Pget_dset_use_spatial_tree() to control R-tree usage.
Default behavior uses R-tree for VDS with more than 1000 mappings.
Implementation:
Adds H5RT.c, H5RTprivate.h, and H5RTpkg.h for R-tree implementation.
Updates H5Pdapl.c and H5Pdcpl.c to include R-tree properties.
Modifies H5Dvirtual.c to integrate R-tree in VDS I/O operations.
Testing:
Adds rtree.c for testing R-tree creation, search, and copy operations.
Tests R-tree integration with VDS in test/dsets.c.
Verifies R-tree behavior with different dataset access property list settings.
2025-10-07 12:13:28 -05:00
Gerd Heber 20557aea82 Update Dockerfile (#5905)
- Install Clang
- Use the Ubuntu image to meet the CMake minimum
2025-10-06 16:35:59 -05:00
Larry Knox 45b7ee8179 Delete leftover line from bin/h5vers. (#5900) 2025-10-06 08:20:24 -05:00
Larry Knox 4399814deb Update bin/h5vers to omit any subversion in the "Executive Summary" line (#5898)
Update bin/h5vers to omit subversion in "Executive Summary" line of CHANGELOG.md.
Prevents confusion on GitHub HDF5 Releases page by aligning version display with snapshot tar.gz and zip files.
2025-10-05 21:50:16 -05:00
jhendersonHDF a9ba49178f Update generated error files (#5895)
Add H5E_RTREE error type for R-Tree spatial index errors and update related error handling.
2025-10-03 15:58:07 -05:00
Matt L ac5d52536d Add internal spatial tree (#5800)
Implement an r-tree data structure in a new module. It has three exposed methods:  H5RT_create(), H5RT_search(), and H5RT_free().

The STR algorithm used during creation is based on the one described here.

Updates CMakeLists.txt to include H5RT.c and related headers.

Adds rtree.c test file to validate R-tree creation and search functionalities.
2025-10-02 06:49:52 -05:00
dependabot[bot] 2448f9b9bd Bump the github-actions group with 12 updates (#5891)
Bumps the github-actions group with 12 updates:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `4` | `5` |
| [actions/download-artifact](https://github.com/actions/download-artifact) | `4.3.0` | `5.0.0` |
| [actions/cache](https://github.com/actions/cache) | `3` | `4` |
| [actions/setup-java](https://github.com/actions/setup-java) | `4` | `5` |
| [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) | `4` | `5` |
| [lycheeverse/lychee-action](https://github.com/lycheeverse/lychee-action) | `2.0.2` | `2.6.1` |
| [jlumbroso/free-disk-space](https://github.com/jlumbroso/free-disk-space) | `1.3.0` | `1.3.1` |
| [robinraju/release-downloader](https://github.com/robinraju/release-downloader) | `1.11` | `1.12` |
| [softprops/action-gh-release](https://github.com/softprops/action-gh-release) | `2.3.2` | `2.3.3` |
| [ossf/scorecard-action](https://github.com/ossf/scorecard-action) | `2.4.2` | `2.4.3` |
| [github/codeql-action](https://github.com/github/codeql-action) | `3.29.7` | `3.30.5` |
| [actions/setup-python](https://github.com/actions/setup-python) | `4` | `6` |
2025-10-02 06:42:14 -05:00
Matt L c83b798de5 Generate VOL tests for h5repack (#5793)
* Generate VOL tests for h5repack

* Correct cleanup depends

* Correct wrong varname

* Remove 'cmake' specification
2025-09-30 20:24:41 -05:00
Matt L af77085d3f Generate VOL tests for h5dump (#5763)
Add VOL tests for h5dump, update test generation logic, and modify test configurations.

Tests:
      Add VOL tests for h5dump in CMakeTests.cmake and CMakeTestsXML.cmake.
      Modify ADD_H5_TEST macro to support VOL-specific tests and filtering.
      Add gent_tvms() function in h5dumpgentest.c and h5dumpgentest.h for generating test files.
2025-09-30 13:14:44 -05:00
Neil Fortner a28946186b Fix bugs involving recursive link operations that could be triggered by deleting links to their parent group (#5853)
Fix problems that could occur when deleting an object header message inside a recursive operation during object header message traversal.
2025-09-30 12:20:49 -05:00
Matt L 7a920d0835 Include VDS changes in CHANGELOG (#5877)
* Add CHANGELOG note for delayed layout copy

* Add link to shared strings CHANGELOG
2025-09-30 10:10:49 -05:00
Dana Robinson d775fa0712 Restrict fscanf %s in h5import (#5887)
A couple of places in the h5import.c code use fscanf with %s to read
strings into a fixed-size buffer without restricting the number
of characters, which could lead to a stack buffer overflow.

This fix restricts the number of characters that can be read to
the size of the buffer.
2025-09-30 09:40:15 -05:00
Larry Knox 1f52fdccb8 Increment sub-release number and update version. (#5886) 2025-09-29 16:28:07 -05:00
Allen Byrne 8f89d1fe7c Develop big endianCorrect BE testing issues (#5866)
* Use bigendian specific files on those machine
* Examples need a bigendian check and var
* Update the reference files
2025-09-27 08:21:12 -05:00
H. Joe Lee c38b148052 chore: improve comment consistency (#5879)
Add a space and capitalize.
2025-09-26 13:45:33 -05:00
jhendersonHDF 748875a7d7 Add predefined datatypes for bfloat16 data (#5402)
Adds predefined datatypes for little- and big-endian bfloat16 data

Does not add support for any native bfloat16 types; datatype conversions are performed in software

Also adds missing float16 predefined types to fortran
2025-09-26 13:33:56 -05:00
jhendersonHDF 29c847a43d Fix issue with handling of corrupted object header continuation messages (#5829)
An HDF5 file could be specifically constructed such that an object
header contained a corrupted continuation message which pointed
back to itself. This eventually resulted in an internal buffer being
allocated with too small of a size, leading to a heap buffer overflow
when encoding an object header message into it. This has been fixed
by checking the expected number of deserialized object header chunks
against the actual value as chunks are being deserialized.

Fixes CVE-2025-6816, CVE-2025-6856, CVE-2025-2923
2025-09-26 13:13:10 -05:00
Scot Breitenfeld 877cbf79a7 Adds new subfiling API H5FDsubfiling_get_file_mapping() (#5828)
Adds H5FDsubfiling_get_file_mapping() API to map logical HDF5 files to physical subfiles, with Fortran support and comprehensive testing.

Adds H5FDsubfiling_get_file_mapping() in H5FDsubfiling.c to retrieve subfile paths for a logical HDF5 file.
Updates Fortran interface in H5VFDff.F90 to include h5fdsubfiling_get_file_mapping_f().

Updates h5fuse.in to support a list of subfiles for processing with a new -l option.
2025-09-26 11:30:16 -05:00
H. Joe Lee 2e88b9da1a ci: free space for nvhpc.yml (#5881)
close #5880
2025-09-26 11:13:52 -05:00
bmribler 86149a0988 Fixes CVE-2025-6750 (#5856)
* Fixes CVE-2025-6750

A heap buffer overflow occurred because an mtime message was not properly decoded, resulting in a buffer of size 0 being passed into the encoder.

This PR added decoding for both old and new mtime messages which will allow invalid message size to be detected.

Fixes #5549
2025-09-26 10:46:50 -05:00
Allen Byrne 01dfee4e00 ignore local .claude folder (#5865) 2025-09-26 10:39:26 -05:00
Larry Knox 8073ad8849 Update h5vers and release scripts to handle change from RELEASE.txt to CHANGELOG.md (#5875)
* Updated h5vers and release scripts to handle change from RELEASE.txt to
CHANGELOG.md.

* Added links to wiki and cdash for Platforms Tested.

* Don't use heading format for version lines at top of README.md and
CHANGELOG.md files.
2025-09-26 10:29:59 -05:00
bmribler 3914bb7f7e Fixed CVE-2025-6269 (#5850)
The GitHub issue #5579 included several security vulnerabilities in function
H5C__reconstruct_cache_entry().

This PR addressed them by:
- adding buffer size argument to the function
- adding buffer overflow checks
- adding input validations
- releasing allocated resource on failure

These changes addressed the crashes reported.  However, there is a skiplist
crash during the unwinding process that has to be investigated.
2025-09-25 21:17:14 -05:00
Matt L fe7ae303b1 Add missing cleanup dependency to h5repack tests (#5878)
* Fix overwriting dependency list
2025-09-25 17:10:24 -05:00
Matt L d072fcce90 Merge h5repack test macros (#5792) 2025-09-25 08:57:14 -05:00
Lori Cooper 86551f46ef More minor Changelog changes (#5876)
* Known Problems items change from h3 (###) to bullet points
2025-09-25 08:02:56 -05:00
Dana Robinson 562a2e2d0c Fix scale-offset filter errors (#5864)
A security fix from 1.14.6 introduced a regression in the scale-offset
filter where normal data values could cause the library to emit an
error (not a crash/segfault).

Fixes GitHub #5861
2025-09-24 20:16:40 -05:00
Larry Knox ad82570cfe Move macos-26-matrix.yml workflow to run nightly. (#5867) 2025-09-24 14:21:29 -05:00
Matt L fdabc30649 Generate VOL tests for h5ls (#5769)
* Generate VOL tests for h5ls
* Update workflow
* Rework test skipping
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
2025-09-24 11:54:52 -05:00
Scot Breitenfeld 06d63b66be improvements to publishing action (#5860)
✅ Fixed Critical Issues

  1. Corrected variable name (inputs.use_hdf → inputs.file_name)
  2. Pinned action versions to specific, secure releases
  3. Added input validation with regex patterns and path traversal
  protection
  4. Enhanced error handling with file existence checks

  🛡️ Security Enhancements

  5. Restricted S3 sync with explicit include/exclude patterns
  6. Added dry-run mode for safe testing
  7. Input sanitization to prevent malicious inputs
  8. Updated to latest action versions with known security fixes

  🚀 Reliability Improvements

  9. File verification steps before processing
  10. Graceful handling of missing optional files
  11. Better error messages and status reporting
  12. Timeout protection (30 minutes max)
  13. Proper content-type headers for HTML files

  📊 Operational Improvements

  14. Detailed logging with emojis for easy scanning
  15. Comprehensive summary at the end
  16. Conditional execution based on file availability
  17. Proper AWS CLI options (--exact-timestamps, --metadata-directive)
2025-09-24 11:07:48 -05:00
Aleksandar Jelenak fb570863ce Improve Markdown formatting (#5863) 2025-09-24 10:30:07 -04:00
Larry Knox ef171e05bb Remove NEWSLETTER files. (#5859)
* Remove NEWSLETTER files.
Update tarball.yml and release-files.yml to upload description for
snapshots and releases.

* Add path to CHANGELOG.md in tarball.yml.
2025-09-23 16:18:54 -05:00
Lori Cooper 507d7cec8a Added exec summary to changelog, misc other small fixes/corrections. (#5845)
* Pull Release/snapshot description from Executive Summary of
CHANGELOG.md.

* Change bullets to h3 headings (###)
2025-09-22 15:56:51 -05:00
Matt L 9d2134e24a Add missing test files to h5gentest --h5repack (#5791)
* Add missing test files to h5gentest --h5repack  and update generator routines for type handling.
2025-09-22 08:42:55 -05:00
Scot Breitenfeld b0fb7ebb2a Fix issue left hand panel issue (#5855) 2025-09-22 08:05:16 -05:00
H. Joe Lee 19d1166ab1 Adds macOS-26 matrix testing workflow to CI for diverse build configurations. 2025-09-22 08:04:15 -05:00