-
Notifications
You must be signed in to change notification settings - Fork 568
Add a fuzzing host #1166
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
Merged
Merged
Add a fuzzing host #1166
+1,054
−3
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Copilot reviewed 13 out of 15 changed files in this pull request and generated no comments.
Files not reviewed (2)
- Garnet.sln: Language not supported
- test/Garnet.fuzz/Garnet.fuzz.csproj: Language not supported
Comments suppressed due to low confidence (2)
libs/server/Auth/GarnetNoAuthAuthenticator.cs:9
- [nitpick] Changing the access modifier to public may expose the no-authenticator functionality more broadly than intended; please confirm if this is deliberate or if it should remain internal.
public class GarnetNoAuthAuthenticator : IGarnetAuthenticator
libs/server/Resp/Parser/RespCommand.cs:2640
- Ensure that assigning the pointer from the input buffer does not lead to unsafe memory access outside the intended bounds; consider adding additional validation or a safer abstraction around pointer manipulation.
recvBufferPtr = (byte*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(buffer));
badrishc
approved these changes
Apr 16, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Makes some small changes to Garnet, and adds a new executable project for fuzzing purposes.
For MS employees, the intended fuzzer is OneFuzz which is (again) an internal tool.
However, this change should enable integration with any fuzzer and for non-MS employees to reproduce reports generated via OneFuzz.
For Garnet.fuzz, options are:
For the three initial targets:
RespServerSession.ParseCommand
LuaRunner.CompileForRunner
andLuaRunner.RunForRunner
EmbeddedRespServer
, and has some logic to nudge the fuzzer in the direction of RESP requestsAny arbitrary fuzzer can run using either standard input or files. OneFuzz would be invoked like
onefuzz template libfuzzer dotnet Garnet.fuzz Garnet.fuzz.dll <version> default bin\Release\net8.0 bin\Release\net8.0\Garnet.fuzz.dll Garnet.fuzz.Targets.<target> Fuzz
.Reproducing reports would use either
--input-file
or--input-directory
, depending on how they are provided.--run-count
is intended for cases where crashes do not reproduce on every invocation.