-
Notifications
You must be signed in to change notification settings - Fork 52
Port qemu forkserver version to v1 #73
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
base: master
Are you sure you want to change the base?
Conversation
In addition to upgrading the forkserver version, some ijon support code has been added. However, the afl-fuzz part also needs to be modified, mainly to expand the bitmap, but it is a bit complicated.
|
||
static void qemu_ijon_init() { | ||
use_ijon = !!getenv("AFL_QEMU_IJON"); | ||
if (use_ijon == 0) return; |
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.
that line is pointless :-)
You could just add an AFL_QEMU_MAP_SIZE=xxxx and set this size in the qemu code for the map. |
accel/tcg/cpu-exec.c
Outdated
__afl_map_size += MAP_SIZE_IJON_MAP + MAP_SIZE_IJON_BYTES; | ||
|
||
ijon_map_ptr = afl_area_ptr + MAP_SIZE; | ||
ijon_max_ptr = ijon_map_ptr + MAP_SIZE; |
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 needs to be MAP_SIZE_IJON_MAP instead
On the afl-fuzz side, the map_size set by qemu mode seems to be fixed at 64k. If the map_size passed by qemu through forkserver is larger than 64k, an error will be thrown. The current idea is to delete the qemu_mode part in line 2570. https://github.com/AFLplusplus/AFLplusplus/blob/b5b5af1becbc31cdb03de508f841f7abc8edd1c0/src/afl-fuzz.c#L2570 ![]() |
…pository Updated forkserver code and ijon code. Next, we will add yaml parsing function to read user ijon settings from the configuration file.
I can take care of the afl-forkserver.c part in AFL++ You just need to remove the qemu_mode checks from: |
In addition to upgrading the forkserver version, some ijon support code has been added. However, the afl-fuzz part also needs to be modified, mainly to expand the bitmap, but it is a bit complicated.