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

Project functions overview

The following table shows data about each function in the project. The functions included in this table correspond to all functions that exist in the executables of the fuzzers. As such, there may be functions that are from third-party libraries.

For further technical details on the meaning of columns in the below table, please see the Glossary .

Func name Functions filename Args Function call depth Reached by Fuzzers Runtime reached by Fuzzers Combined 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

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
ncclCommInitRankFunc /src/nccl/src/init.cc 1 ['struct ncclAsyncJob*'] 12 0 74 7 10 787 0 2640 2585
allReduce /src/nccl/examples/04_user_buffer_registration/01_allreduce/main.cc 4 ['int', 'int', 'int', 'int'] 23 0 61 9 11 635 0 2147 1769
rasSockEventLoop /src/nccl/src/ras/rasnet.cc 2 ['struct rasSocket*', 'int'] 22 0 76 22 26 179 1 885 747
ncclIbInit /src/nccl/src/transport/net_ib.cc 5 ['void**', 'uint64_t', 'ncclNetCommConfig_t*', 'ncclDebugLogger_t', 'ncclProfilerCallback_t'] 4 0 153 29 54 116 0 204 157
commReclaim /src/nccl/src/init.cc 1 ['struct ncclAsyncJob*'] 18 0 27 6 8 209 0 391 153
ncclProxyProgress /src/nccl/src/proxy.cc 1 ['void*'] 5 0 48 12 23 65 0 160 150
ncclIbAccept /src/nccl/src/transport/net_ib.cc 2 ['void*', 'void**'] 8 0 202 25 39 140 0 256 131

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

Functions statically reachable by fuzzers
43.0%
979 / 2279
Cyclomatic complexity statically reachable by fuzzers
63.0%
5747 / 9080

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 Runtime reached by Fuzzers Combined 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

Fuzz driver synthesis

New fuzzers

The below fuzzers are templates and suggestions for how to target the set of optimal functions above

init.cc

Target file: /src/nccl/src/init.cc
Target functions: ncclCommInitRankFunc, commReclaim
#include "ada_fuzz_header.h"

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  af_safe_gb_init(data, size);

  /* target ncclCommInitRankFunc */
  structncclAsyncJob* new_var0 = calloc(sizeof(structncclAsyncJob), 1);
  ncclCommInitRankFunc(new_var0);

  /* target commReclaim */
  structncclAsyncJob* new_var12 = calloc(sizeof(structncclAsyncJob), 1);
  commReclaim(new_var12);

  af_safe_gb_cleanup();
}

main.cc

Target file: /src/nccl/examples/04_user_buffer_registration/01_allreduce/main.cc
Target functions: allReduce
#include "ada_fuzz_header.h"

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  af_safe_gb_init(data, size);

  /* target allReduce */
  int new_var1 = ada_safe_get_int();
  int new_var2 = ada_safe_get_int();
  int new_var3 = ada_safe_get_int();
  int new_var4 = ada_safe_get_int();
  allReduce(new_var1, new_var2, new_var3, new_var4);

  af_safe_gb_cleanup();
}

rasnet.cc

Target file: /src/nccl/src/ras/rasnet.cc
Target functions: rasSockEventLoop
#include "ada_fuzz_header.h"

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  af_safe_gb_init(data, size);

  /* target rasSockEventLoop */
  structrasSocket* new_var5 = calloc(sizeof(structrasSocket), 1);
  int new_var6 = ada_safe_get_int();
  rasSockEventLoop(new_var5, new_var6);

  af_safe_gb_cleanup();
}

net_ib.cc

Target file: /src/nccl/src/transport/net_ib.cc
Target functions: ncclIbInit, ncclIbAccept
#include "ada_fuzz_header.h"

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  af_safe_gb_init(data, size);

  /* target ncclIbInit */
  UNKNOWN_TYPE unknown_7;
  UNKNOWN_TYPE unknown_8;
  UNKNOWN_TYPE unknown_9;
  UNKNOWN_TYPE unknown_10;
  UNKNOWN_TYPE unknown_11;
  ncclIbInit(unknown_7, unknown_8, unknown_9, unknown_10, unknown_11);

  /* target ncclIbAccept */
  UNKNOWN_TYPE unknown_14;
  UNKNOWN_TYPE unknown_15;
  ncclIbAccept(unknown_14, unknown_15);

  af_safe_gb_cleanup();
}

proxy.cc

Target file: /src/nccl/src/proxy.cc
Target functions: ncclProxyProgress
#include "ada_fuzz_header.h"

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  af_safe_gb_init(data, size);

  /* target ncclProxyProgress */
  UNKNOWN_TYPE unknown_13;
  ncclProxyProgress(unknown_13);

  af_safe_gb_cleanup();
}

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/nccl/src/enqueue.cc [] []
/src/nccl/src/debug.cc [] []
/src/nccl/src/include/nccl_device/impl/mem_barrier__funcs.h [] []
/src/nccl/src/device/reduce_kernel.h [] []
/src/nccl/src/ras/ras_internal.h [] []
/src/nccl/src/register/coll_reg.cc [] []
/src/nccl/src/plugin/profiler/profiler_v5.cc [] []
/src/nccl/src/graph/topo.h [] []
/src/nccl/src/plugin/net/net_v9.cc [] []
/src/nccl/src/include/nvtx.h [] []
/src/nccl/src/include/nvtx3/nvtxDetail/nvtxExtPayloadTypeInfo.h [] []
/src/nccl/src/init_nvtx.cc [] []
/src/nccl/src/misc/strongstream.cc [] []
/src/nccl/ext-profiler/example/plugin.cc [] []
/src/nccl/ext-tuner/example/test/test_plugin.c [] []
/src/nccl/src/include/nvtx3/nvtxDetail/nvtxExtImplMemCudaRt_v1.h [] []
/src/nccl/src/include/nvtx3/nvtxDetail/nvtxImplCudaRt_v3.h [] []
/src/nccl/src/graph/connect.cc [] []
/src/nccl/src/device/all_reduce.h [] []
/src/nccl/src/sym_kernels.cc [] []
/src/nccl/src/include/allocator.h [] []
/src/nccl/src/enhcompat.cc [] []
/src/nccl/src/include/nvtx3/nvToolsExt.h [] []
/src/nccl/src/include/nccl_device/impl/ptr__funcs.h [] []
/src/nccl/src/graph/xml.h [] []
/src/nccl/src/include/nvmlwrap.h [] []
/src/nccl/src/graph/trees.cc [] []
/src/nccl/src/include/nccl_device/impl/mem_barrier__types.h [] []
/src/nccl/src/init.cc [] []
/src/nccl/src/device/sendrecv.h [] []
/src/nccl/src/transport/net.cc [] []
/src/nccl/src/device/reduce_scatter.h [] []
/src/nccl/src/include/nvtx_payload_schemas.h [] []
/src/nccl/src/proxy.cc [] []
/src/nccl/src/misc/ibvwrap.cc [] []
/src/nccl/src/transport/nvls.cc [] []
/src/nccl/src/plugin/tuner/tuner_v4.cc [] []
/src/nccl/src/ras/rasnet.cc [] []
/src/nccl/src/graph/xml.cc ['/src/fuzz_xml.cpp'] []
/src/nccl/src/include/register_inline.h [] []
/src/nccl/src/device/prims_simple.h [] []
/src/nccl/src/transport/net_ib.cc [] []
/src/nccl/src/include/channel.h [] []
/src/nccl/src/allocator.cc [] []
/src/nccl/src/include/bitops.h [] []
/src/nccl/src/include/device.h [] []
/src/nccl/src/device/prims_ll.h [] []
/src/nccl/src/graph/tuning.cc [] []
/src/nccl/src/plugin/profiler/profiler_v1.cc [] []
/src/nccl/src/include/enqueue.h [] []
/src/nccl/src/device/network/unpack/unpack.h [] []
/src/nccl/src/include/nvtx3/nvtxDetail/nvtxExtHelperMacros.h [] []
/src/nccl/src/channel.cc [] []
/src/nccl/src/include/cudawrap.h [] []
/src/nccl/ext-profiler/example/print_event.cc [] []
/src/nccl/src/include/nccl_device/impl/ll_a2a__types.h [] []
/src/nccl/src/include/debug.h [] []
/src/nccl/src/include/group.h [] []
/src/nccl/src/include/sym_kernels.h [] []
/src/nccl/src/include/core.h [] []
/src/nccl/ext-profiler/example/event.h [] []
/src/nccl/src/plugin/net/net_v10.cc [] []
/src/nccl/src/plugin/profiler/profiler_v3.cc [] []
/src/nccl/src/include/nvtx3/nvtxDetail/nvtxImplOpenCL_v3.h [] []
/src/nccl/src/include/nccl_device/impl/core__funcs.h [] []
/src/nccl/src/ras/client.cc [] []
/src/nccl/src/ras/client_support.cc [] []
/src/nccl/src/include/nvtx3/nvtxDetail/nvtxExtImplMem_v1.h [] []
/src/nccl/src/scheduler/symmetric_sched.cc [] []
/src/nccl/src/include/collectives.h [] []
/src/nccl/src/include/nccl_device/ll_a2a.h [] []
/src/nccl/src/transport/coll_net.cc [] []
/src/nccl/src/misc/socket.cc [] []
/src/nccl/src/dev_runtime.cc [] []
/src/nccl/src/group.cc [] []
/src/nccl/src/plugin/tuner/tuner_v3.cc [] []
/src/nccl/src/ras/ras.cc [] []
/src/nccl/src/device/common.h [] []
/src/nccl/src/misc/cudawrap.cc [] []
/src/nccl/src/misc/utils.cc [] []
/src/nccl/ext-tuner/basic/plugin.c [] []
/src/nccl/src/plugin/net/net_v7.cc [] []
/src/nccl/src/include/nvtx3/nvtx3.hpp [] []
/src/nccl/src/include/nvtx3/nvtxDetail/nvtxImplCuda_v3.h [] []
/src/nccl/src/graph/search.cc [] []
/src/nccl/src/transport/profiler.cc [] []
/src/nccl/src/misc/gdrwrap.cc [] []
/src/nccl/src/plugin/tuner.cc [] []
/src/nccl/src/include/ibvwrap.h [] []
/src/nccl/src/misc/argcheck.cc [] []
/src/nccl/src/ras/peers.cc [] []
/src/nccl/examples/common/src/utils.cc [] []
/src/nccl/src/plugin/profiler/profiler_v2.cc [] []
/src/nccl/src/include/ibvcore.h [] []
/src/nccl/src/transport/net_socket.cc [] []
/src/nccl/src/include/strongstream.h [] []
/src/nccl/src/plugin/net/net_v11.cc [] []
/src/nccl/src/include/coll_net.h [] []
/src/nccl/src/include/gdrwrap.h [] []
/src/nccl/src/include/comm.h [] []
/src/nccl/src/transport/generic.cc [] []
/src/nccl/src/include/nccl_device/utility.h [] []
/src/nccl/src/misc/shmutils.cc [] []
/src/nccl/src/plugin/profiler/profiler_v4.cc [] []
/src/nccl/src/transport.cc [] []
/src/nccl/src/graph/rings.cc [] []
/src/nccl/src/include/nvtx3/nvtxDetail/nvtxExtImplCounters_v1.h [] []
/src/nccl/src/include/nvtx3/nvtxDetail/nvtxImpl.h [] []
/src/nccl/src/plugin/tuner/tuner_v2.cc [] []
/src/nccl/src/ce_coll.cc [] []
/src/nccl/examples/common/include/mpi_utils.h [] []
/src/nccl/src/include/timer.h [] []
/src/nccl/src/plugin/net.cc [] []
/src/nccl/src/plugin/net/net_v6.cc [] []
/src/nccl/src/transport/p2p.cc [] []
/src/nccl/src/include/param.h [] []
/src/nccl/src/collectives.cc [] []
/src/nccl/src/device/primitives.h [] []
/src/nccl/src/misc/param.cc [] []
/src/nccl/examples/02_point_to_point/01_ring_pattern/main.cc [] []
/src/nccl/src/bootstrap.cc [] []
/src/nccl/src/transport/shm.cc [] []
/src/nccl/src/graph/paths.cc [] []
/src/nccl/examples/01_communicators/02_one_device_per_pthread/main.cc [] []
/src/nccl/examples/04_user_buffer_registration/01_allreduce/main.cc [] []
/src/nccl/src/include/nccl_device/mem_barrier.h [] []
/src/nccl/ext-profiler/example/queue.h [] []
/src/nccl/src/include/cpuset.h [] []
/src/nccl/examples/01_communicators/03_one_device_per_process_mpi/main.cc [] []
/src/nccl/src/include/nccl_device/coop.h [] []
/src/nccl/src/device/op128.h [] []
/src/nccl/src/include/nvtx3/nvtxDetail/nvtxExtImplPayload_v1.h [] []
/src/nccl/src/include/utils.h [] []
/src/nccl/src/nccl_device/core.cc [] []
/src/nccl/src/nccl_device/ll_a2a.cc [] []
/src/nccl/ext-tuner/example/plugin.c [] []
/src/nccl/src/include/nvtx3/nvToolsExtPayload.h [] []
/src/nccl/src/mnnvl.cc [] []
/src/nccl/src/include/nvtx3/nvtxDetail/nvtxExtPayloadHelperInternal.h [] []
/src/nccl/src/include/nvtx3/nvtxDetail/nvtxExtInit.h [] []
/src/nccl/src/device/prims_ll128.h [] []
/src/nccl/src/ras/collectives.cc [] []
/src/nccl/src/misc/ipcsocket.cc [] []
/src/nccl/src/plugin/plugin_open.cc [] []
/src/nccl/src/include/nvtx3/nvToolsExtPayloadHelper.h [] []
/src/nccl/src/misc/mlx5dvsymbols.cc [] []
/src/nccl/src/misc/mlx5dvwrap.cc [] []
/src/nccl/src/nccl_device/mem_barrier.cc [] []
/src/nccl/src/include/nvtx3/nvtxDetail/nvtxImplCore.h [] []
/src/nccl/src/include/nccl_device/impl/ll_a2a__funcs.h [] []
/src/nccl/src/misc/nvmlwrap.cc [] []
/src/nccl/src/include/nvtx3/nvtxDetail/nvtxImplSync_v3.h [] []
/src/nccl/src/plugin/tuner/tuner_v5.cc [] []
/src/nccl/src/register/sendrecv_reg.cc [] []
/src/nccl/src/device/common_kernel.h [] []
/src/nccl/src/graph/topo.cc [] []
/src/nccl/src/plugin/profiler.cc [] []
/src/nccl/src/include/checks.h [] []
/src/fuzz_xml.cpp ['/src/fuzz_xml.cpp'] []
/src/nccl/ext-net/example/plugin.c [] []
/src/nccl/src/include/alloc.h [] []
/src/nccl/src/plugin/net/net_v8.cc [] []
/src/nccl/src/misc/ibvsymbols.cc [] []
/src/nccl/src/register/register.cc [] []

Directories in report

Directory
/src/nccl/src/ras/
/src/nccl/src/transport/
/src/nccl/ext-profiler/example/
/src/nccl/src/misc/
/src/nccl/src/nccl_device/
/src/nccl/src/device/network/unpack/
/src/nccl/src/plugin/net/
/src/nccl/src/include/nccl_device/
/src/nccl/src/scheduler/
/src/nccl/src/plugin/profiler/
/src/nccl/src/graph/
/src/nccl/examples/04_user_buffer_registration/01_allreduce/
/src/nccl/ext-tuner/basic/
/src/nccl/examples/01_communicators/02_one_device_per_pthread/
/src/nccl/src/register/
/src/nccl/src/include/nvtx3/nvtxDetail/
/src/nccl/examples/01_communicators/03_one_device_per_process_mpi/
/src/nccl/src/include/
/src/nccl/src/include/nvtx3/
/src/nccl/ext-net/example/
/src/nccl/src/plugin/tuner/
/src/nccl/examples/common/include/
/src/nccl/src/include/nccl_device/impl/
/src/nccl/ext-tuner/example/test/
/src/
/src/nccl/src/device/
/src/nccl/src/
/src/nccl/ext-tuner/example/
/src/nccl/examples/02_point_to_point/01_ring_pattern/
/src/nccl/src/plugin/
/src/nccl/examples/common/src/