This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
Add libfuzzer integration for libsignal-protocol-c #142
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
👋 I saw #136 and was wondering whether y'all would be interested in adding support for continuous fuzzing for this library. I went ahead and made a quick prototype of how it would look just as a jumping off point to start the discussion.
Now building and running the tests will create a new
fuzzer
target that fuzzes deserialization and decryption with libfuzzer. As part of ctest this will automatically run for 2048 iterations (takes 3 seconds on my computer) in order to ensure that the fuzzer stays up to date. The fuzzer can also be run manually in order to fuzz for more iterations.I've run this fuzzer for ~10 million iterations on my own computer and have not found anything yet. But, my ultimate goal would be to integrate this repository with OSSFuzz per #136.
Note that tests/fuzzing_corpus/ includes an initial corpus for fuzzing so that the fuzzer has somewhere to start. This was seeded with a couple of valid serialized ciphertexts but the majority of it was synthesized by the fuzzer over time.