-
Notifications
You must be signed in to change notification settings - Fork 989
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
Initial commit of a fuzzer for Meshtastic #5790
base: master
Are you sure you want to change the base?
Conversation
This is advanced stuff, we're very lucky to have you. Thanks for the huge effort. |
Thank you @fifieldt ! To be fair this was a lot of guessing & trial and error to get it going too. :) I implemented a limit on the TypedQueue class used by the native/portduino build. Using 0 still allows the original behavior of a limitless queue. Let me know if you'd prefer that change to be guarded by I could be reading the code wrong, but it looks like there is no |
This PR implements a fuzzer using the ClusterFuzzLite (OSS-Fuzz) framework. More background about the steps required to generate a fuzzer can be found in the Build Integration Guide for ClusterFuzzLite.
Some things to note:
buildroot
variant, which provides a convenient way to override the build tools used for PlatformIO.FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
CPP define is used for enabling features needed for fuzzing. I've tried to make as few changes as necessary to keep the code mostly the same while running under the fuzzer..__cxa_exception_type()
is not implemented in clang. I've implemented the solution in https://stackoverflow.com/a/47164539/4613163 within PortduinoGlue.cpp.static_cast<uint32_t>(value)
silences this error.I've included a README and tried to document things so it is clear how the fuzzer works and what all the files are used for. If anything is unclear, please ask and I'll improve the comments/documentation in this PR.