diff options
author | vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com> | 2023-08-25 13:13:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-25 13:13:04 (GMT) |
commit | e7bb05a8869f460afe9f198e9b7eee4a11972d48 (patch) | |
tree | 66dfe6fb24d2062d2f01f97e39c08ec617d66381 /tools/src/h5dump | |
parent | f6df114fa2f72bc6eadcae444e23af7e25e079d4 (diff) | |
download | hdf5-e7bb05a8869f460afe9f198e9b7eee4a11972d48.zip hdf5-e7bb05a8869f460afe9f198e9b7eee4a11972d48.tar.gz hdf5-e7bb05a8869f460afe9f198e9b7eee4a11972d48.tar.bz2 |
Fix for CVE-2018-15671. h5stat -S $POC will result in a crash with segmenetation fault. (#3427)
It is because the object in the testfile points back to the root group.
When the tool tries to traverse the object, it goes back to the root group and then back again.
Diffstat (limited to 'tools/src/h5dump')
-rw-r--r-- | tools/src/h5dump/h5dump_ddl.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/tools/src/h5dump/h5dump_ddl.c b/tools/src/h5dump/h5dump_ddl.c index 8a02a49..adc8585 100644 --- a/tools/src/h5dump/h5dump_ddl.c +++ b/tools/src/h5dump/h5dump_ddl.c @@ -853,10 +853,7 @@ dump_group(hid_t gid, const char *name) H5Oget_info3(gid, &oinfo, H5O_INFO_BASIC); - /* Must check for uniqueness of all objects if we've traversed an elink, - * otherwise only check if the reference count > 1. - */ - if (oinfo.rc > 1 || hit_elink) { + { obj_t *found_obj; /* Found object */ found_obj = search_obj(group_table, &oinfo.token); @@ -880,10 +877,6 @@ dump_group(hid_t gid, const char *name) link_iteration(gid, crt_order_flags); } } - else { - attr_iteration(gid, attr_crt_order_flags); - link_iteration(gid, crt_order_flags); - } dump_indent -= COL; ctx.indent_level--; |