diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 12:08:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 12:08:18 +0000 |
commit | 5da14042f70711ea5cf66e034699730335462f66 (patch) | |
tree | 0f6354ccac934ed87a2d555f45be4c831cf92f4a /src/fluent-bit/lib/librdkafka-2.1.0/tests/fuzzers/README.md | |
parent | Releasing debian version 1.44.3-2. (diff) | |
download | netdata-5da14042f70711ea5cf66e034699730335462f66.tar.xz netdata-5da14042f70711ea5cf66e034699730335462f66.zip |
Merging upstream version 1.45.3+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/fluent-bit/lib/librdkafka-2.1.0/tests/fuzzers/README.md')
-rw-r--r-- | src/fluent-bit/lib/librdkafka-2.1.0/tests/fuzzers/README.md | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/fluent-bit/lib/librdkafka-2.1.0/tests/fuzzers/README.md b/src/fluent-bit/lib/librdkafka-2.1.0/tests/fuzzers/README.md new file mode 100644 index 000000000..b5a0333b1 --- /dev/null +++ b/src/fluent-bit/lib/librdkafka-2.1.0/tests/fuzzers/README.md @@ -0,0 +1,31 @@ +# Fuzzing +librdkafka supports fuzzing by way of Libfuzzer and OSS-Fuzz. This is ongoing work. + +## Launching the fuzzers +The easiest way to launch the fuzzers are to go through OSS-Fuzz. The only prerequisite to this is having Docker installed. + +With Docker installed, the following commands will build and run the fuzzers in this directory: + +``` +git clone https://github.com/google/oss-fuzz +cd oss-fuzz +python3 infra/helper.py build_image librdkafka +python3 infra/helper.py build_fuzzers librdkafka +python3 infra/helper.py run_fuzzer librdkafka FUZZ_NAME +``` +where FUZZ_NAME references the name of the fuzzer. Currently the only fuzzer we have is fuzz_regex + +Notice that the OSS-Fuzz `helper.py` script above will create a Docker image in which the code of librdkafka will be built. As such, depending on how you installed Docker, you may be asked to have root access (i.e. run with `sudo`). + + +## Running a single reproducer + +Download the reproducer file from the OSS-Fuzz issue tracker, then build +the failed test case by running `make` in this directory, and then +run the test case and pass it the reproducer files, e.g: + + $ make + $ ./fuzz_regex ~/Downloads/clusterfuzz-testcase-... + +**Note:** Some test cases, such as fuzz_regex, requires specific librdkafka + build configuration. See the test case source for details. |