You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* doc: refine and simplify
Removes a lot of the data on the front README to increase attention on
OSS-fuzz list of projects and modularises the documentation.
Copy file name to clipboardExpand all lines: README.md
+10-236
Original file line number
Diff line number
Diff line change
@@ -5,252 +5,26 @@ and identify any potential blockers. Fuzz introspector aggregates the fuzzers’
5
5
hit frequency, entry points, etc to give the developer a birds eye view of their fuzzer. This helps with
6
6
identifying fuzz bottlenecks and blockers and eventually helps in developing better fuzzers.
7
7
8
-
Fuzz-introspector can on a high-level guide on how to improve fuzzing of a project by guiding on whether you should:
8
+
Fuzz-introspector aims to improve fuzzing experience of a project by guiding on whether you should:
9
9
- introduce new fuzzers to a fuzz harness
10
10
- modify existing fuzzers to improve the quality of your harness.
11
11
12
-
By and large these capabilities will remain the goals of fuzz-introspector. The focus is on improving these.
13
-
14
-
**Video demonstration:** A video demonstration of fuzz-introspector is given [here](https://www.youtube.com/watch?v=cheo-liJhuE)
15
-
16
-
**Sample OSS-Fuzz reports:** OSS-Fuzz supports fuzz introspector and maintains a list of fuzz introspector reports for the OSS-Fuzz projects. This list is available [here](https://oss-fuzz-introspector.storage.googleapis.com/index.html) and is a good reference if you're interested in seeing fuzz introspector in action.
17
-
18
-
**Try yourself:**
19
-
-[Use with OSS-Fuzz](#testing-with-oss-fuzz)
20
-
-[Use without OSS-Fuzz](#testing-without-oss-fuzz-integration)
12
+
## Documentation and samples
13
+
-[Sample OSS-Fuzz reports](https://oss-fuzz-introspector.storage.googleapis.com/index.html). [OSS-Fuzz](https://github.com/google/oss-fuzz) supports Fuzz Introspector and maintains a list of reports.
A more detailed description is available in [doc/Architecture](/doc/Architecture.md)
27
27
28
-
## Features
29
-
**High-level features**
30
-
31
-
- Show fuzzing-relevant data about each function in a given project
32
-
- Show reachability of fuzzer(s)
33
-
- Integrate seamlessly with OSS-Fuzz
34
-
- Show visualisations to enable fuzzer debugging
35
-
- Give suggestions for how to improve fuzzing
36
-
37
-
**Concrete features**
38
-
39
-
For each function in a project and a fuzzing harness for the project:
40
-
- show the number of fuzzers (fuzz drivers) that reach this function
41
-
- show cyclomatic complexity of the function
42
-
- show the amount of functions reached by the function
43
-
- show the sum of cyclomatic complexity of all functions reachable by the function
44
-
- show the number of (LLVM IR) basic blocks in the function
45
-
- show the function call-depth of the function
46
-
- show the total unreached complexity of this function, including the complexity from all unreached functions reached by this function.
47
-
48
-
Given a fuzz harness for a project show:
49
-
- which functions in the project are not reachable by the harness
50
-
- which functions in the project are reachable by harness
51
-
- identify which functions are the best to target (based on which unreached function reaches most code)
52
-
53
-
Given a fuzz harness statically analyse the code and merge it with run-time coverage information to:
54
-
- visualise statically-extracted calltree of each fuzzer and overlay this calltree with run-time coverage information
55
-
- identify nodes in the statically-extracted calltree where fuzzers are blocked based on run-time coverage information
56
-
- automatically highlight fuzz-blockers, namely locations in the code where fuzzers are not able to continue execution at run-time despite the code being reachable by the fuzzer based on static analysis.
57
-
58
-
## Testing with OSS-Fuzz
59
-
The recommended way of testing this project is by way of OSS-Fuzz. Please see
60
-
[OSS-Fuzz instructions](oss_fuzz_integration/) on how to do this. It is the
61
-
recommended way because it's by way of OSS-Fuzz that we currently support combining
62
-
runtime coverage data with the compiler plugin.
63
-
64
-
65
-
## Testing without OSS-Fuzz integration
66
-
You can build and run fuzz introspector outside the OSS-Fuzz environment.
67
-
We use this mainly to develop the LLVM LTO pass as compilation of clang goes
68
-
faster (recompilation in particular). However, for the full experience we
69
-
recommend working in the OSS-Fuzz environment as described above.
70
-
71
-
A complication with testing locally is that the full end-to-end process of
72
-
both (1) building fuzzers; (2) running them; (3) building with coverage; and
73
-
(4) building with introspector analysis, is better supported
Fuzz-introspector relies on an LTO LLVM pass and this requires us to build a custom Clang where the LTO pass is part of the compiler tool chain (see https://github.com/ossf/fuzz-introspector/issues/57 for more details on why this is needed).
123
-
124
-
To build the custom clang from the root of this repository:
# The post-processing will have generated various .html, .js, .css and .png fies,
207
-
# and these are accessible in the current folder. Simply start a webserver and
208
-
# navigate to the report in your local browser (localhost:8008):
209
-
python3 -m http.server 8008
210
-
```
211
-
212
-
You can also use the `build_all_projects.sh` and `build_all_web_only.sh` scripts to control
213
-
which examples you want to build as well as whether you want to only build the web data.
214
-
215
-
216
-
## Output
217
-
218
-
The output of the introspector is a HTML report that gives data about your fuzzer. This includes:
219
-
220
-
- An overview of reachability by all fuzzers in the repository
221
-
- A table with detailed information about each fuzzer in the repository, e.g. number of functions reached, complexity covered and more.
222
-
- A table with overview of all functions in the project. With information such as
223
-
- Number of fuzzers that reaches this function
224
-
- Cyclomatic complexity of this function and all functions reachable by this function
225
-
- Number of functions reached by this function
226
-
- The amount of undiscovered complexity in this function. Undiscovered complexity is the complexity *not* covered by any fuzzers.
227
-
- A call reachability tree for each fuzzer in the project. The reachability tree shows the potential control-flow of a given fuzzer
228
-
- An overlay of the reachability tree with coverage collected from a fuzzer run.
229
-
- A table giving summary information about which targets are optimal targets to analyse for a fuzzer of the functions that are not being reached by any fuzzer.
230
-
- A list of suggestions for new fuzzers (this is super naive at the moment).
Table with data of all functions in a project. The table is sortable to make enhance the process of understanding the fuzzer-infrastructure of a given project:
Table with data of all functions in a project. The table is sortable to make enhance the process of understanding the fuzzer-infrastructure of a given project:
- Show fuzzing-relevant data about each function in a given project
5
+
- Show reachability of fuzzer(s)
6
+
- Integrate seamlessly with OSS-Fuzz
7
+
- Show visualisations to enable fuzzer debugging
8
+
- Give suggestions for how to improve fuzzing
9
+
10
+
**Concrete features**
11
+
12
+
For each function in a project and a fuzzing harness for the project:
13
+
- show the number of fuzzers (fuzz drivers) that reach this function
14
+
- show cyclomatic complexity of the function
15
+
- show the amount of functions reached by the function
16
+
- show the sum of cyclomatic complexity of all functions reachable by the function
17
+
- show the number of (LLVM IR) basic blocks in the function
18
+
- show the function call-depth of the function
19
+
- show the total unreached complexity of this function, including the complexity from all unreached functions reached by this function.
20
+
21
+
Given a fuzz harness for a project show:
22
+
- which functions in the project are not reachable by the harness
23
+
- which functions in the project are reachable by harness
24
+
- identify which functions are the best to target (based on which unreached function reaches most code)
25
+
26
+
Given a fuzz harness statically analyse the code and merge it with run-time coverage information to:
27
+
- visualise statically-extracted calltree of each fuzzer and overlay this calltree with run-time coverage information
28
+
- identify nodes in the statically-extracted calltree where fuzzers are blocked based on run-time coverage information
29
+
- automatically highlight fuzz-blockers, namely locations in the code where fuzzers are not able to continue execution at run-time despite the code being reachable by the fuzzer based on static analysis.
30
+
31
+
# Output
32
+
Screenshots from Fuzz Introspector is is available [here](doc/ExampleOutput.md)
33
+
34
+
The output of the introspector is a HTML report that gives data about your fuzzer. This includes:
35
+
36
+
- An overview of reachability by all fuzzers in the repository
37
+
- A table with detailed information about each fuzzer in the repository, e.g. number of functions reached, complexity covered and more.
38
+
- A table with overview of all functions in the project. With information such as
39
+
- Number of fuzzers that reaches this function
40
+
- Cyclomatic complexity of this function and all functions reachable by this function
41
+
- Number of functions reached by this function
42
+
- The amount of undiscovered complexity in this function. Undiscovered complexity is the complexity *not* covered by any fuzzers.
43
+
- A call reachability tree for each fuzzer in the project. The reachability tree shows the potential control-flow of a given fuzzer
44
+
- An overlay of the reachability tree with coverage collected from a fuzzer run.
45
+
- A table giving summary information about which targets are optimal targets to analyse for a fuzzer of the functions that are not being reached by any fuzzer.
46
+
- A list of suggestions for new fuzzers (this is super naive at the moment).
0 commit comments