Skip to content

Commit

Permalink
add repro/debug section (microsoft#3192)
Browse files Browse the repository at this point in the history
  • Loading branch information
ami-GS authored Nov 7, 2022
1 parent c7b381c commit c12a5ad
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions src/fuzzing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,33 @@ This directory is used for fuzzing.
[OSS-Fuzz] uses [LibFuzzer] by default which is included in clang.
Refer [Libfuzzer] official document if you want more detail.

## Running
You can prepare environment, build and run code by yourself, but you can use convenient scripts from [OSS-Fuzz]
## Run locally
You can build and run code by yourself. [OSS-Fuzz] offers convenient scripts

```sh
$ cp $PATH_TO_MSQUIC/src/fuzzing/$YOUR_COOL_FUZZING.cc $PATH_TO_OSS_FUZZ/projects/msquic/
$ cd $PATH_TO_OSS_FUZZ
# build Docker image
$ python infra/helper.py build_image msquic
# build fuzzing code
# build fuzzing code, memory sanitizer is not supported yet
$ python infra/helper.py build_fuzzers --sanitizer <address/memory/undefined> msquic
# run fuzzing
$ python infra/helper.py run_fuzzer msquic $YOUR_COOL_FUZZING
```
Refer [OSS-Fuzz official document] for more detail

## Reproduce and debug issue
[Reproduce]
[Debug]

## Monitor your fuzzing
Once fuzzing is deployed on OSS-Fuzz infra, it continuously run and report issue if it detects
### Receive notification
List your email under [auto_ccs] or [vendor_ccs] section in [project.yaml]
Most of developer should be under [vendor_ccs]. Please follow instruction in [vendor_ccs] and feel free to create PR and let us know on issue or discussion.

### Login OSS-Fuzz dashabord
Your email need to be associated with google account

## Before adding change....
Please go to [msquic project directory] in [OSS-Fuzz] whether your change can be run without issue.
You might need to change `Dockerfile` and/or `build.sh` for installing libraries, COPYing fuzzing source, configuration files and build options.
Expand All @@ -33,3 +45,8 @@ You might need to change `Dockerfile` and/or `build.sh` for installing libraries
[OSS-Fuzz official document]: https://google.github.io/oss-fuzz
[msquic project directory]: https://github.com/google/oss-fuzz/tree/master/projects/msquic
[LibFuzzer]: https://llvm.org/LibFuzzer
[Reproduce]: https://google.github.io/oss-fuzz/advanced-topics/reproducing/
[Debug]: https://google.github.io/oss-fuzz/advanced-topics/debugging/
[project.yaml]: https://github.com/google/oss-fuzz/blob/master/projects/msquic/project.yaml
[auto_ccs]: https://google.github.io/oss-fuzz/getting-started/new-project-guide/#primary
[vendor_ccs]: https://google.github.io/oss-fuzz/getting-started/new-project-guide/#vendor

0 comments on commit c12a5ad

Please sign in to comment.