summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorAnkur Tyagi <ankur.tyagi85@gmail.com>2025-10-29 00:32:42 +1300
committerAnuj Mittal <anuj.mittal@intel.com>2025-10-30 14:43:33 +0800
commit7d1b63f0af74a354f08de2b683e98ccd7f357b05 (patch)
tree6f3bad3089e1d420fd1bc03384509e5c3e2a63ec /meta-oe
parentb42e6eb3e51ae73aed0012f1ca827ff30e34f436 (diff)
downloadmeta-openembedded-7d1b63f0af74a354f08de2b683e98ccd7f357b05.tar.gz
hdf5: patch CVE-2025-2914
Details https://nvd.nist.gov/vuln/detail/CVE-2025-2914 Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-support/hdf5/files/CVE-2025-2914.patch47
-rw-r--r--meta-oe/recipes-support/hdf5/hdf5_1.14.4-3.bb1
2 files changed, 48 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/hdf5/files/CVE-2025-2914.patch b/meta-oe/recipes-support/hdf5/files/CVE-2025-2914.patch
new file mode 100644
index 0000000000..c999e39d7e
--- /dev/null
+++ b/meta-oe/recipes-support/hdf5/files/CVE-2025-2914.patch
@@ -0,0 +1,47 @@
1From 20a34d68dd837f83d90df45ead054bbeda999830 Mon Sep 17 00:00:00 2001
2From: bmribler <39579120+bmribler@users.noreply.github.com>
3Date: Wed, 13 Aug 2025 14:45:41 -0400
4Subject: [PATCH] Refix of the attempts in PR-5209 (#5722)
5
6This PR addresses the root cause of the issue by adding a sanity-check immediately
7after reading the file space page size from the file.
8
9The same fuzzer in GH-5376 was used to verify that the assert before the vulnerability
10had occurred and that an error indicating a corrupted file space page size replaced it.
11
12CVE: CVE-2025-2914
13Upstream-Status: Backport [https://github.com/HDFGroup/hdf5/commit/804f3bace997e416917b235dbd3beac3652a8a05]
14(cherry picked from commit 804f3bace997e416917b235dbd3beac3652a8a05)
15Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
16---
17 src/H5Fsuper.c | 2 ++
18 src/H5Ofsinfo.c | 3 +++
19 2 files changed, 5 insertions(+)
20
21diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c
22index 3e5bc9a3a2..4de4c1feb0 100644
23--- a/src/H5Fsuper.c
24+++ b/src/H5Fsuper.c
25@@ -756,6 +756,8 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, bool initial_read)
26 if (!(flags & H5O_MSG_FLAG_WAS_UNKNOWN)) {
27 H5O_fsinfo_t fsinfo; /* File space info message from superblock extension */
28
29+ memset(&fsinfo, 0, sizeof(H5O_fsinfo_t));
30+
31 /* f->shared->null_fsm_addr: Whether to drop free-space to the floor */
32 /* The h5clear tool uses this property to tell the library
33 * to drop free-space to the floor
34diff --git a/src/H5Ofsinfo.c b/src/H5Ofsinfo.c
35index 5b692357fc..2bb6ea6119 100644
36--- a/src/H5Ofsinfo.c
37+++ b/src/H5Ofsinfo.c
38@@ -182,6 +182,9 @@ H5O__fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU
39 if (H5_IS_BUFFER_OVERFLOW(p, H5F_sizeof_size(f), p_end))
40 HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding");
41 H5F_DECODE_LENGTH(f, p, fsinfo->page_size); /* File space page size */
42+ /* Basic sanity check */
43+ if (fsinfo->page_size == 0 || fsinfo->page_size > H5F_FILE_SPACE_PAGE_SIZE_MAX)
44+ HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "invalid page size in file space info");
45
46 if (H5_IS_BUFFER_OVERFLOW(p, 2, p_end))
47 HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding");
diff --git a/meta-oe/recipes-support/hdf5/hdf5_1.14.4-3.bb b/meta-oe/recipes-support/hdf5/hdf5_1.14.4-3.bb
index d195ec2486..875510b0e2 100644
--- a/meta-oe/recipes-support/hdf5/hdf5_1.14.4-3.bb
+++ b/meta-oe/recipes-support/hdf5/hdf5_1.14.4-3.bb
@@ -16,6 +16,7 @@ SRC_URI = " \
16 file://0002-Remove-suffix-shared-from-shared-library-name.patch \ 16 file://0002-Remove-suffix-shared-from-shared-library-name.patch \
17 file://0001-cmake-remove-build-flags.patch \ 17 file://0001-cmake-remove-build-flags.patch \
18 file://CVE-2025-2913.patch \ 18 file://CVE-2025-2913.patch \
19 file://CVE-2025-2914.patch \
19" 20"
20SRC_URI[sha256sum] = "019ac451d9e1cf89c0482ba2a06f07a46166caf23f60fea5ef3c37724a318e03" 21SRC_URI[sha256sum] = "019ac451d9e1cf89c0482ba2a06f07a46166caf23f60fea5ef3c37724a318e03"
21 22