Skip to content
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 fuzz testing #21235

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

pkillarjun
Copy link

@pkillarjun pkillarjun commented Nov 8, 2024

  • ffebcdd updated .gitignore file, may be a bit irrelevant
  • 42f8fb3 Added fuzzing tests

Signed-off-by: Arjun <[email protected]>
@martinpitt
Copy link
Member

Hello @pkillarjun ! Sorry for the lack of replies, we are all a bit overloaded right now. Can you please explain the direction a little bit? At the moment this PR looks like it would just have a handful of static "slightly garbled" input strings (the *.bin files). These could just as well be added to the unit tests with a lot fewer overhead. Is there some magic/external tool which would shuffle and iterate on these basic inputs, to cover more cases? How would these be invoked?

@martinpitt martinpitt marked this pull request as draft November 15, 2024 06:15
@martinpitt martinpitt added the question Further information is requested label Nov 15, 2024
@pkillarjun
Copy link
Author

pkillarjun commented Nov 15, 2024

Hello @pkillarjun ! Sorry for the lack of replies, we are all a bit overloaded right now.

Yes, I can see that.

Can you please explain the direction a little bit?

Well, the direction is: first, add Cockpit into oss-fuzz infra for the starters, and then update or add new fuzzing targets.

Note: I did try to create a fuzz target with a client fuzzer sending malformed input to a server. There are still some bugs in the implementation that need to be fixed.

At the moment this PR looks like it would just have a handful of static "slightly garbled" input strings (the *.bin files).

Yes, .bin may look weird; they are fuzzing target corpus.

These could just as well be added to the unit tests with a lot fewer overhead.

Yes, they can be used with a testing framework, but I would argue we shouldn't do that and let them be separated.
Also, I can add these .bin files into my oss-fuzz-bloat repo, so this PR won't look much bloated.

Is there some magic/external tool which would shuffle and iterate on these basic inputs, to cover more cases? How would these be invoked?

Yes, there are several magical tools; these two are the most important for now: LibFuzzer and AFLplusplus.

How to guide for cockpit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants