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

Writing a custom post processor #944

Open
r00tus3r opened this issue May 28, 2021 · 1 comment
Open

Writing a custom post processor #944

r00tus3r opened this issue May 28, 2021 · 1 comment

Comments

@r00tus3r
Copy link

@r00tus3r r00tus3r commented May 28, 2021

Hi, I also have a question regarding the custom post processor.

In the example https://github.com/AFLplusplus/AFLplusplus/blob/stable/custom_mutators/examples/post_library_gif.so.c#L48 it is mentioned that if the post process function returns 0 the input is not sent to the target program and fuzzing is continued. When I tried to do that same the fuzzer throws the error: Custom_post_process failed (ret: 0)

I guess that example is outdated and the latest one is https://github.com/AFLplusplus/AFLplusplus/blob/stable/custom_mutators/examples/example.c.

Also, I found that https://github.com/AFLplusplus/AFLplusplus/blob/stable/src/afl-fuzz-run.c#L189 expects the return value to be 0 only when there is an error.

Is there any other way I could make the post processor skip an unwanted test case and continue fuzzing?

@vanhauser-thc
Copy link
Member

@vanhauser-thc vanhauser-thc commented May 28, 2021

yes the post process example is outdated. 0 is an illegal return.
I see the point that it can make sense to instead of "post processing" just to do "input verification" and then skip on the skip if unworthy.
If you want you can send a PR that skips the fuzz attempt instead of erroring.

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

Successfully merging a pull request may close this issue.

None yet
2 participants