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*'] 11 0 78 8 11 761 0 2576 2522
ncclCommInitRankConfig /src/nccl/src/init.cc 5 ['ncclComm_t*', 'int', 'ncclUniqueId', 'int', 'ncclConfig_t*'] 18 0 26 5 8 489 0 1664 1350
rasSockEventLoop /src/nccl/src/ras/rasnet.cc 2 ['struct rasSocket*', 'int'] 21 0 76 22 26 179 1 883 747
ncclProxyProgress /src/nccl/src/proxy.cc 1 ['void*'] 5 0 48 12 23 64 0 156 147
ncclIbInit /src/nccl/src/transport/net_ib.cc 2 ['ncclDebugLogger_t', 'ncclProfilerCallback_t'] 5 0 142 26 50 114 0 191 145
ncclIbAccept /src/nccl/src/transport/net_ib.cc 2 ['void*', 'void**'] 8 0 202 25 39 142 0 255 133
ncclProxyService /src/nccl/src/proxy.cc 1 ['void*'] 8 0 130 29 47 151 0 295 107
ncclDebugLog /src/nccl/src/debug.cc 5 ['ncclDebugLogLevel', 'unsigned long', 'char*', 'int', 'char*'] 4 0 80 21 27 37 0 107 107
commReclaim /src/nccl/src/init.cc 1 ['struct ncclAsyncJob*'] 13 0 27 6 8 178 0 309 94
ncclEnqueueCheck /src/nccl/src/enqueue.cc 1 ['struct ncclInfo*'] 18 0 28 5 7 469 9 1640 91

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

Functions statically reachable by fuzzers
46.0%
912 / 1993
Cyclomatic complexity statically reachable by fuzzers
67.0%
5497 / 8264

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, ncclCommInitRankConfig, 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 ncclCommInitRankConfig */
  UNKNOWN_TYPE unknown_1;
  int new_var2 = ada_safe_get_int();
  UNKNOWN_TYPE unknown_3;
  int new_var4 = ada_safe_get_int();
  UNKNOWN_TYPE unknown_5;
  ncclCommInitRankConfig(unknown_1, new_var2, unknown_3, new_var4, unknown_5);

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

  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_var6 = calloc(sizeof(structrasSocket), 1);
  int new_var7 = ada_safe_get_int();
  rasSockEventLoop(new_var6, new_var7);

  af_safe_gb_cleanup();
}

proxy.cc

Target file: /src/nccl/src/proxy.cc
Target functions: ncclProxyProgress, ncclProxyService
#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_8;
  ncclProxyProgress(unknown_8);

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

  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_9;
  UNKNOWN_TYPE unknown_10;
  ncclIbInit(unknown_9, unknown_10);

  /* target ncclIbAccept */
  UNKNOWN_TYPE unknown_11;
  UNKNOWN_TYPE unknown_12;
  ncclIbAccept(unknown_11, unknown_12);

  af_safe_gb_cleanup();
}

debug.cc

Target file: /src/nccl/src/debug.cc
Target functions: ncclDebugLog
#include "ada_fuzz_header.h"

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

  /* target ncclDebugLog */
  UNKNOWN_TYPE unknown_14;
  UNKNOWN_TYPE unknown_15;
  char *new_var16 = ada_safe_get_char_p();
  int new_var17 = ada_safe_get_int();
  char *new_var18 = ada_safe_get_char_p();
  ncclDebugLog(unknown_14, unknown_15, new_var16, new_var17, new_var18);

  af_safe_gb_cleanup();
}

enqueue.cc

Target file: /src/nccl/src/enqueue.cc
Target functions: ncclEnqueueCheck
#include "ada_fuzz_header.h"

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

  /* target ncclEnqueueCheck */
  structncclInfo* new_var20 = calloc(sizeof(structncclInfo), 1);
  ncclEnqueueCheck(new_var20);

  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/include/nvtx3/nvToolsExt.h [] []
/src/nccl/src/plugin/net/net_v6.cc [] []
/src/nccl/src/include/cpuset.h [] []
/src/nccl/src/graph/tuning.cc [] []
/src/nccl/src/device/common.h [] []
/src/nccl/src/include/nvtx3/nvToolsExtPayloadHelper.h [] []
/src/nccl/src/transport.cc [] []
/src/nccl/src/transport/generic.cc [] []
/src/nccl/src/include/nvtx3/nvtxDetail/nvtxImplCore.h [] []
/src/nccl/src/plugin/profiler.cc [] []
/src/nccl/src/transport/coll_net.cc [] []
/src/nccl/src/plugin/net/net_v7.cc [] []
/src/nccl/src/ras/collectives.cc [] []
/src/nccl/src/graph/xml.cc ['/src/fuzz_xml.cpp'] []
/src/nccl/src/include/nvtx_payload_schemas.h [] []
/src/nccl/src/include/alloc.h [] []
/src/nccl/src/include/nvtx3/nvtxDetail/nvtxExtPayloadTypeInfo.h [] []
/src/fuzz_xml.cpp ['/src/fuzz_xml.cpp'] []
/src/nccl/src/include/group.h [] []
/src/nccl/src/graph/paths.cc [] []
/src/nccl/src/symmetric.cc [] []
/src/nccl/src/include/param.h [] []
/src/nccl/src/misc/param.cc [] []
/src/nccl/src/debug.cc [] []
/src/nccl/src/plugin/tuner/tuner_v2.cc [] []
/src/nccl/src/include/gdrwrap.h [] []
/src/nccl/src/graph/xml.h [] []
/src/nccl/src/transport/net.cc [] []
/src/nccl/ext-tuner/example/plugin.c [] []
/src/nccl/src/plugin/plugin_open.cc [] []
/src/nccl/src/plugin/tuner.cc [] []
/src/nccl/src/include/register_inline.h [] []
/src/nccl/src/include/comm.h [] []
/src/nccl/src/plugin/net/net_v10.cc [] []
/src/nccl/src/include/utils.h [] []
/src/nccl/src/channel.cc [] []
/src/nccl/src/ras/peers.cc [] []
/src/nccl/src/include/nvtx3/nvtxDetail/nvtxExtImplPayload_v1.h [] []
/src/nccl/src/plugin/tuner/tuner_v3.cc [] []
/src/nccl/src/enhcompat.cc [] []
/src/nccl/src/ras/client_support.cc [] []
/src/nccl/src/device/reduce_kernel.h [] []
/src/nccl/src/ras/ras_internal.h [] []
/src/nccl/src/misc/ibvsymbols.cc [] []
/src/nccl/src/include/nvtx3/nvtxDetail/nvtxImplCudaRt_v3.h [] []
/src/nccl/src/bootstrap.cc [] []
/src/nccl/ext-profiler/example/event.c [] []
/src/nccl/src/misc/strongstream.cc [] []
/src/nccl/src/misc/nvmlwrap.cc [] []
/src/nccl/src/plugin/net.cc [] []
/src/nccl/src/include/device.h [] []
/src/nccl/src/group.cc [] []
/src/nccl/src/enqueue.cc [] []
/src/nccl/src/misc/cudawrap.cc [] []
/src/nccl/src/include/nvtx.h [] []
/src/nccl/src/include/nvtx3/nvtxDetail/nvtxImplSync_v3.h [] []
/src/nccl/src/misc/shmutils.cc [] []
/src/nccl/src/ras/client.cc [] []
/src/nccl/src/include/nvtx3/nvtx3.hpp [] []
/src/nccl/src/transport/p2p.cc [] []
/src/nccl/src/init_nvtx.cc [] []
/src/nccl/src/misc/ibvwrap.cc [] []
/src/nccl/src/misc/gdrwrap.cc [] []
/src/nccl/src/plugin/net/net_v9.cc [] []
/src/nccl/src/plugin/net/net_v8.cc [] []
/src/nccl/src/misc/utils.cc [] []
/src/nccl/src/include/nvtx3/nvtxDetail/nvtxExtImplCounters_v1.h [] []
/src/nccl/src/include/nvtx3/nvtxDetail/nvtxImpl.h [] []
/src/nccl/src/device/sendrecv.h [] []
/src/nccl/src/device/common_kernel.h [] []
/src/nccl/src/plugin/profiler/profiler_v3.cc [] []
/src/nccl/src/misc/argcheck.cc [] []
/src/nccl/src/include/collectives.h [] []
/src/nccl/src/mnnvl.cc [] []
/src/nccl/src/include/bitops.h [] []
/src/nccl/src/include/nvtx3/nvToolsExtPayload.h [] []
/src/nccl/src/graph/trees.cc [] []
/src/nccl/src/register/register.cc [] []
/src/nccl/src/register/coll_reg.cc [] []
/src/nccl/src/include/strongstream.h [] []
/src/nccl/src/transport/nvls.cc [] []
/src/nccl/src/include/core.h [] []
/src/nccl/src/misc/ipcsocket.cc [] []
/src/nccl/src/misc/mlx5dvwrap.cc [] []
/src/nccl/src/allocator.cc [] []
/src/nccl/src/transport/shm.cc [] []
/src/nccl/src/misc/mlx5dvsymbols.cc [] []
/src/nccl/src/ras/ras.cc [] []
/src/nccl/src/device/op128.h [] []
/src/nccl/src/include/timer.h [] []
/src/nccl/src/transport/net_ib.cc [] []
/src/nccl/src/include/nvtx3/nvtxDetail/nvtxImplOpenCL_v3.h [] []
/src/nccl/src/graph/connect.cc [] []
/src/nccl/src/include/enqueue.h [] []
/src/nccl/src/include/cudawrap.h [] []
/src/nccl/src/include/coll_net.h [] []
/src/nccl/ext-profiler/example/plugin.c [] []
/src/nccl/src/include/channel.h [] []
/src/nccl/src/plugin/tuner/tuner_v4.cc [] []
/src/nccl/src/device/all_reduce.h [] []
/src/nccl/src/transport/net_socket.cc [] []
/src/nccl/src/plugin/profiler/profiler_v1.cc [] []
/src/nccl/ext-net/example/plugin.c [] []
/src/nccl/src/include/nvtx3/nvtxDetail/nvtxImplCuda_v3.h [] []
/src/nccl/src/graph/search.cc [] []
/src/nccl/src/device/reduce_scatter.h [] []
/src/nccl/src/init.cc [] []
/src/nccl/src/plugin/profiler/profiler_v4.cc [] []
/src/nccl/src/include/nvtx3/nvtxDetail/nvtxExtPayloadHelperInternal.h [] []
/src/nccl/src/device/network/unpack/unpack.h [] []
/src/nccl/src/device/prims_simple.h [] []
/src/nccl/src/plugin/profiler/profiler_v2.cc [] []
/src/nccl/src/include/ibvwrap.h [] []
/src/nccl/src/include/nvmlwrap.h [] []
/src/nccl/src/register/sendrecv_reg.cc [] []
/src/nccl/src/device/primitives.h [] []
/src/nccl/src/misc/socket.cc [] []
/src/nccl/src/transport/profiler.cc [] []
/src/nccl/src/ras/rasnet.cc [] []
/src/nccl/src/collectives.cc [] []
/src/nccl/src/proxy.cc [] []
/src/nccl/src/include/checks.h [] []
/src/nccl/src/include/symmetric.h [] []
/src/nccl/src/include/nvtx3/nvtxDetail/nvtxExtHelperMacros.h [] []
/src/nccl/src/include/ibvcore.h [] []
/src/nccl/src/device/prims_ll.h [] []
/src/nccl/src/include/nvtx3/nvtxDetail/nvtxExtImplMem_v1.h [] []
/src/nccl/src/graph/topo.cc [] []
/src/nccl/src/include/debug.h [] []
/src/nccl/src/graph/topo.h [] []
/src/nccl/src/device/prims_ll128.h [] []
/src/nccl/ext-profiler/example/print_event.c [] []
/src/nccl/src/include/nvtx3/nvtxDetail/nvtxExtInit.h [] []
/src/nccl/src/include/nvtx3/nvtxDetail/nvtxExtImplMemCudaRt_v1.h [] []
/src/nccl/src/graph/rings.cc [] []

Directories in report

Directory
/src/nccl/src/plugin/tuner/
/src/nccl/src/ras/
/src/nccl/ext-net/example/
/src/nccl/ext-tuner/example/
/src/nccl/src/include/
/src/nccl/src/include/nvtx3/
/src/nccl/ext-profiler/example/
/src/nccl/src/transport/
/src/nccl/src/misc/
/src/nccl/src/plugin/
/src/nccl/src/include/nvtx3/nvtxDetail/
/src/nccl/src/device/network/unpack/
/src/nccl/src/device/
/src/
/src/nccl/src/register/
/src/nccl/src/plugin/net/
/src/nccl/src/graph/
/src/nccl/src/plugin/profiler/
/src/nccl/src/