-
Notifications
You must be signed in to change notification settings - Fork 127
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
Add libfuzzer based test with #443
Conversation
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
Signed-off-by: Alan Jowett <alan.jowett@microsoft.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.
Looks good! Just wanted to ask a few questions!
Signed-off-by: Alan Jowett <alan.jowett@microsoft.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.
Sorry -- one more go around!
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.
LGTM!
This pull request introduces fuzzing capabilities to the project, including a new GitHub Actions workflow, and modifies the project's build system to support fuzzing. The most significant changes include the addition of the
fuzzing.yml
workflow, the introduction of a newubpf_fuzzer
executable, and the modification of theubpf_vm
structure to include an instruction limit.New GitHub Actions workflow:
.github/workflows/fuzzing.yml
: Added a new workflow to perform fuzzing. This workflow includes steps to build the project with fuzzing enabled, run the fuzzer, and upload any found artifacts.Modifications to existing GitHub Actions workflow:
.github/workflows/main.yml
: Modified thepermissions
field to have write access to contents, changed thepush
andpull_request
branches tomain
from*
, and added a job to use the newfuzzing.yml
workflow. [1] [2] [3]Changes to build system:
CMakeLists.txt
,cmake/options.cmake
,cmake/settings.cmake
: Added options to enable libfuzzer and coverage, and set compiler flags accordingly. [1] [2] [3]New fuzzer executable:
libfuzzer/CMakeLists.txt
,libfuzzer/libfuzz_harness.cc
: Added a new executableubpf_fuzzer
that is built when fuzzing is enabled. This executable uses libfuzzer to fuzz the uBPF virtual machine. [1] [2]Modifications to uBPF VM:
vm/inc/ubpf.h
,vm/ubpf_int.h
,vm/ubpf_vm.c
: Modified theubpf_vm
structure to include an instruction limit, added a method to set this limit, and modified theubpf_exec
function to respect this limit. Also, the bounds check function was updated for better error handling and reporting. [1] [2] [3] [4] [5] [6]