diff --git a/0003-add-patch-to-fix-CVE-2025-2912.patch b/0003-add-patch-to-fix-CVE-2025-2912.patch new file mode 100644 index 0000000000000000000000000000000000000000..ff94e0091d1f662204fa6b330fc4e64f00052d95 --- /dev/null +++ b/0003-add-patch-to-fix-CVE-2025-2912.patch @@ -0,0 +1,27 @@ +From ff3d6722a91587daaaac82e78b25d26ad3f50172 Mon Sep 17 00:00:00 2001 +From: Binh-Minh +Date: Mon, 4 Aug 2025 03:10:29 -0400 +Subject: [PATCH] Fix reading bad size in the raw header continuation message + +This issue was reported in GH-5376 as a heap-use-after-free vulnerability in +one of the free lists. It appeared that the library came to this vulnerability +after it encountered an undetected reading of a bad value. The fuzzer now failed +with an appropriate error message. + +This considers addressing what GH-5376 reported. +--- + src/H5Ocont.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/H5Ocont.c b/src/H5Ocont.c +index c58ed3e9008..a30a328785a 100644 +--- a/src/H5Ocont.c ++++ b/src/H5Ocont.c +@@ -100,6 +100,8 @@ H5O__cont_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE + if (H5_IS_BUFFER_OVERFLOW(p, H5F_sizeof_size(f), p_end)) + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); + H5F_DECODE_LENGTH(f, p, cont->size); ++ if (cont->size == 0) ++ HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "invalid continuation chunk size (0)"); + + cont->chunkno = 0; diff --git a/hdf5.spec b/hdf5.spec index 23776585a684caac0e624a64f02c3e36cd6e3c21..9b24ad49c87a33d960935fb7ebb4b62f93d309b2 100644 --- a/hdf5.spec +++ b/hdf5.spec @@ -1,4 +1,4 @@ -%define anolis_release 1 +%define anolis_release 2 %global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) %global so_version 310 @@ -28,6 +28,8 @@ Patch0: hdf5-build.patch # https://github.com/HDFGroup/hdf5/pull/4924 Patch1: hdf5-float128.patch Patch2: hdf5-wrappers.patch +# https://github.com/HDFGroup/hdf5/commit/7cc8b5e1010a09c892bc97ac32d9515c3777ce07 +Patch3: 0003-add-patch-to-fix-CVE-2025-2912.patch BuildRequires: gcc-gfortran %if %{with java} @@ -464,6 +466,9 @@ fi %changelog +* Thu Nov 20 2025 lzq11122 - 1.14.5-2 +- Add patch to fix CVE-2025-2912 + * Tue Jun 10 2025 mgb01105731 - 1.14.5-1 - Update to 1.14.5 to fix CVEs - Delete patchs because the new version no longer requires it