Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
README.md | D | 12-May-2024 | 2.1 KiB | 52 | 30 | |
driver.c | D | 12-May-2024 | 716 | 36 | 28 | |
fuzz.h | D | 12-May-2024 | 583 | 23 | 18 | |
fuzz_bookmark.c | D | 12-May-2024 | 318 | 16 | 11 | |
fuzz_bookmark.corpus | D | 12-May-2024 | 19 | 2 | 1 | |
fuzz_date_parse.c | D | 12-May-2024 | 506 | 20 | 13 | |
fuzz_date_time_new_from_iso8601.c | D | 12-May-2024 | 637 | 26 | 18 | |
fuzz_dbus_message.c | D | 12-May-2024 | 616 | 29 | 21 | |
fuzz_inet_address_mask_new_from_string.c | D | 12-May-2024 | 644 | 26 | 18 | |
fuzz_inet_address_new_from_string.c | D | 12-May-2024 | 624 | 26 | 18 | |
fuzz_inet_socket_address_new_from_string.c | D | 12-May-2024 | 665 | 26 | 18 | |
fuzz_key.c | D | 12-May-2024 | 644 | 28 | 21 | |
fuzz_key.corpus | D | 12-May-2024 | 39 | 3 | 2 | |
fuzz_network_address_parse.c | D | 12-May-2024 | 686 | 26 | 18 | |
fuzz_network_address_parse_uri.c | D | 12-May-2024 | 694 | 26 | 18 | |
fuzz_uri_escape.c | D | 12-May-2024 | 1.4 KiB | 66 | 48 | |
fuzz_uri_parse.c | D | 12-May-2024 | 1.3 KiB | 45 | 33 | |
fuzz_uri_parse_params.c | D | 12-May-2024 | 560 | 29 | 21 | |
fuzz_variant_binary.c | D | 12-May-2024 | 528 | 22 | 16 | |
fuzz_variant_text.c | D | 12-May-2024 | 423 | 22 | 16 | |
fuzz_variant_text.dict | D | 12-May-2024 | 216 | 33 | 32 | |
meson.build | D | 12-May-2024 | 1.1 KiB | 39 | 34 |
README.md
1Fuzz targets used by [oss-fuzz](https://github.com/google/oss-fuzz/). 2 3Useful links: [Dashboard](https://oss-fuzz.com/) _(requires access)_, [Build logs](https://oss-fuzz-build-logs.storage.googleapis.com/index.html), [Coverage](https://oss-fuzz.com/coverage-report/job/libfuzzer_asan_glib/latest) 4 5## How to add new targets 6 7Add **fuzz_target_name.c** and edit `meson.build` accordingly. 8 9New targets are picked up by oss-fuzz automatically within a day. Targets must not be renamed once added. 10 11Add (optional) **fuzz_target_name.dict** containing keywords and magic bytes. 12 13Add (optional) **fuzz_target_name.corpus** with file names on separate lines. Wildcards `?`, `*` and `**` are supported. Examples below. 14 15```bash 16glib/* # all files in directory glib 17glib/** # all files in directory glib and sub-directories 18**.xbel # all files ending with .xbel in the repository 19``` 20 21Recommended reading: [Fuzz Target](https://llvm.org/docs/LibFuzzer.html#fuzz-target), [Dictionaries](https://llvm.org/docs/LibFuzzer.html#dictionaries), [Corpus](https://llvm.org/docs/LibFuzzer.html#corpus) 22 23## How to reproduce oss-fuzz bugs locally 24 25Build with at least the following flags, choosing a sanitizer as needed. A somewhat recent version of [clang](http://clang.llvm.org/) is recommended. 26 27```bash 28$ CC=clang CXX=clang++ meson DIR -Db_sanitize=<address|undefined> -Db_lundef=false 29``` 30 31Afterwards run the affected target against the provided test case. 32 33```bash 34$ DIR/fuzzing/fuzz_target_name FILE 35``` 36 37#### FAQs 38 39###### What about Memory Sanitizer (MSAN)? 40 41Correct MSAN instrumentation is [difficult to achieve](https://clang.llvm.org/docs/MemorySanitizer.html#handling-external-code) locally, so false positives are very likely to mask the actual bug. 42 43If need be, [you can still reproduce](https://github.com/google/oss-fuzz/blob/master/docs/reproducing.md#building-using-docker) those bugs with the oss-fuzz provided docker images. 44 45###### There are no file/function names in the stack trace. 46 47`llvm-symbolizer` must be in `PATH`. 48 49###### UndefinedBehavior Sanitizer (UBSAN) doesn't provide a stack trace. 50 51Set environment variable `UBSAN_OPTIONS` to `print_stacktrace=1` prior to running the target. 52