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

Fuzzer details

Fuzzer: extract_text_fuzzer

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 185 23.8%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 591 76.1%
All colors 776 100

Fuzz blockers

The following nodes represent call sites where fuzz blockers occur.

Amount of callsites blocked Calltree index Parent function Callsite Largest blocked function
67 134 pdfminer.ascii85.asciihexdecode call site: 00134 pdfminer.ccitt.ccittfaxdecode
20 607 pdfminer.pdffont.TrueTypeFont.create_unicode_map call site: 00607 .enumerate
17 108 pdfminer.pdftypes.decompress_corrupted call site: 00108 pdfminer.lzw.lzwdecode
8 677 pdfminer.utils.choplist call site: 00677 .enumerate
5 425 pdfminer.encodingdb.name2unicode call site: 00425 .int
5 645 pdfminer.pdffont.TrueTypeFont.create_unicode_map call site: 00645 io.BytesIO.seek
4 354 pdfminer.pdfinterp.PDFPageInterpreter.process_page call site: 00354 pdfminer.pdfdevice.TagExtractor._write
4 364 pdfminer.utils.apply_matrix_rect call site: 00364 .min
4 771 pdfminer.high_level.extract_text call site: 00771 fuzzing.fuzzed_data_provider.PdfminerFuzzedDataProvider.ConsumeMemoryFile
3 0 EP call site: 00000 pdfminer.high_level.extract_text
3 213 pdfminer.utils.apply_tiff_predictor call site: 00213 .range
3 551 pdfminer.cmapdb.CMapDB._load_data call site: 00551 os.environ.get

Runtime coverage analysis

Covered functions
466
Functions that are reachable but not covered
160
Reachable functions
280
Percentage of reachable functions covered
42.86%
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.
Warning: The number of covered functions are larger than the number of reachable functions. This means that there are more functions covered at runtime than are extracted using static analysis. This is likely a result of the static analysis component failing to extract the right call graph or the coverage runtime being compiled with sanitizers in code that the static analysis has not analysed. This can happen if lto/gold is not used in all places that coverage instrumentation is used.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
/ 1
...pdfminer.six.fuzzing.extract_text_fuzzer 7
pdfminer.high_level 10
pdfminer.layout 8
pdfminer.utils 21
pdfminer.converter 11
pdfminer.pdfpage 30
pdfminer.pdfparser 3
pdfminer.psparser 7
pdfminer.pdfdocument 48
pdfminer.pdftypes 31
pdfminer.lzw 12
pdfminer.ascii85 7
pdfminer.runlength 5
pdfminer.ccitt 32
pdfminer.pdfinterp 40
pdfminer.pdfdevice 4
pdfminer.pdffont 66
pdfminer.encodingdb 17
pdfminer.cmapdb 24
pdfminer.casting 7

Fuzzer: extract_text_to_fp_fuzzer

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 251 30.0%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 583 69.9%
All colors 834 100

Fuzz blockers

The following nodes represent call sites where fuzz blockers occur.

Amount of callsites blocked Calltree index Parent function Callsite Largest blocked function
67 177 pdfminer.ascii85.asciihexdecode call site: 00177 pdfminer.ccitt.ccittfaxdecode
42 22 pdfminer.converter.PDFConverter._is_binary_stream call site: 00022 pdfminer.pdfpage.PDFPage.get_pages
22 811 pdfminer.pdfinterp.PDFPageInterpreter.process_page call site: 00811 pdfminer.converter.HTMLConverter.close
20 650 pdfminer.pdffont.TrueTypeFont.create_unicode_map call site: 00650 .enumerate
17 151 pdfminer.pdftypes.decompress_corrupted call site: 00151 pdfminer.lzw.lzwdecode
11 0 EP call site: 00000 pdfminer.high_level.extract_text_to_fp
8 720 pdfminer.utils.choplist call site: 00720 .enumerate
5 468 pdfminer.encodingdb.name2unicode call site: 00468 .int
5 688 pdfminer.pdffont.TrueTypeFont.create_unicode_map call site: 00688 io.BytesIO.seek
4 397 pdfminer.pdfinterp.PDFPageInterpreter.process_page call site: 00397 pdfminer.pdfdevice.TagExtractor._write
4 407 pdfminer.utils.apply_matrix_rect call site: 00407 .min
3 256 pdfminer.utils.apply_tiff_predictor call site: 00256 .range

Runtime coverage analysis

Covered functions
466
Functions that are reachable but not covered
180
Reachable functions
301
Percentage of reachable functions covered
40.2%
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.
Warning: The number of covered functions are larger than the number of reachable functions. This means that there are more functions covered at runtime than are extracted using static analysis. This is likely a result of the static analysis component failing to extract the right call graph or the coverage runtime being compiled with sanitizers in code that the static analysis has not analysed. This can happen if lto/gold is not used in all places that coverage instrumentation is used.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
/ 1
...pdfminer.six.fuzzing.extract_text_to_fp_fuzzer 11
pdfminer.high_level 16
pdfminer.image 2
pdfminer.converter 30
pdfminer.pdfdevice 5
pdfminer.pdfpage 30
pdfminer.pdfparser 3
pdfminer.psparser 7
pdfminer.pdfdocument 48
pdfminer.pdftypes 31
pdfminer.lzw 12
pdfminer.ascii85 7
pdfminer.runlength 5
pdfminer.ccitt 32
pdfminer.utils 17
pdfminer.pdfinterp 40
pdfminer.layout 6
pdfminer.pdffont 66
pdfminer.encodingdb 17
pdfminer.cmapdb 24
pdfminer.casting 7

Fuzzer: page_extraction_fuzzer

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 196 25.2%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 580 74.7%
All colors 776 100

Fuzz blockers

The following nodes represent call sites where fuzz blockers occur.

Amount of callsites blocked Calltree index Parent function Callsite Largest blocked function
67 137 pdfminer.ascii85.asciihexdecode call site: 00137 pdfminer.ccitt.ccittfaxdecode
20 609 pdfminer.pdffont.TrueTypeFont.create_unicode_map call site: 00609 .enumerate
17 111 pdfminer.pdftypes.decompress_corrupted call site: 00111 pdfminer.lzw.lzwdecode
8 679 pdfminer.utils.choplist call site: 00679 .enumerate
6 0 EP call site: 00000 pdfminer.high_level.extract_pages
5 427 pdfminer.encodingdb.name2unicode call site: 00427 .int
5 647 pdfminer.pdffont.TrueTypeFont.create_unicode_map call site: 00647 io.BytesIO.seek
4 16 pdfminer.utils.open_filename.__init__ call site: 00016 pdfminer.converter.PDFPageAggregator.__init__
4 356 pdfminer.pdfinterp.PDFPageInterpreter.process_page call site: 00356 pdfminer.pdfdevice.TagExtractor._write
4 366 pdfminer.utils.apply_matrix_rect call site: 00366 .min
4 771 pdfminer.converter.PDFLayoutAnalyzer.end_page call site: 00771 pdfminer.converter.PDFPageAggregator.get_result
3 7 pdfminer.layout.LAParams.__init__ call site: 00007 pdfminer.utils.open_filename.__init__

Runtime coverage analysis

Covered functions
466
Functions that are reachable but not covered
162
Reachable functions
280
Percentage of reachable functions covered
42.14%
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.
Warning: The number of covered functions are larger than the number of reachable functions. This means that there are more functions covered at runtime than are extracted using static analysis. This is likely a result of the static analysis component failing to extract the right call graph or the coverage runtime being compiled with sanitizers in code that the static analysis has not analysed. This can happen if lto/gold is not used in all places that coverage instrumentation is used.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
/ 1
...pdfminer.six.fuzzing.page_extraction_fuzzer 8
pdfminer.high_level 9
pdfminer.layout 8
pdfminer.utils 21
pdfminer.converter 11
pdfminer.pdfpage 30
pdfminer.pdfparser 3
pdfminer.psparser 7
pdfminer.pdfdocument 48
pdfminer.pdftypes 31
pdfminer.lzw 12
pdfminer.ascii85 7
pdfminer.runlength 5
pdfminer.ccitt 32
pdfminer.pdfinterp 40
pdfminer.pdfdevice 4
pdfminer.pdffont 66
pdfminer.encodingdb 17
pdfminer.cmapdb 24
pdfminer.casting 7

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
pdfminer.converter.HTMLConverter.receive_layout.render pdfminer.converter 1 ['N/A'] 5 0 24 15 9 74 2 240 192
pdfminer.layout.LTLayoutContainer.analyze pdfminer.layout 2 ['N/A', 'N/A'] 7 0 7 2 4 68 0 216 177
pdfminer.psparser.PSStackParser.nextobject pdfminer.psparser 1 ['N/A'] 3 0 15 13 8 49 0 170 133
pdfminer.pdfdocument.PDFStandardSecurityHandlerV5.authenticate pdfminer.pdfdocument 2 ['N/A', 'N/A'] 4 0 0 2 4 26 0 85 82
pdfminer.pdfinterp.PDFPageInterpreter.do_TJ pdfminer.pdfinterp 2 ['N/A', 'N/A'] 4 0 2 2 4 31 3 103 64
pdfminer.pdfinterp.PDFPageInterpreter.do_Do pdfminer.pdfinterp 2 ['N/A', 'N/A'] 4 0 8 4 5 39 0 126 47
pdfminer.pdfdocument.PDFDocument.getobj pdfminer.pdfdocument 2 ['N/A', 'N/A'] 7 0 4 6 5 105 2 363 40
pdfminer.cmapdb.CMapParser.do_keyword pdfminer.cmapdb 3 ['N/A', 'N/A', 'N/A'] 3 0 27 29 15 47 0 164 39
pdfminer.pdfdocument.PageLabels.labels pdfminer.pdfdocument 1 ['N/A'] 3 0 2 3 4 24 0 82 38

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

Functions statically reachable by fuzzers
46.0%
273 / 598
Cyclomatic complexity statically reachable by fuzzers
49.0%
1006 / 2068

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 engine guidance

This sections provides heuristics that can be used as input to a fuzz engine when running a given fuzz target. The current focus is on providing input that is usable by libFuzzer.

fuzzing/extract_text_fuzzer.py

Dictionary

Use this with the libFuzzer -dict=DICT.file flag


Fuzzer function priority

Use one of these functions as input to libfuzzer with flag: -focus_function name

-focus_function=['pdfminer.ascii85.asciihexdecode', 'pdfminer.pdffont.TrueTypeFont.create_unicode_map', 'pdfminer.pdftypes.decompress_corrupted', 'pdfminer.utils.choplist', 'pdfminer.encodingdb.name2unicode', 'pdfminer.pdfinterp.PDFPageInterpreter.process_page', 'pdfminer.utils.apply_matrix_rect', 'pdfminer.high_level.extract_text']

fuzzing/extract_text_to_fp_fuzzer.py

Dictionary

Use this with the libFuzzer -dict=DICT.file flag


Fuzzer function priority

Use one of these functions as input to libfuzzer with flag: -focus_function name

-focus_function=['pdfminer.ascii85.asciihexdecode', 'pdfminer.converter.PDFConverter._is_binary_stream', 'pdfminer.pdfinterp.PDFPageInterpreter.process_page', 'pdfminer.pdffont.TrueTypeFont.create_unicode_map', 'pdfminer.pdftypes.decompress_corrupted', 'pdfminer.utils.choplist', 'pdfminer.encodingdb.name2unicode']

fuzzing/page_extraction_fuzzer.py

Dictionary

Use this with the libFuzzer -dict=DICT.file flag


Fuzzer function priority

Use one of these functions as input to libfuzzer with flag: -focus_function name

-focus_function=['pdfminer.ascii85.asciihexdecode', 'pdfminer.pdffont.TrueTypeFont.create_unicode_map', 'pdfminer.pdftypes.decompress_corrupted', 'pdfminer.utils.choplist', 'pdfminer.encodingdb.name2unicode', 'pdfminer.utils.open_filename.__init__', 'pdfminer.pdfinterp.PDFPageInterpreter.process_page', 'pdfminer.utils.apply_matrix_rect']

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
[] []
pdfminer.runlength ['extract_text_fuzzer', 'extract_text_to_fp_fuzzer', 'page_extraction_fuzzer'] []
pdfminer.utils ['extract_text_fuzzer', 'extract_text_to_fp_fuzzer', 'page_extraction_fuzzer'] []
pdfminer.glyphlist [] []
pygame [] []
itertools [] []
pdfminer.casting ['extract_text_fuzzer', 'extract_text_to_fp_fuzzer', 'page_extraction_fuzzer'] []
pdfminer.pdftypes ['extract_text_fuzzer', 'extract_text_to_fp_fuzzer', 'page_extraction_fuzzer'] []
pdfminer.settings [] []
binascii [] []
io [] []
importlib [] []
pdfminer.fontmetrics [] []
stringprep [] []
unittest [] []
pdfminer.high_level ['extract_text_fuzzer', 'extract_text_to_fp_fuzzer', 'page_extraction_fuzzer'] []
pdfminer.arcfour [] []
...pdfminer.six.fuzzing.extract_text_fuzzer ['extract_text_fuzzer'] []
struct [] []
pickle [] []
pdfminer.pdfdevice ['extract_text_fuzzer', 'extract_text_to_fp_fuzzer', 'page_extraction_fuzzer'] []
logging [] []
html [] []
pdfminer.lzw ['extract_text_fuzzer', 'extract_text_to_fp_fuzzer', 'page_extraction_fuzzer'] []
pdfminer.psparser ['extract_text_fuzzer', 'extract_text_to_fp_fuzzer', 'page_extraction_fuzzer'] []
unicodedata [] []
...pdfminer.six.fuzzing.extract_text_to_fp_fuzzer ['extract_text_to_fp_fuzzer'] []
base64 [] []
pdfminer.latin_enc [] []
PIL [] []
pdfminer.pdfpage ['extract_text_fuzzer', 'extract_text_to_fp_fuzzer', 'page_extraction_fuzzer'] []
typing [] []
pdfminer.pdfinterp ['extract_text_fuzzer', 'extract_text_to_fp_fuzzer', 'page_extraction_fuzzer'] []
pdfminer.cmapdb ['extract_text_fuzzer', 'extract_text_to_fp_fuzzer', 'page_extraction_fuzzer'] []
warnings [] []
charset_normalizer [] []
pdfminer.layout ['extract_text_fuzzer', 'extract_text_to_fp_fuzzer', 'page_extraction_fuzzer'] []
re [] []
heapq [] []
pdfminer.converter ['extract_text_fuzzer', 'extract_text_to_fp_fuzzer', 'page_extraction_fuzzer'] []
pdfminer.pdfparser ['extract_text_fuzzer', 'extract_text_to_fp_fuzzer', 'page_extraction_fuzzer'] []
pdfminer [] []
cryptography [] []
fuzzing [] []
pdfminer.psexceptions [] []
array [] []
pdfminer.pdffont ['extract_text_fuzzer', 'extract_text_to_fp_fuzzer', 'page_extraction_fuzzer'] []
pdfminer.image ['extract_text_to_fp_fuzzer'] []
math [] []
atheris [] []
os [] []
pdfminer.ascii85 ['extract_text_fuzzer', 'extract_text_to_fp_fuzzer', 'page_extraction_fuzzer'] []
pdfminer._saslprep [] []
[] []
collections [] []
pdfminer.pdfdocument ['extract_text_fuzzer', 'extract_text_to_fp_fuzzer', 'page_extraction_fuzzer'] []
zlib [] []
pdfminer.ccitt ['extract_text_fuzzer', 'extract_text_to_fp_fuzzer', 'page_extraction_fuzzer'] []
pdfminer.pdfcolor [] []
pdfminer.data_structures [] []
gzip [] []
pdfminer.encodingdb ['extract_text_fuzzer', 'extract_text_to_fp_fuzzer', 'page_extraction_fuzzer'] []
...pdfminer.six.fuzzing.page_extraction_fuzzer ['page_extraction_fuzzer'] []
pdfminer.jbig2 [] []
hashlib [] []
pdfminer.pdfexceptions [] []

Directories in report

Directory