collabora-online/fuzzer
Miklos Vajna 973d12b2a7 admin: improve error handling on bad json for updateroutetoken
terminate called after throwing an instance of 'Poco::JSON::JSONException'
...
    #11 0x7f70540e006a in Poco::JSON::ParserImpl::parseImpl(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) (/usr/lib64/libPocoJSON.so.92+0x4206a) (BuildId: 149b3c1772e35fcbe5692d435f1b06820707bad3)
    #12 0x556a70a9511b in Poco::JSON::Parser::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) /usr/include/Poco/JSON/Parser.h:202:9
    #13 0x556a70a9511b in JsonUtil::parseJSON(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, Poco::SharedPtr<Poco::JSON::Object, Poco::ReferenceCounter, Poco::ReleasePolicy<Poco::JSON::Object>>&) /home/vmiklos/git/collaboraonline/online-fuzz/./common/JsonUtil.hpp:37:50
    #14 0x556a70a7edde in AdminSocketHandler::handleMessage(std::vector<char, std::allocator<char>> const&) /home/vmiklos/git/collaboraonline/online-fuzz/wsd/Admin.cpp:325:13

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Iebe0f5d689032a8b3c1e5d38c5ee80d344d1cbed
2024-01-09 14:13:46 +00:00
..
admin-data admin: improve error handling on bad json for updateroutetoken 2024-01-09 14:13:46 +00:00
data wsd, DocumentBroker: check for missing child process 2024-01-08 09:13:27 -05:00
httpecho-data fuzzers: add http corpus and dictionary 2022-08-17 08:55:12 -04:00
httpresponse-data http response: check if result would fit into chunkLen 2021-07-08 14:51:11 +02:00
Admin.cpp HttpRequest: add missing config.h include 2021-03-30 12:23:09 +02:00
ClientSession.cpp client session fuzzer: try harder to empty SocketPoll::_newCallbacks on shutdown 2022-05-31 15:10:51 +02:00
HttpEcho.cpp Fix fuzzers build 2023-11-29 15:41:00 +00:00
HttpResponse.cpp fuuzer, httpresponse: clear state before each run 2023-02-28 10:18:41 +01:00
README fuzzers: add httpecho fuzzer script 2022-08-17 08:55:12 -04:00
httpecho-fuzz.sh fuzzers: add httpecho fuzzer script 2022-08-17 08:55:12 -04: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
----