-
Notifications
You must be signed in to change notification settings - Fork 517
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
Can't run honggfuzz on simple fauxware.c program #198
Comments
I think it's related to this code
if the file doesn't exist, or if read returns error, or 0, then in effect you're comparing user input to an uninitialized stack buffer, ususally filled with 0. so strcmp("", "") which gives 0. When I surround this code with #if 0
then it tries to find your sneaky password. Also, please be cautious with
as stack variables are not guaranteed to be cleared to 0, so this username/password variable might not end up with NUL-byte, and strcmp will result in b0f |
Also, it's better to compile with hfuzz-clang, as it'll instrument strcmp function.
And add faster instrumentation (trace-pc-guard, instead of bb) |
Well these were embarassing mistakes! Thanks for pointing them out. I modified the code to look like so:
I still get the same error in honggfuzz as before and the following log file:
This time I compiled the code with hfuzz-clang using the command you provided. |
Closing on old issues, please re-open with the current status, if you still encounter the problem |
Hello, I'm trying to run honggfuzz with the following on the simple fauxware.c program pasted below
I tried this using different compilers: clang-5.0 and the honggfuzz clang compiler with the following flags:
clang-5.0 -fsanitize=address -fsanitize-coverage=bb fauxware.c -o fauxwareinstru
I ran honggfuzz with the following commands:
../honggfuzz/honggfuzz --input input --workspace output --sancov --sanitizers --stdin_input -- binary/fauxwareinstru
However honggfuzz stops after the first itteration with the following output:
I also have a log file that I pasted below. This might be related to clang and be a very newbie question sorry in advance if that's the case. I was hoping for some advice and a way to move forward with this .
Sorry if the ask isn't super clear but I'm not really sure I understand what is going on so I can't really clarify.
Thanks in advance for the help on this!
Fauxware.c :
HF.sanitizer.log.29311:
The text was updated successfully, but these errors were encountered: