Fuzz introspector
For issues and ideas: https://github.com/ossf/fuzz-introspector/issues

Fuzzer details

Fuzzer: fuzz_open

Call tree

The calltree shows the control flow of the fuzzer. This is overlaid with coverage information to display how much of the potential code a fuzzer can reach is in fact covered at runtime. In the following there is a link to a detailed calltree visualisation as well as a bitmap showing a high-level view of the calltree. For further information about these topics please see the glossary for full calltree and calltree overview

Call tree overview bitmap:

The distribution of callsites in terms of coloring is
Color Runtime hitcount Callsite count Percentage
red 0 781 78.3%
gold [1:9] 155 15.5%
yellow [10:29] 5 0.50%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 56 5.61%
All colors 997 100

Fuzz blockers

The followings are the branches where fuzzer fails to bypass.

Unique non-covered Complexity Unique Reachable Complexities Unique Reachable Functions All non-covered Complexity All Reachable Complexity Function Name Function Callsite Blocked Branch
2395 2568 18 :

['cleanfragments', 'strcmp', 'parseonchar', 'processinferences', 'processmodearg', 'ncurifragmentlookup', 'NCpathabsolute', 'ncuribuild', 'ncurisetpath', 'NC_s3urlrebuild', 'ncurifragmentparams', 'NCpathcanonical', 'processfragmentkeys', 'NC_iss3', 'nclistget', 'envvlist2string', 'processmacros', 'ncurisetfragments']

2395 3940 NC_infermodel call site: 00603 /src/netcdf-c/libdispatch/dinfermodel.c:879
362 380 2 :

['NC_testmode', 'ncurifree']

362 380 urlmodetest call site: 00000 /src/netcdf-c/libsrc/ncio.c:192
203 278 9 :

['strcmp', 'parseonchar', 'ncurisetprotocol', 'strdup', 'ncurifragmentparams', 'nclistpush', 'nclistget', 'parsepair', 'nclistnew']

203 356 processuri call site: 00605 /src/netcdf-c/libdispatch/dinfermodel.c:252
84 84 1 :

['readfile']

98 266 memio_open call site: 00000 /src/netcdf-c/libsrc/memio.c:349
58 58 2 :

['NC_readfileF', 'fclose']

58 58 NC_readfilen call site: 00155 /src/netcdf-c/libdispatch/dutil.c:272
42 42 1 :

['NC_var_shape']

42 42 NC_computeshapes call site: 00000 /src/netcdf-c/libsrc/v1hpg.c:1236
35 52 3 :

['parselist', 'nclistextract', 'nclistpush']

417 469 ncuriparse call site: 00295 /src/netcdf-c/libdispatch/ncuri.c:236
24 24 1 :

['writefile']

24 24 memio_close call site: 00000 /src/netcdf-c/libsrc/memio.c:523
20 20 1 :

['collectprefixparams']

505 626 ncuriparse call site: 00269 /src/netcdf-c/libdispatch/ncuri.c:187
16 16 1 :

['NC_check_vlen']

16 16 NC_check_vlens call site: 00000 /src/netcdf-c/libsrc/nc3internal.c:714
14 47 4 :

['strcasecmp', 'nclistremove', 'nclistpush', 'nclistget']

14 47 removedups call site: 00287 /src/netcdf-c/libdispatch/ncuri.c:1235
12 12 2 :

['free', 'freestringvec']

12 12 ncurifree call site: 00263 /src/netcdf-c/libdispatch/ncuri.c:466

Runtime coverage analysis

Covered functions
176
Functions that are reachable but not covered
142
Reachable functions
234
Percentage of reachable functions covered
39.32%
NB: The sum of covered functions and functions that are reachable but not covered need not be equal to Reachable functions . This is because the reachability analysis is an approximation and thus at runtime some functions may be covered that are not included in the reachability analysis. This is a limitation of our static analysis capabilities.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
fuzz/fuzz_open.c 1
libdispatch/dfile.c 3
liblib/nc_initialize.c 3
libdispatch/ddispatch.c 2
libsrc4/nc4internal.c 3
libdispatch/nclist.c 12
libdispatch/dpathmgr.c 10
libdispatch/dmissing.c 1
libdispatch/nclog.c 9
libdispatch/drc.c 27
libdispatch/ncbytes.c 10
libdispatch/dutil.c 6
libdispatch/ncuri.c 25
libdispatch/ds3util.c 3
libdispatch/dauth.c 1
libdispatch/doffsets.c 1
libsrc/nc3dispatch.c 2
libsrc4/nc4dispatch.c 2
libnczarr/zdispatch.c 2
libnczarr/zinternal.c 2
libnczarr/zprov.c 3
libnczarr/zarr.c 1
libnczarr/zfilter.c 2
libncpoco/ncpoco.c 1
libdispatch/dinfermodel.c 29
libdispatch/derror.c 1
libdispatch/nc.c 4
libdispatch/dhttp.c 21
libdispatch/nclistmgr.c 4

Analyses and suggestions

Optimal target analysis

Remaining optimal interesting functions

The following table shows a list of functions that are optimal targets. Optimal targets are identified by finding the functions that in combination, yield a high code coverage.

Func name Functions filename Arg count Args Function depth hitcount instr count bb count cyclomatic complexity Reachable functions Incoming references total cyclomatic complexity Unreached complexity
NCZ_open /src/netcdf-c/libnczarr/zopen.c 7 ['char *', 'int ', 'int ', 'size_t *', 'char *', 'struct.NC_Dispatch.160 *', 'int '] 11 0 133 24 9 408 0 3659 2814
NC3_put_vara /src/netcdf-c/build/libsrc/putget.c 6 ['int ', 'int ', 'size_t *', 'size_t *', 'char *', 'int '] 4 0 532 75 29 343 0 1911 1655
NC3_get_vara /src/netcdf-c/build/libsrc/putget.c 6 ['int ', 'int ', 'size_t *', 'size_t *', 'char *', 'int '] 4 0 516 73 28 304 0 1566 1424
NC3_open /src/netcdf-c/libsrc/nc3internal.c 7 ['char *', 'int ', 'int ', 'size_t *', 'char *', 'struct.NC_Dispatch.28 *', 'int '] 13 0 207 32 11 307 0 1918 828
NCZ_get_vara /src/netcdf-c/libnczarr/zvar.c 6 ['int ', 'int ', 'size_t *', 'size_t *', 'char *', 'int '] 8 0 36 3 2 305 0 2719 824
NC3_def_var_fill /src/netcdf-c/libsrc/var.c 4 ['int ', 'int ', 'int ', 'char *'] 8 0 194 30 13 266 0 1461 578
NC3_get_att /src/netcdf-c/build/libsrc/attr.c 5 ['int ', 'int ', 'char *', 'char *', 'int '] 6 0 341 42 11 221 0 1084 293

Implementing fuzzers that target the above functions will improve reachability such that it becomes:

Functions statically reachable by fuzzers
61.0%
1382 / 2248
Cyclomatic complexity statically reachable by fuzzers
69.0%
9952 / 14465

All functions overview

If you implement fuzzers for these functions, the status of all functions in the project will be:

Func name Functions filename Args Function call depth Reached by Fuzzers Fuzzers runtime hit Func lines hit % I Count BB Count Cyclomatic complexity Functions reached Reached by functions Accumulated cyclomatic complexity Undiscovered complexity

Files and Directories in report

This section shows which files and directories are considered in this report. The main reason for showing this is fuzz introspector may include more code in the reasoning than is desired. This section helps identify if too many files/directories are included, e.g. third party code, which may be irrelevant for the threat model. In the event too much is included, fuzz introspector supports a configuration file that can exclude data from the report. See the following link for more information on how to create a config file: link

Files in report

Source file Reached by Covered by
[] []
/src/netcdf-c/libnczarr/zattr.c [] []
/src/netcdf-c/libnczarr/zcvt.c [] []
/src/netcdf-c/libnczarr/ztype.c [] []
/src/netcdf-c/build/libsrc/putget.c [] []
/src/netcdf-c/libdispatch/nclist.c ['fuzz_open'] ['fuzz_open']
/src/netcdf-c/libdispatch/dauth.c ['fuzz_open'] []
/src/netcdf-c/libsrc4/nc4dispatch.c ['fuzz_open'] ['fuzz_open']
/src/netcdf-c/libnczarr/zmap_file.c [] []
/src/netcdf-c/libdispatch/ncuri.c ['fuzz_open'] ['fuzz_open']
/src/netcdf-c/libdispatch/dutf8.c [] []
/src/netcdf-c/libdispatch/ncbytes.c ['fuzz_open'] ['fuzz_open']
/src/netcdf-c/libnczarr/zutil.c [] []
/src/netcdf-c/libdispatch/dattput.c [] []
/src/netcdf-c/libdispatch/dnotnc4.c [] []
/src/netcdf-c/libnczarr/zdebug.c [] []
/src/netcdf-c/libdispatch/ds3util.c ['fuzz_open'] []
/src/netcdf-c/libsrc4/nc4grp.c [] []
/src/netcdf-c/libnczarr/zodom.c [] []
/src/netcdf-c/build/libsrc/attr.c [] []
/src/netcdf-c/libsrc/httpio.c [] []
/src/netcdf-c/libnczarr/zwalk.c [] []
/src/netcdf-c/libsrc4/nc4var.c [] []
/src/netcdf-c/libsrc4/nc4dim.c [] []
/src/netcdf-c/libnczarr/zmap.c [] []
/src/netcdf-c/libsrc/posixio.c [] []
/src/netcdf-c/libdispatch/nclog.c ['fuzz_open'] ['fuzz_open']
/src/netcdf-c/libnczarr/zarr.c ['fuzz_open'] ['fuzz_open']
/src/netcdf-c/libnczarr/zinternal.c ['fuzz_open'] ['fuzz_open']
/src/netcdf-c/libnczarr/zfilter.c ['fuzz_open'] ['fuzz_open']
/src/netcdf-c/libdispatch/ncexhash.c [] []
/src/netcdf-c/fuzz/fuzz_open.c ['fuzz_open'] ['fuzz_open']
/src/netcdf-c/libsrc4/ncfunc.c [] []
/src/netcdf-c/libsrc/nc3internal.c [] []
/src/netcdf-c/libsrc/v1hpg.c [] []
/src/netcdf-c/libnczarr/zxcache.c [] []
/src/netcdf-c/libdispatch/dhttp.c ['fuzz_open'] []
/src/netcdf-c/libnczarr/zdim.c [] []
/src/netcdf-c/libnczarr/zfile.c [] []
/src/netcdf-c/libdispatch/nchashmap.c [] []
/src/netcdf-c/libdispatch/nclistmgr.c ['fuzz_open'] ['fuzz_open']
/src/netcdf-c/libdispatch/dutil.c ['fuzz_open'] ['fuzz_open']
/src/netcdf-c/libdispatch/dpathmgr.c ['fuzz_open'] ['fuzz_open']
/src/netcdf-c/libdispatch/dcompound.c [] []
/src/netcdf-c/libnczarr/zvar.c [] []
/src/netcdf-c/libsrc/var.c [] []
/src/netcdf-c/libdispatch/dmissing.c ['fuzz_open'] ['fuzz_open']
/src/netcdf-c/libsrc/nc3dispatch.c ['fuzz_open'] ['fuzz_open']
/src/netcdf-c/libdispatch/dvarget.c [] []
/src/netcdf-c/libdispatch/ncjson.c [] []
/src/netcdf-c/libncpoco/ncpoco.c ['fuzz_open'] []
/src/netcdf-c/libdispatch/ddispatch.c ['fuzz_open'] ['fuzz_open']
/src/netcdf-c/libdispatch/dattget.c [] []
/src/netcdf-c/libnczarr/zsync.c [] []
/src/netcdf-c/libdispatch/utf8proc.c [] []
/src/netcdf-c/libdispatch/dgroup.c [] []
/src/netcdf-c/libdispatch/dinfermodel.c ['fuzz_open'] ['fuzz_open']
/src/netcdf-c/libdispatch/doffsets.c ['fuzz_open'] ['fuzz_open']
/src/netcdf-c/libdispatch/ncxcache.c [] []
/src/netcdf-c/libnczarr/zchunking.c [] []
/src/netcdf-c/libdispatch/dattinq.c [] []
/src/netcdf-c/libdispatch/dvarinq.c [] []
/src/netcdf-c/libdispatch/drc.c ['fuzz_open'] ['fuzz_open']
/src/netcdf-c/libdispatch/dstring.c [] []
/src/netcdf-c/libsrc4/nc4type.c [] []
/src/netcdf-c/libnczarr/zopen.c [] []
/src/netcdf-c/libsrc/mmapio.c [] []
/src/netcdf-c/libncpoco/cp_unix.c [] []
/src/netcdf-c/libnczarr/zgrp.c [] []
/src/netcdf-c/libnczarr/zprov.c ['fuzz_open'] ['fuzz_open']
/src/netcdf-c/libsrc/ncio.c [] []
/src/netcdf-c/libsrc/memio.c [] []
/src/netcdf-c/libsrc4/ncindex.c [] []
/src/netcdf-c/libsrc4/nc4attr.c [] []
/src/netcdf-c/libdispatch/derror.c ['fuzz_open'] []
/src/netcdf-c/libdispatch/ddim.c [] []
/src/netcdf-c/libdispatch/dinstance.c [] []
/src/netcdf-c/libsrc4/nc4internal.c ['fuzz_open'] ['fuzz_open']
/src/netcdf-c/libdispatch/dtype.c [] []
/src/netcdf-c/libdispatch/nc.c ['fuzz_open'] ['fuzz_open']
/src/netcdf-c/libdispatch/dvar.c [] []
/src/netcdf-c/libsrc/dim.c [] []
/src/netcdf-c/libnczarr/zdispatch.c ['fuzz_open'] ['fuzz_open']
/src/netcdf-c/libnczarr/zclose.c [] []
/src/netcdf-c/libdispatch/dfilter.c [] []
/src/netcdf-c/liblib/nc_initialize.c ['fuzz_open'] ['fuzz_open']
/src/netcdf-c/libdispatch/dvarput.c [] []
/src/netcdf-c/libnczarr/zcreate.c [] []
/src/netcdf-c/build/libsrc/ncx.c [] []
/src/netcdf-c/libdispatch/dfile.c ['fuzz_open'] ['fuzz_open']
/src/netcdf-c/libdispatch/dcrc64.c [] []

Directories in report

Directory
/src/netcdf-c/fuzz/
/src/netcdf-c/libdispatch/
/src/netcdf-c/libncpoco/
/src/netcdf-c/libsrc4/
/src/netcdf-c/libsrc/
/src/netcdf-c/liblib/
/src/netcdf-c/libnczarr/
/src/netcdf-c/build/libsrc/