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
CreateFFVideoSource /src/ffms2/src/avisynth/avisynth.cpp 3 ['AVSValue', 'void*', 'IScriptEnvironment*'] 9 0 60 20 23 213 0 479 448
CreateFFAudioSource /src/ffms2/src/avisynth/avisynth.cpp 3 ['AVSValue', 'void*', 'IScriptEnvironment*'] 9 0 64 19 29 168 0 196 143
CreateSource /src/ffms2/src/vapoursynth/vapoursynth4.cpp 4 ['VSMap*', 'VSMap*', 'VSCore*', 'VSAPI*'] 9 0 73 24 29 212 0 419 81
FFMS_VideoSource::GetFrame /src/ffms2/src/core/videosource.cpp 1 ['int'] 6 0 52 15 30 88 1 228 48
FFMS_AudioSource::GetAudio /src/ffms2/src/core/audiosource.cpp 3 ['void*', 'int64_t', 'int64_t'] 6 0 47 10 27 49 0 81 44
ZipFile::Read /src/ffms2/src/core/zipfile.cpp 2 ['void*', 'size_t'] 2 0 39 14 20 11 4 40 40

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

Functions statically reachable by fuzzers
35.0%
110 / 312
Cyclomatic complexity statically reachable by fuzzers
64.0%
819 / 1279

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

avisynth.cpp

Target file: /src/ffms2/src/avisynth/avisynth.cpp
Target functions: CreateFFVideoSource, CreateFFAudioSource
#include "ada_fuzz_header.h"

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

  /* target CreateFFVideoSource */
  UNKNOWN_TYPE unknown_0;
  UNKNOWN_TYPE unknown_1;
  UNKNOWN_TYPE unknown_2;
  CreateFFVideoSource(unknown_0, unknown_1, unknown_2);

  /* target CreateFFAudioSource */
  UNKNOWN_TYPE unknown_3;
  UNKNOWN_TYPE unknown_4;
  UNKNOWN_TYPE unknown_5;
  CreateFFAudioSource(unknown_3, unknown_4, unknown_5);

  af_safe_gb_cleanup();
}

vapoursynth4.cpp

Target file: /src/ffms2/src/vapoursynth/vapoursynth4.cpp
Target functions: CreateSource
#include "ada_fuzz_header.h"

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

  /* target CreateSource */
  UNKNOWN_TYPE unknown_6;
  UNKNOWN_TYPE unknown_7;
  UNKNOWN_TYPE unknown_8;
  UNKNOWN_TYPE unknown_9;
  CreateSource(unknown_6, unknown_7, unknown_8, unknown_9);

  af_safe_gb_cleanup();
}

videosource.cpp

Target file: /src/ffms2/src/core/videosource.cpp
Target functions: FFMS_VideoSource::GetFrame
#include "ada_fuzz_header.h"

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

  /* target FFMS_VideoSource::GetFrame */
  int new_var10 = ada_safe_get_int();
  FFMS_VideoSource::GetFrame(new_var10);

  af_safe_gb_cleanup();
}

audiosource.cpp

Target file: /src/ffms2/src/core/audiosource.cpp
Target functions: FFMS_AudioSource::GetAudio
#include "ada_fuzz_header.h"

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

  /* target FFMS_AudioSource::GetAudio */
  UNKNOWN_TYPE unknown_11;
  UNKNOWN_TYPE unknown_12;
  UNKNOWN_TYPE unknown_13;
  FFMS_AudioSource::GetAudio(unknown_11, unknown_12, unknown_13);

  af_safe_gb_cleanup();
}

zipfile.cpp

Target file: /src/ffms2/src/core/zipfile.cpp
Target functions: ZipFile::Read
#include "ada_fuzz_header.h"

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

  /* target ZipFile::Read */
  UNKNOWN_TYPE unknown_14;
  UNKNOWN_TYPE unknown_15;
  ZipFile::Read(unknown_14, unknown_15);

  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/ffms2/src/core/track.h ['ffms2_fuzzer.cc'] []
/src/ffms2/src/core/videosource.h [] []
/src/ffms2/src/index/ffmsindex.cpp ['ffms2_fuzzer.cc'] []
/src/ffms2/src/core/utils.h [] []
/src/ffms2/test/hdr.cpp [] []
/src/ffms2/src/core/filehandle.h [] []
/src/ffms2/test/indexer.cpp [] []
/src/ffms2/src/avisynth/avisynth.cpp [] []
/src/ffms2/test/tests.h [] []
/src/ffms2/src/vapoursynth/vapoursynth4.cpp [] []
/src/ffms2/src/core/indexing.h [] []
/src/ffms2/src/index/vsutf16.h [] []
/src/ffms2/src/vapoursynth/VapourSynth4.h [] []
/src/ffms2/src/avisynth/avssources.cpp [] []
/src/ffms2/include/ffms.h [] []
/src/ffms2/src/core/track.cpp ['ffms2_fuzzer.cc'] []
/src/ffms2/test/tests.cpp [] []
/src/ffms2/src/vapoursynth/VSHelper4.h [] []
/src/ffms2/src/core/filehandle.cpp ['ffms2_fuzzer.cc'] []
/src/ffms2/src/core/audiosource.cpp [] []
/src/ffms2/src/core/ffms.cpp ['ffms2_fuzzer.cc'] []
/src/ffms2/include/ffmscompat.h [] []
/src/ffms2/src/vapoursynth/vapoursource4.cpp [] []
/src/ffms2/src/core/utils.cpp ['ffms2_fuzzer.cc'] []
/src/ffms2/src/core/videoutils.cpp [] []
/src/ffms2/src/core/videosource.cpp [] []
/src/ffms2/src/core/audiosource.h [] []
/src/ffms2/src/core/zipfile.cpp ['ffms2_fuzzer.cc'] []
/src/ffms2/src/core/indexing.cpp ['ffms2_fuzzer.cc'] []
/src/ffms2/src/avisynth/avssources.h [] []
/src/ffms2_fuzzer.cc ['ffms2_fuzzer.cc'] []
/src/ffms2/test/display_matrix.cpp [] []

Directories in report

Directory
/src/ffms2/src/avisynth/
/src/ffms2/test/
/src/
/src/ffms2/include/
/src/ffms2/src/core/
/src/ffms2/src/index/
/src/ffms2/src/vapoursynth/