hdf5/When-evicting-driver-info-block-NULL-the-corresponding-entry.patch
Dirk Stoecker aa78456748 Accepting request 1173662 from home:badshah400:branches:science
* Update to version 1.12.3.
* Drop upstreamed patches: Remove-duplicate-code.patch, H5O__pline_decode-Make-more-resilient-to-out-of-bounds-read.patch, H5O_dtype_decode_helper-Parent-of-enum-needs-to-have-same-size-as-enum-itself.patch, Pass-compact-chunk-size-info-to-ensure-requested-elements-are-within-bounds.patch, Make-sure-info-block-for-external-links-has-at-least-3-bytes.patch, Compound-datatypes-may-not-have-members-of-size-0.patch, H5IMget_image_info-H5Sget_simple_extent_dims-does-not-exceed-array-size.patch, Check-for-overflow-when-calculating-on-disk-attribute-data-size-2459.patch
* New BuildRequires: hostname.
* Work around an sed hack in upstream configure file by dropping "-Werror=return-type" from RPM %optflags.

OBS-URL: https://build.opensuse.org/request/show/1173662
OBS-URL: https://build.opensuse.org/package/show/science/hdf5?expand=0&rev=174
2024-05-14 15:19:49 +00:00

32 lines
1.2 KiB
Diff

From: Egbert Eich <eich@suse.com>
Date: Thu Sep 29 13:47:30 2022 +0200
Subject: When evicting driver info block, NULL the corresponding entry
Patch-mainline: Not yet
Git-repo: ssh://eich@192.168.122.1:/home/eich/sources/HPC/hdf5
Git-commit: 6d5496f17ed5aa65cbb0498e0bf70b0d599dc336
References:
This prevents it from another attempt to unpin it in H5F__dest() which may
happen due to malformed hdf5 files which leads to a segfault.
This fixes CVE-2021-46242
Signed-off-by: Egbert Eich <eich@suse.com>
Signed-off-by: Egbert Eich <eich@suse.de>
---
src/H5Fsuper.c | 2 ++
1 file changed, 2 insertions(+)
Index: hdf5-1.12.3/src/H5Fsuper.c
===================================================================
--- hdf5-1.12.3.orig/src/H5Fsuper.c
+++ hdf5-1.12.3/src/H5Fsuper.c
@@ -1045,6 +1045,8 @@ done:
/* Evict the driver info block from the cache */
if (sblock && H5AC_expunge_entry(f, H5AC_DRVRINFO, sblock->driver_addr, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTEXPUNGE, FAIL, "unable to expunge driver info block")
+
+ f->shared->drvinfo = NULL;
} /* end if */
/* Unpin & discard superblock */