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

Suggestion to add a note in documentation about LLVMFuzzerTestOneInput return value support by Honggfuzz. #11983

Open
kasper93 opened this issue May 21, 2024 · 1 comment

Comments

@kasper93
Copy link
Contributor

kasper93 commented May 21, 2024

LibFuzzer supports rejecting unwanted inputs with return -1 https://llvm.org/docs/LibFuzzer.html#rejecting-unwanted-inputs One may read this documentation and implement fuzzers that return -1 from LLVMFuzzerTestOneInput. Problem is, Honggfuzz has never been updated to support this and any other return value than 0 is fatal error. LOG_F calls exit(EXIT_FAILURE) https://github.com/google/honggfuzz/blob/348a47213919f14b9453e89a663b1515369bd9a2/libhfuzz/persistent.c#L67

Maybe it is on fuzzers developer to know that, but in my opinion would be nice to have a note/warning about this and if possible update Honggfuzz to at lest not exit on -1. Also it could be reported somehow, now it just resets the persistent process and goes on without feedback, except log file.

@kasper93 kasper93 changed the title Suggestion to add a note in documentation about LLVMFuzzerTestOneInput return value support. Suggestion to add a note in documentation about LLVMFuzzerTestOneInput return value support by Honggfuzz. May 21, 2024
@jonathanmetzman
Copy link
Contributor

This is a good find. I'm not really sure where we would put it though in the docs, but we are happy to accept any PRs :-)

Even better would be upstreaming a patch to honggfuzz to accept this behavior :-)

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

2 participants