-
Notifications
You must be signed in to change notification settings - Fork 44
Add ClusterFuzzLite integration #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add ClusterFuzzLite integration #54
Conversation
Signed-off-by: David Korczynski <david@adalogics.com>
Signed-off-by: David Korczynski <david@adalogics.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution!
It would be nice to always have an empty line at the end of the files. And please follow CONTRIBUTING
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: [ master ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
branches: [ master ] | |
branches: | |
- master | |
- dev |
strategy: | ||
fail-fast: false | ||
matrix: | ||
sanitizer: [address] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it could be good, to also add memory and undefined behavior. What do you think?
#include <string> | ||
|
||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { | ||
std::string payload(reinterpret_cast<const char *>(data), size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the reinterpret cast really needed? does
std::string payload(reinterpret_cast<const char *>(data), size); | |
std::string payload(data, size); |
not work?
In https://github.com/progsource/maddy/actions/runs/7307934736/job/19914831467?pr=54 it says
Does there need to be maybe another |
This adds fuzzing by way of ClusterFuzzLite, which is a GitHub action that will perform a short amount of fuzzing for new PRs. The goal is to use fuzzing to catch bugs that may be introduced by new PRs.
I added a fuzzer that targets the parsing logic, and currently se 8000 t the timeout of CFLite to 180 seconds. CFLite will flag if the fuzzer finds any issues in the code introduced by a PR.