libreoffice-online/fuzzer
Miklos Vajna 2c82f0a712 fuzzer: fix default log level
Recent a failed jenkins job had a lot of output, the tail of the log
starts with: "Skipping 3,970,746 KB".

I guessed that the problem is that the fuzzer figured out what is the
protocol to change log levels, but it isn't there yet.

What seems to happen is that fuzzer/Common.cpp defines the log level to
be "none", but this is not handled at GenericLogger::mapToLevel(), so we
managed to enable trace level for known-broken input where we're not
interested in the errors/warnings.

The fix can be tested by adding assert(false); to Log::log(), previously
the fuzzer failed with an assertion failure for a simple input like "12"
(unknown command) and now it just exits silently.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ib5f4bedca706d7a0310a2eb9f661053a3095822d
2024-05-29 09:10:44 +02:00
..
admin-data admin: handle errors while decoding URLs 2024-01-16 21:36:43 +01:00
data common: avoid adding too large ints in the Rectangle ctor 2024-05-28 13:41:14 +02:00
httpecho-data
httpresponse-data
Admin.cpp fuzzer, clientsession: fix build 2024-05-13 08:29:07 +01:00
ClientSession.cpp fuzzer, clientsession: fix build 2024-05-13 08:29:07 +01:00
Common.cpp fuzzer: fix default log level 2024-05-29 09:10:44 +02:00
Common.hpp fuzzer, clientsession: fix build 2024-05-13 08:29:07 +01:00
httpecho-fuzz.sh
HttpEcho.cpp fuzzer, clientsession: fix build 2024-05-13 08:29:07 +01:00
HttpResponse.cpp fuzzer, clientsession: fix build 2024-05-13 08:29:07 +01:00
README

These fuzzers are meant to be built and executed inside lode.git's sanitizers
environment (currently enables both asan and ubsan).

online.git can be built the usual way, just the additional `--enable-fuzzers`
flag is needed to build the fuzzers. It is useful to do this in a separate
build tree, since the fuzzers config doesn't produce a `coolwsd` binary.

Run the fuzzers like this:

- Admin:

----
./admin_fuzzer -max_len=16384 fuzzer/admin-data/
----

- ClientSession:

----
./clientsession_fuzzer -max_len=16384 fuzzer/data/
----

- HttpResponse:

----
./httpresponse_fuzzer -max_len=16384 fuzzer/httpresponse-data/
----

- HttpEcho:

----
./httpecho_fuzzer -max_len=16384 fuzzer/httpecho-data/
OR, better:
./fuzzer/httpecho-fuzz.sh
----