-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Implement an option for treating crashing seeds as new crash #1821
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
Implement an option for treating crashing seeds as new crash #1821
Conversation
Signed-off-by: Junwha Hong <[email protected]>
Signed-off-by: Junwha <[email protected]>
include/afl-fuzz.h
Outdated
| old_seed_selection, /* use vanilla afl seed selection */ | ||
| reinit_table; /* reinit the queue weight table */ | ||
| reinit_table, /* reinit the queue weight table */ | ||
| crashing_seeds_as_new_crash; /* treat crashing seeds as normal corpus */ |
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.
this should be in afl_env_vars
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.
moved it as env variable!
src/afl-fuzz-init.c
Outdated
| "skipping", | ||
| fn, (int)(s8)afl->fsrv.crash_exitcode); | ||
|
|
||
| } else if (afl->crashing_seeds_as_new_crash) { |
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.
you need to take care of a crash with uses_crash_exitcode as well (above)
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.
basically, just reverse the if and else parts
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.
moved it to the inside of else statement
| close(fd); | ||
|
|
||
| afl->last_crash_time = get_cur_time(); | ||
| afl->last_crash_execs = afl->fsrv.total_execs; |
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.
you still need to set
q->disabled = 1;
q->perf_score = 0;
so the else should not be an else but mandatory code.
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.
moved it to the ouside of else
|
fyi - in your code change you saved the crash away but do not disable the crashing seed for fuzzing |
- and fix typo Signed-off-by: Junwha <[email protected]>
|
Thank you for your kindness review!:) is there anything else to fix? |
|
finger crossed AFL_CRASHING_SEEDS_AS_NEW_CRASH will behave as it should, that startup code is quite complex with the queue setup :) |
AFL_CRASHING_SEEDS_AS_NEW_CRASH