iphydf
24b54722ae
fix: Ensure we have allocators available for the error paths.
2023-09-11 21:43:43 +00:00
iphydf
a549807df7
refactor: Add mem
module to allow tests to override allocators.
...
This will allow us to do more interesting things with memory allocation
within toxcore, and allow fuzzers to explore various allocation failure
paths.
2023-08-30 22:55:05 +00:00
sudden6
9fae455bab
test: enable tcp relay for bootstrap fuzzing
2022-12-04 18:52:09 +01:00
iphydf
50094b7385
test: Add a protocol dump test to generate initial fuzzer input.
2022-04-19 23:42:47 +00:00
iphydf
19b9cf3812
test: Enable fuzzing for TCP.
...
If the `recvbuf` network function returns 0 all the time, that means
there is never any data available on the TCP socket. This change makes
it so there is a random amount of data available on the TCP socket.
This invalidates the bootstrap fuzzer corpus.
2022-04-14 13:19:56 +00:00
iphydf
d78ee9b12e
fix: Fix potential array out-of-bounds in DHT random node retrieval.
...
It can't happen in almost every reality, except when the RNG is fairly
broken and doesn't add 2 fake DHT friends on startup. Still, this code
should be defensive and never index outside `num_friends` elements.
2022-04-10 23:17:15 +00:00
iphydf
60b71adbfa
test: Don't abort fuzz test when tox_new fails.
...
Right now, it can't fail, but later we want the fuzzer to randomly let
I/O functions fail, so we shouldn't assert tox_new succeeded.
2022-04-10 22:35:00 +00:00
iphydf
cb34fe12d1
test: Add more functionality to the bootstrap harness.
...
Ideally this would be able to reach some of the events, so we can write
code to respond to those events, but so far only the friend request
event actually happens.
2022-04-07 20:17:56 +00:00
iphydf
941026266e
refactor: Allow overriding mono_time in tox_new.
...
This makes it so if mono_time is overridden, no monotonic time-related
system call is invoked in tox_new.
2022-04-03 22:48:16 +00:00
iphydf
e4558a287c
perf: Make time move a lot faster in fuzzing runs.
2022-03-27 22:52:35 +00:00
iphydf
1928704065
test: Add fuzzer tests to the bazel build.
2022-03-25 18:48:41 +00:00
iphydf
86a528a37a
chore: Add a .clang-format that mostly agrees with astyle.
2022-02-21 16:16:16 +00:00
sudden6
7dd8dbd897
intercept network, crypto and time
...
This fuzzing harness must be as deterministic as possible for the fuzzer
to detect additional coverage reliably.
2022-01-10 21:05:49 +01:00
sudden6
9eb88798a3
add fuzzing harnesses
...
Toxsave harness ported to libFuzzer interface.
New harness for bootstrap phase.
2022-01-10 20:57:00 +01:00