Mageia Bugzilla – Attachment 8817 Details for
Bug 19874
hdf5 new security issues CVE-2016-433[0-3]
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
Notes from a web tutorial on the HDF container format.
tutorial_digest (text/plain), 4.68 KB, created by
Len Lawrence
on 2016-12-25 03:15:49 CET
(
hide
)
Description:
Notes from a web tutorial on the HDF container format.
Filename:
MIME Type:
Creator:
Len Lawrence
Created:
2016-12-25 03:15:49 CET
Size:
4.68 KB
patch
obsolete
>A set of tools comes with the HDF distribution: >$ ls /usr/bin/h5* >/usr/bin/h52gif /usr/bin/h5diff /usr/bin/h5ls /usr/bin/h5repart >/usr/bin/h5c++ /usr/bin/h5dump /usr/bin/h5mkgrp /usr/bin/h5stat >/usr/bin/h5cc /usr/bin/h5fc /usr/bin/h5perf_serial /usr/bin/h5unjam >/usr/bin/h5copy /usr/bin/h5import /usr/bin/h5redeploy >/usr/bin/h5debug /usr/bin/h5jam /usr/bin/h5repack > >Sample files at https://support.hdfgroup.org/HDF5/examples/intro.html >Tutorial help in the vicinity of this link: >https://support.hdfgroup.org/HDF5/Tutor/compile.html > >Create an HDF dataset container: >$ h5cc -o makesample h5_crtdat.c >$ ./makesample >$ ls -l >... 7370564 Dec 24 23:14 makesample >... 1400 Dec 24 23:34 dset.h5 >... 2080 Dec 24 23:10 h5_crtdat.c >$ h5ls dset.h5 >dset Dataset {4, 6} > >This data is an array of 32bit big-endian integers embedded in a Unix-like tree structure: >$ h5dump dset.h5 >HDF5 "dset.h5" { >GROUP "/" { > DATASET "dset" { > DATATYPE H5T_STD_I32BE > DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) } > DATA { > (0,0): 0, 0, 0, 0, 0, 0, > (1,0): 0, 0, 0, 0, 0, 0, > (2,0): 0, 0, 0, 0, 0, 0, > (3,0): 0, 0, 0, 0, 0, 0 > } > } >} >} >Which actually looks like this (in ASCII): >$ od -a dset.h5 >0000000 ht H D F cr nl sub nl nul nul nul nul nul bs bs nul >0000020 eot nul dle nul nul nul nul nul nul nul nul nul nul nul nul nul >0000040 del del del del del del del del x enq nul nul nul nul nul nul >0000060 del del del del del del del del nul nul nul nul nul nul nul nul >0000100 ` nul nul nul nul nul nul nul soh nul nul nul nul nul nul nul >0000120 bs nul nul nul nul nul nul nul ( stx nul nul nul nul nul nul >0000140 soh nul soh nul soh nul nul nul can nul nul nul nul nul nul nul >0000160 dc1 nul dle nul nul nul nul nul bs nul nul nul nul nul nul nul >0000200 ( stx nul nul nul nul nul nul T R E E nul nul soh nul >0000220 del del del del del del del del del del del del del del del del >0000240 nul nul nul nul nul nul nul nul 0 eot nul nul nul nul nul nul >0000260 bs nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul >0000300 nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul >* >0001240 nul nul nul nul nul nul nul nul H E A P nul nul nul nul >0001260 X nul nul nul nul nul nul nul dle nul nul nul nul nul nul nul >0001300 H stx nul nul nul nul nul nul nul nul nul nul nul nul nul nul >0001320 d s e t nul nul nul nul soh nul nul nul nul nul nul nul >0001340 H nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul >0001360 nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul >* >0001440 soh nul ack nul soh nul nul nul nul soh nul nul nul nul nul nul >0001460 soh nul ( nul nul nul nul nul soh stx soh nul nul nul nul nul >0001500 eot nul nul nul nul nul nul nul ack nul nul nul nul nul nul nul >* >0001540 etx nul dle nul soh nul nul nul dle ht nul nul eot nul nul nul >0001560 nul nul sp nul nul nul nul nul enq nul bs nul soh nul nul nul >0001600 stx stx stx soh nul nul nul nul bs nul can nul nul nul nul nul >0001620 etx soh del del del del del del del del ` nul nul nul nul nul >0001640 nul nul nul nul nul nul nul nul dc2 nul bs nul nul nul nul nul >0001660 soh nul nul nul 0 bel _ X nul nul p nul nul nul nul nul >0001700 nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul >* >0002060 S N O D soh nul soh nul bs nul nul nul nul nul nul nul >0002100 sp etx nul nul nul nul nul nul nul nul nul nul nul nul nul nul >0002120 nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul >* >0002560 nul nul nul nul nul nul nul nul >0002570 > >Download all the tutorial examples as a tarball from https://support.hdfgroup.org/HDF5/examples/api18-c.html >Extract the files into the examples directory and in that directory run: >$ ./configure HSEX_18=1 >which is supposed to set up the makefile for HDF 1.8 examples only. >$ make >to compile the example files. There were a number of failures when I tried this, but carry on. >Navigate to 1_8/C/H5D and try running any of the executables and compare the resultant .h5 file to the tabulated ddl value corresponding to the program you have just run. >e.g. >$ h5dump h5ex_d_alloc.h5 >HDF5 "h5ex_d_alloc.h5" { >GROUP "/" { > DATASET "DS1" { > DATATYPE H5T_STD_I32LE > DATASPACE SIMPLE { ( 4, 7 ) / ( 4, 7 ) } > DATA { > (0,0): 0, -1, -2, -3, -4, -5, -6, > (1,0): 0, 0, 0, 0, 0, 0, 0, > (2,0): 0, 1, 2, 3, 4, 5, 6, > (3,0): 0, 2, 4, 6, 8, 10, 12 > } > } > DATASET "DS2" { > DATATYPE H5T_STD_I32LE > DATASPACE SIMPLE { ( 4, 7 ) / ( 4, 7 ) } > DATA { > (0,0): 0, -1, -2, -3, -4, -5, -6, > (1,0): 0, 0, 0, 0, 0, 0, 0, > (2,0): 0, 1, 2, 3, 4, 5, 6, > (3,0): 0, 2, 4, 6, 8, 10, 12 > } > } >} >} > > >
A set of tools comes with the HDF distribution: $ ls /usr/bin/h5* /usr/bin/h52gif /usr/bin/h5diff /usr/bin/h5ls /usr/bin/h5repart /usr/bin/h5c++ /usr/bin/h5dump /usr/bin/h5mkgrp /usr/bin/h5stat /usr/bin/h5cc /usr/bin/h5fc /usr/bin/h5perf_serial /usr/bin/h5unjam /usr/bin/h5copy /usr/bin/h5import /usr/bin/h5redeploy /usr/bin/h5debug /usr/bin/h5jam /usr/bin/h5repack Sample files at https://support.hdfgroup.org/HDF5/examples/intro.html Tutorial help in the vicinity of this link: https://support.hdfgroup.org/HDF5/Tutor/compile.html Create an HDF dataset container: $ h5cc -o makesample h5_crtdat.c $ ./makesample $ ls -l ... 7370564 Dec 24 23:14 makesample ... 1400 Dec 24 23:34 dset.h5 ... 2080 Dec 24 23:10 h5_crtdat.c $ h5ls dset.h5 dset Dataset {4, 6} This data is an array of 32bit big-endian integers embedded in a Unix-like tree structure: $ h5dump dset.h5 HDF5 "dset.h5" { GROUP "/" { DATASET "dset" { DATATYPE H5T_STD_I32BE DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) } DATA { (0,0): 0, 0, 0, 0, 0, 0, (1,0): 0, 0, 0, 0, 0, 0, (2,0): 0, 0, 0, 0, 0, 0, (3,0): 0, 0, 0, 0, 0, 0 } } } } Which actually looks like this (in ASCII): $ od -a dset.h5 0000000 ht H D F cr nl sub nl nul nul nul nul nul bs bs nul 0000020 eot nul dle nul nul nul nul nul nul nul nul nul nul nul nul nul 0000040 del del del del del del del del x enq nul nul nul nul nul nul 0000060 del del del del del del del del nul nul nul nul nul nul nul nul 0000100 ` nul nul nul nul nul nul nul soh nul nul nul nul nul nul nul 0000120 bs nul nul nul nul nul nul nul ( stx nul nul nul nul nul nul 0000140 soh nul soh nul soh nul nul nul can nul nul nul nul nul nul nul 0000160 dc1 nul dle nul nul nul nul nul bs nul nul nul nul nul nul nul 0000200 ( stx nul nul nul nul nul nul T R E E nul nul soh nul 0000220 del del del del del del del del del del del del del del del del 0000240 nul nul nul nul nul nul nul nul 0 eot nul nul nul nul nul nul 0000260 bs nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul 0000300 nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul * 0001240 nul nul nul nul nul nul nul nul H E A P nul nul nul nul 0001260 X nul nul nul nul nul nul nul dle nul nul nul nul nul nul nul 0001300 H stx nul nul nul nul nul nul nul nul nul nul nul nul nul nul 0001320 d s e t nul nul nul nul soh nul nul nul nul nul nul nul 0001340 H nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul 0001360 nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul * 0001440 soh nul ack nul soh nul nul nul nul soh nul nul nul nul nul nul 0001460 soh nul ( nul nul nul nul nul soh stx soh nul nul nul nul nul 0001500 eot nul nul nul nul nul nul nul ack nul nul nul nul nul nul nul * 0001540 etx nul dle nul soh nul nul nul dle ht nul nul eot nul nul nul 0001560 nul nul sp nul nul nul nul nul enq nul bs nul soh nul nul nul 0001600 stx stx stx soh nul nul nul nul bs nul can nul nul nul nul nul 0001620 etx soh del del del del del del del del ` nul nul nul nul nul 0001640 nul nul nul nul nul nul nul nul dc2 nul bs nul nul nul nul nul 0001660 soh nul nul nul 0 bel _ X nul nul p nul nul nul nul nul 0001700 nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul * 0002060 S N O D soh nul soh nul bs nul nul nul nul nul nul nul 0002100 sp etx nul nul nul nul nul nul nul nul nul nul nul nul nul nul 0002120 nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul * 0002560 nul nul nul nul nul nul nul nul 0002570 Download all the tutorial examples as a tarball from https://support.hdfgroup.org/HDF5/examples/api18-c.html Extract the files into the examples directory and in that directory run: $ ./configure HSEX_18=1 which is supposed to set up the makefile for HDF 1.8 examples only. $ make to compile the example files. There were a number of failures when I tried this, but carry on. Navigate to 1_8/C/H5D and try running any of the executables and compare the resultant .h5 file to the tabulated ddl value corresponding to the program you have just run. e.g. $ h5dump h5ex_d_alloc.h5 HDF5 "h5ex_d_alloc.h5" { GROUP "/" { DATASET "DS1" { DATATYPE H5T_STD_I32LE DATASPACE SIMPLE { ( 4, 7 ) / ( 4, 7 ) } DATA { (0,0): 0, -1, -2, -3, -4, -5, -6, (1,0): 0, 0, 0, 0, 0, 0, 0, (2,0): 0, 1, 2, 3, 4, 5, 6, (3,0): 0, 2, 4, 6, 8, 10, 12 } } DATASET "DS2" { DATATYPE H5T_STD_I32LE DATASPACE SIMPLE { ( 4, 7 ) / ( 4, 7 ) } DATA { (0,0): 0, -1, -2, -3, -4, -5, -6, (1,0): 0, 0, 0, 0, 0, 0, 0, (2,0): 0, 1, 2, 3, 4, 5, 6, (3,0): 0, 2, 4, 6, 8, 10, 12 } } } }
View Attachment As Raw
Actions:
View
Attachments on
bug 19874
: 8817