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

Custom mutator for libFuzzer mode #319

Open
turbolent opened this issue May 5, 2021 · 3 comments
Open

Custom mutator for libFuzzer mode #319

turbolent opened this issue May 5, 2021 · 3 comments

Comments

@turbolent
Copy link

I've read about custom mutators in LLVM's libFuzzer. Would it be possible to add support for it to go-fuzz's libFuzzer mode?

Would that basically involve adding a LLVMFuzzerCustomMutator function just like LLVMFuzzerTestOneInput is implemented, here:

func LLVMFuzzerTestOneInput(data uintptr, size uint64) int {
?

@dvyukov
Copy link
Owner

dvyukov commented May 6, 2021

Hi @turbolent,

Would it be possible to add support for it to go-fuzz's libFuzzer mode?

Adding new significant features to go-fuzz today makes little sense in the light of the fuzzing support in the standard library (you can find proposal and tracking issue in the Go issue tracker).

But if you want to do it locally, it should be possible.

Would that basically involve adding a LLVMFuzzerCustomMutator function just like LLVMFuzzerTestOneInput is implemented,

I guess so. Have you tried? Does it work?

@personnumber3377
Copy link

personnumber3377 commented Oct 27, 2024

@turbolent

Ok, so it has been quite a while and I got bored of waiting for someone else to do it, so I implemented this bullshit myself. I actually added support for python custom mutators, but I think this is close enough. I did a blog post here: https://personnumber3377.github.io/projects/implementing_python_mutators_for_go_fuzz.html which explains the hacky stuff which I had to do to get this to work. The fork of go-fuzz which has python custom mutators is here: https://github.com/personnumber3377/go-fuzz feel free to modify how you like.

Edit: Added another issue: #359

@wulie
Copy link

wulie commented Oct 27, 2024 via email

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

No branches or pull requests

4 participants