-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fuzzing: Add new fuzzer #2848
base: main
Are you sure you want to change the base?
Fuzzing: Add new fuzzer #2848
Conversation
497925a
to
7115446
Compare
Failing build looks unrelated |
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.
The fuzzer should be ensured to run FuzzStateApi()
only with a valid JSON bytes. I'm not sure whether it is possible with go-fuzz, but without ensuring that, fuzzing is not really meaningful. (Assuming that json.Unmarshal
is stable enough and not worth fuzzing.)
You are right, and the fuzzer will take care of that. It will eventually start creating json to get a valid container. The way the fuzzer creates the container allows it to be validated: runc/libcontainer/factory_linux.go Lines 192 to 198 in f973238
... and if the fuzzer does not generate a valid container, it will return and try over:
State() is therefore not called on invalid containers.
|
@AkihiroSuda Can you check what I wrote? It would be helpful to get this up and running on OSS-fuzz to see how it performs continuously. I will modify the fuzzer over the next couple of weeks, and getting feedback from OSS-fuzz helps tremendously in that process. |
2ddf1be
to
e202efc
Compare
@AkihiroSuda Please check the updated version of the fuzzer. We have aborted using json to create the config and instead pass random values to the struct. |
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 better, thanks
02db130
to
08f58e9
Compare
@kolyshkin Could you take a look at the failing centos test? It looks unrelated to the files in this PR. |
@kolyshkin @AkihiroSuda How is this one looking now? |
d25d45b
to
b3d3489
Compare
I ran the tests again, and this PR now passes |
@AkihiroSuda @kolyshkin How is this one looking now? |
@AdamKorcz can you please fix the commit message? Now it merely says "Updated" which is not a good description of what the commit does. |
Also needs a rebase. |
2060008
to
10e015c
Compare
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
(but this will probably need a rebase after #2925 is merged)
@kolyshkin Can this be merged? |
it has branch conflicts now but cc: @opencontainers/runc-maintainers |
Signed-off-by: AdamKorcz <adam@adalogics.com>
rebased |
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.
/ping @opencontainers/runc-maintainers |
This PR adds a fuzzer that creates a container with a randomized configuration and then calls
State()
.Furthermore a seed and a dictionary is added to help the fuzzer mutate relevant input data.
Lastly the OSS-fuzz build file has been updated to include this new fuzzer.