Skip to contentSkip to conversation

hdf5: upgrade 1.14.6 -> 2.0.0

PATCH New Gyorgy Sarvari 1 participant 1 message Nov 13, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hdf5: upgrade 1.14.6 -> 2.0.0

Drop patches that were incorporated in this release.

License-Update: Switched to 3-clause BSD license:
https://github.com/HDFGroup/hdf5/commit/edd7bea821b63f7d09e29296d341a5d6965012f9

Release notes:
https://github.com/HDFGroup/hdf5/releases/tag/2.0.0

---
 .../files/0001-Fix-CVE-2025-2153-5795.patch   | 47 ----------
 .../files/0001-Fix-CVE-2025-2310-5872.patch   | 41 ---------
 .../files/0001-Fix-CVE-2025-2924-5814.patch   | 36 --------
 .../files/0001-Fix-CVE-2025-2925-5739.patch   | 52 -----------
 .../files/0001-Fixes-CVE-2025-6750-5856.patch | 87 -------------------
 ...efix-of-the-attempts-in-PR-5209-5722.patch | 47 ----------
 .../files/0001-cmake-remove-build-flags.patch | 48 +++++-----
 ...ffix-shared-from-shared-library-name.patch | 20 +++--
 .../hdf5/{hdf5_1.14.6.bb => hdf5_2.0.0.bb}    | 19 +---
 9 files changed, 39 insertions(+), 358 deletions(-)
 delete mode 100644 meta-oe/recipes-support/hdf5/files/0001-Fix-CVE-2025-2153-5795.patch
 delete mode 100644 meta-oe/recipes-support/hdf5/files/0001-Fix-CVE-2025-2310-5872.patch
 delete mode 100644 meta-oe/recipes-support/hdf5/files/0001-Fix-CVE-2025-2924-5814.patch
 delete mode 100644 meta-oe/recipes-support/hdf5/files/0001-Fix-CVE-2025-2925-5739.patch
 delete mode 100644 meta-oe/recipes-support/hdf5/files/0001-Fixes-CVE-2025-6750-5856.patch
 delete mode 100644 meta-oe/recipes-support/hdf5/files/0001-Refix-of-the-attempts-in-PR-5209-5722.patch
 rename meta-oe/recipes-support/hdf5/{hdf5_1.14.6.bb => hdf5_2.0.0.bb} (65%)
meta-oe/recipes-support/hdf5/files/0001-Fix-CVE-2025-2153-5795.patch deleted +0 -47
deleted file mode 100644
index 4b31718dea..0000000000
@@ -1,47 +0,0 @@
-From 183c8aeb601a02a38dd6815bcb651a7317b1b647 Mon Sep 17 00:00:00 2001
-From: Glenn Song <[email protected]>
-Date: Thu, 9 Oct 2025 07:51:49 -0500
-Subject: [PATCH] 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.
-
-CVE: CVE-2025-2153
-Upstream-Status: Backport [https://github.com/HDFGroup/hdf5/commit/38954615fc079538aa45d48097625a6d76aceef0]
-
-Signed-off-by: Gyorgy Sarvari <[email protected]>
----
- src/H5Ocache.c   | 4 ++--
- src/H5Omessage.c | 3 +++
- 2 files changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/src/H5Ocache.c b/src/H5Ocache.c
-index 87f321c..12c30cf 100644
---- a/src/H5Ocache.c
-+++ b/src/H5Ocache.c
-@@ -1399,8 +1399,8 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t
-             else {
-                 /* Check for message of unshareable class marked as "shareable"
-                  */
--                if ((flags & H5O_MSG_FLAG_SHAREABLE) && H5O_msg_class_g[id] &&
--                    !(H5O_msg_class_g[id]->share_flags & H5O_SHARE_IS_SHARABLE))
-+                if (((flags & H5O_MSG_FLAG_SHARED) || (flags & H5O_MSG_FLAG_SHAREABLE)) &&
-+                    H5O_msg_class_g[id] && !(H5O_msg_class_g[id]->share_flags & H5O_SHARE_IS_SHARABLE))
-                     HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL,
-                                 "message of unshareable class flagged as shareable");
- 
-diff --git a/src/H5Omessage.c b/src/H5Omessage.c
-index 7190e46..fb9006c 100644
---- a/src/H5Omessage.c
-+++ b/src/H5Omessage.c
-@@ -354,6 +354,9 @@ H5O__msg_write_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, unsigned m
-          */
-         assert(!(mesg_flags & H5O_MSG_FLAG_DONTSHARE));
- 
-+        /* Sanity check to see if the type is not sharable */
-+        assert(type->share_flags & H5O_SHARE_IS_SHARABLE);
-+
-         /* Remove the old message from the SOHM index */
-         /* (It would be more efficient to try to share the message first, then
-          *      delete it (avoiding thrashing the index in the case the ref.
meta-oe/recipes-support/hdf5/files/0001-Fix-CVE-2025-2310-5872.patch deleted +0 -41

41 lines not on this page · raw message

meta-oe/recipes-support/hdf5/files/0001-Fix-CVE-2025-2924-5814.patch deleted +0 -36
deleted file mode 100644
index a86b5a491b..0000000000
@@ -1,36 +0,0 @@
-From f76c5adea55edec75680fdd7365cc97abc112d0e Mon Sep 17 00:00:00 2001
-From: Glenn Song <[email protected]>
-Date: Mon, 15 Sep 2025 07:56:54 -0500
-Subject: [PATCH] Fix CVE-2025-2924 (#5814)
-
-CVE: CVE-2025-2924
-Upstream-Status: Backport [https://github.com/HDFGroup/hdf5/commit/0a57195ca67d278f1cf7d01566c121048e337a59]
-
-Signed-off-by: Gyorgy Sarvari <[email protected]>
----
- src/H5HLcache.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/src/H5HLcache.c b/src/H5HLcache.c
-index d0836fe..7f412d2 100644
---- a/src/H5HLcache.c
-+++ b/src/H5HLcache.c
-@@ -225,6 +225,7 @@ H5HL__fl_deserialize(H5HL_t *heap)
-     /* check arguments */
-     assert(heap);
-     assert(!heap->freelist);
-+    HDcompile_assert(sizeof(hsize_t) == sizeof(uint64_t));
- 
-     /* Build free list */
-     free_block = heap->free_block;
-@@ -232,6 +233,10 @@ H5HL__fl_deserialize(H5HL_t *heap)
-         const uint8_t *image; /* Pointer into image buffer */
- 
-         /* Sanity check */
-+
-+        if (free_block > UINT64_MAX - (2 * heap->sizeof_size))
-+            HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "decoded heap block address overflow");
-+
-         if ((free_block + (2 * heap->sizeof_size)) > heap->dblk_size)
-             HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "bad heap free list");
- 
meta-oe/recipes-support/hdf5/files/0001-Fix-CVE-2025-2925-5739.patch deleted +0 -52

52 lines not on this page · raw message

meta-oe/recipes-support/hdf5/files/0001-Fixes-CVE-2025-6750-5856.patch deleted +0 -87

87 lines not on this page · raw message

meta-oe/recipes-support/hdf5/files/0001-Refix-of-the-attempts-in-PR-5209-5722.patch deleted +0 -47

47 lines not on this page · raw message

meta-oe/recipes-support/hdf5/files/0001-cmake-remove-build-flags.patch +22 -26

79 lines not on this page · raw message

meta-oe/recipes-support/hdf5/files/0002-Remove-suffix-shared-from-shared-library-name.patch +13 -7
index f0eb05a1e7..33ba78042a 100644
@@ -6,18 +6,23 @@ Subject: [PATCH 2/2] Remove suffix `-shared' from shared library name
 Upstream-Status: Inappropriate [OE specific]
 
 Signed-off-by: Hongxu Jia <[email protected]>
+
+Adapted to v2.0.0
+Signed-off-by: Gyorgy Sarvari <[email protected]>
+
 ---
  CMakeLists.txt | 24 ++++++++++++------------
  1 file changed, 12 insertions(+), 12 deletions(-)
 
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -191,19 +191,19 @@ set (HDF5_HL_F90_C_LIB_TARGET     "${HDF
- set (HDF5_JAVA_JNI_LIB_TARGET     "${HDF5_JAVA_JNI_LIB_CORENAME}")
- set (HDF5_JAVA_HDF5_LIB_TARGET    "${HDF5_JAVA_HDF5_LIB_CORENAME}")
- set (HDF5_JAVA_TEST_LIB_TARGET    "${HDF5_JAVA_TEST_LIB_CORENAME}")
+@@ -278,20 +278,20 @@
+ set (HDF5_F90_C_TEST_LIB_TARGET   "${HDF5_F90_C_TEST_LIB_CORENAME}-static")
+ set (HDF5_HL_F90_LIB_TARGET       "${HDF5_HL_F90_LIB_CORENAME}-static")
+ set (HDF5_HL_F90_C_LIB_TARGET     "${HDF5_HL_F90_C_LIB_CORENAME}-static")
 -set (HDF5_LIBSH_TARGET            "${HDF5_LIB_CORENAME}-shared")
 -set (HDF5_TEST_LIBSH_TARGET       "${HDF5_TEST_LIB_CORENAME}-shared")
+-set (HDF5_TEST_PAR_LIBSH_TARGET   "${HDF5_TEST_PAR_LIB_CORENAME}-shared")
 -set (HDF5_CPP_LIBSH_TARGET        "${HDF5_CPP_LIB_CORENAME}-shared")
 -set (HDF5_HL_LIBSH_TARGET         "${HDF5_HL_LIB_CORENAME}-shared")
 -set (HDF5_HL_CPP_LIBSH_TARGET     "${HDF5_HL_CPP_LIB_CORENAME}-shared")
@@ -31,6 +36,7 @@ Signed-off-by: Hongxu Jia <[email protected]>
 -set (HDF5_HL_F90_C_LIBSH_TARGET   "${HDF5_HL_F90_C_LIB_CORENAME}-shared")
 +set (HDF5_LIBSH_TARGET            "${HDF5_LIB_CORENAME}")
 +set (HDF5_TEST_LIBSH_TARGET       "${HDF5_TEST_LIB_CORENAME}")
++set (HDF5_TEST_PAR_LIBSH_TARGET   "${HDF5_TEST_PAR_LIB_CORENAME}")
 +set (HDF5_CPP_LIBSH_TARGET        "${HDF5_CPP_LIB_CORENAME}")
 +set (HDF5_HL_LIBSH_TARGET         "${HDF5_HL_LIB_CORENAME}")
 +set (HDF5_HL_CPP_LIBSH_TARGET     "${HDF5_HL_CPP_LIB_CORENAME}")
@@ -42,6 +48,6 @@ Signed-off-by: Hongxu Jia <[email protected]>
 +set (HDF5_F90_C_TEST_LIBSH_TARGET "${HDF5_F90_C_TEST_LIB_CORENAME}")
 +set (HDF5_HL_F90_LIBSH_TARGET     "${HDF5_HL_F90_LIB_CORENAME}")
 +set (HDF5_HL_F90_C_LIBSH_TARGET   "${HDF5_HL_F90_C_LIB_CORENAME}")
- 
- #-----------------------------------------------------------------------------
- # Define some CMake variables for use later in the project
+ set (HDF5_JAVA_JNI_LIB_TARGET     "${HDF5_JAVA_JNI_LIB_CORENAME}")
+ set (HDF5_JAVA_HDF5_LIB_TARGET    "${HDF5_JAVA_HDF5_LIB_CORENAME}")
+ set (HDF5_JAVA_TEST_LIB_TARGET    "${HDF5_JAVA_TEST_LIB_CORENAME}")
meta-oe/recipes-support/hdf5/hdf5_2.0.0.bb renamed from meta-oe/recipes-support/hdf5/hdf5_1.14.6.bb +4 -15
similarity index 65%
rename from meta-oe/recipes-support/hdf5/hdf5_1.14.6.bb
rename to meta-oe/recipes-support/hdf5/hdf5_2.0.0.bb
index 7d75f0e7dc..79ce8a018d 100644
@@ -4,24 +4,18 @@ extremely large and complex data collections"
 HOMEPAGE = "https://www.hdfgroup.org/"
 SECTION = "libs"
 
-LICENSE = "HDF5"
-LIC_FILES_CHKSUM = "file://COPYING;md5=adebb1ecf1b3b80c13359e18ef67301e"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=71a191398102f76050a4e56e78cb4891"
 
 inherit cmake siteinfo qemu multilib_header multilib_script
 
 DEPENDS += "qemu-native zlib"
 
-SRC_URI = "https://support.hdfgroup.org/releases/hdf5/v1_14/v1_14_6/downloads/${BPN}-${PV}.tar.gz \
+SRC_URI = "https://support.hdfgroup.org/releases/hdf5/v2_0/v2_0_0/downloads/${BPN}-${PV}.tar.gz \
            file://0002-Remove-suffix-shared-from-shared-library-name.patch \
            file://0001-cmake-remove-build-flags.patch \
-           file://0001-Fix-CVE-2025-2153-5795.patch \
-           file://0001-Fix-CVE-2025-2310-5872.patch \
-           file://0001-Refix-of-the-attempts-in-PR-5209-5722.patch \
-           file://0001-Fix-CVE-2025-2924-5814.patch \
-           file://0001-Fix-CVE-2025-2925-5739.patch \
-           file://0001-Fixes-CVE-2025-6750-5856.patch \
            "
-SRC_URI[sha256sum] = "e4defbac30f50d64e1556374aa49e574417c9e72c6b1de7a4ff88c4b1bea6e9b"
+SRC_URI[sha256sum] = "6e45a4213cb11bb5860e1b0a7645688ab55562cc2d55c6ff9bcb0984ed12b22b"
 
 FILES:${PN} += "${libdir}/libhdf5.settings ${datadir}/*"
 
@@ -58,11 +52,6 @@ do_configure:append() {
 do_install:append() {
     # Used for generating config files on target
     oe_multilib_header H5pubconf.h
-    # remove the buildpath
-    sed -i -e 's|${RECIPE_SYSROOT}||g' ${D}${libdir}/pkgconfig/hdf5.pc
-    sed -i -e 's|${RECIPE_SYSROOT}||g' ${D}${libdir}/cmake/hdf5-targets.cmake
-    sed -i -e 's|${RECIPE_SYSROOT_NATIVE}||g' ${D}${bindir}/h5hlcc
-    sed -i -e 's|${RECIPE_SYSROOT_NATIVE}||g' ${D}${bindir}/h5cc
 }
 
 BBCLASSEXTEND = "native"