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

Added fuzzer to integrate Hiredis into OSS-fuzz #902

Merged
merged 2 commits into from
Dec 12, 2020

Conversation

AdamKorcz
Copy link
Contributor

@AdamKorcz AdamKorcz commented Dec 11, 2020

This PR adds a fuzzer that targets redisFormatCommand.

Fuzzing is a method of testing whereby pseudo-random data is passed to an application with the goal of finding bugs and vulnerabilities.

I have worked on running this fuzzer continuously through OSS-fuzz and have set up an integration on the OSS-fuzz side for this. If there is interest in fuzzing Hiredis continuously, all that is needed is for this fuzzer to be merged and at least one maintainers email address on the OSS-fuzz side. This will allow OSS-fuzz to run this fuzzer as well as all future fuzzers continuously, and in case bugs are found, maintainers get notified with an email containing a link to a detailed bug report. The service is free for open source projects and is offered with an implied expectation that bugs are fixed, so that the resources spent on fuzzing Hiredis go towards resolving bugs.

@AdamKorcz
Copy link
Contributor Author

As mentioned above, I have set up the necessary integration on the OSS-fuzz side here: google/oss-fuzz#4822.

@michael-grunder
Copy link
Collaborator

michael-grunder commented Dec 11, 2020

Hi @AdamKorcz thanks for the PR!

This is great. I'm happy to merge this with a couple of tiny changes (mostly formatting and the typecasts I referenced in comments).

Edit: And I'm happy to make the changes, i just want to make sure there aren't technical reasons for the casts.

@AdamKorcz
Copy link
Contributor Author

Perfect!

I am open to both making the changes myself and you making the changes.

I must admit I don't see any comments in the code at this time.

fuzzing/format_command_fuzzer.c Outdated Show resolved Hide resolved
fuzzing/format_command_fuzzer.c Outdated Show resolved Hide resolved
@michael-grunder
Copy link
Collaborator

Apologies, I failed to hit "submit" on the comments.

@AdamKorcz
Copy link
Contributor Author

AdamKorcz commented Dec 12, 2020

Both typecasts have been removed

@michael-grunder michael-grunder merged commit f746a28 into redis:master Dec 12, 2020
@michael-grunder
Copy link
Collaborator

Merged, thanks!

I'm happy to receive the automatic fuzzing emails.

My email should be public in my GitHub profile and can be found in some hiredis headers

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

Successfully merging this pull request may close these issues.

2 participants