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 580 73.0%
gold [1:9] 152 19.1%
yellow [10:29] 10 1.25%
greenyellow [30:49] 36 4.53%
lawngreen 50+ 16 2.01%
All colors 794 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
2219 2380 18 :

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

2219 2854 NC_infermodel call site /src/netcdf-c/libdispatch/dinfermodel.c:837
366 373 9 :

['calloc', 'strdup', 'strlen', 'ensurequerylist', 'strchr', 'strcmp', 'nclocate', 'ensurefraglist', 'ncuridecode']

378 413 ncuriparse call site /src/netcdf-c/libdispatch/ncuri.c:251
202 277 9 :

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

202 355 processuri call site /src/netcdf-c/libdispatch/dinfermodel.c:245
101 119 2 :

['locate', 'rehash']

101 119 NC_hashmapadd call site /src/netcdf-c/libdispatch/nchashmap.c:205
84 84 1 :

['readfile']

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

['NC_readfileF', 'fclose']

58 58 NC_readfilen call site /src/netcdf-c/libdispatch/dutil.c:272
35 52 3 :

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

415 467 ncuriparse call site /src/netcdf-c/libdispatch/ncuri.c:236
24 24 1 :

['writefile']

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

['collectprefixparams']

503 624 ncuriparse call site /src/netcdf-c/libdispatch/ncuri.c:187
17 33 5 :

['nclistfree', 'ncpsharedlibfree', 'NCZ_unload_plugin', 'nclistget', 'free']

17 33 NCZ_filter_finalize call site /src/netcdf-c/libnczarr/zfilter.c:770
14 47 4 :

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

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

['freestringvec', 'free']

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

Runtime coverage analysis

Covered functions
173
Functions that are reachable but not covered
105
Reachable functions
196
Percentage of reachable functions covered
46.43%
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 11
libdispatch/dpathmgr.c 10
libdispatch/dstring.c 1
libdispatch/nclog.c 7
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 28
libdispatch/derror.c 1
libdispatch/nc.c 4
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.138 *', 'int '] 15 0 133 24 9 402 0 3593 2794
NC3_put_vara /src/netcdf-c/build/libsrc/putget.c 6 ['int ', 'int ', 'size_t *', 'size_t *', 'char *', 'int '] 5 0 532 75 29 343 0 1911 1657
NC3_get_vara /src/netcdf-c/build/libsrc/putget.c 6 ['int ', 'int ', 'size_t *', 'size_t *', 'char *', 'int '] 5 0 516 73 28 304 0 1566 1424
NCZ_get_vara /src/netcdf-c/libnczarr/zvar.c 6 ['int ', 'int ', 'size_t *', 'size_t *', 'char *', 'int '] 12 0 36 3 2 305 0 2718 826
NC3_open /src/netcdf-c/libsrc/nc3internal.c 7 ['char *', 'int ', 'int ', 'size_t *', 'char *', 'struct.NC_Dispatch.16 *', 'int '] 9 0 207 32 11 181 0 994 766
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.64%
1406/2281
Cyclomatic complexity statically reachable by fuzzers
68.5%
9766 / 14257

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

Directories in report

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