AFLplusplus / LibAFL

Advanced Fuzzing Library - Slot your Fuzzer together in Rust! Scales across cores and machines. For Windows, Android, MacOS, Linux, no_std, ...
Other
2.03k stars 319 forks source link

forkserver not running properly #770

Closed Be33eD closed 2 years ago

Be33eD commented 2 years ago

Describe the bug

In ForkserverExecutorBuilder build(), when status & FS_OPT_ENABLED == FS_OPT_ENABLED, write_ctl will be executed. see https://github.com/AFLplusplus/LibAFL/blob/main/libafl/src/executors/forkserver.rs#L630

But in aflplusplus, it also needs to satisfy (send_status & FS_OPT_SHDMEM_FUZZ == FS_OPT_SHDMEM_FUZZ) || (send_status & FS_OPT_AUTODICT == FS_OPT_AUTODICT). see https://github.com/AFLplusplus/AFLplusplus/blob/stable/instrumentation/afl-compiler-rt.o.c#L1028.

This may cause run_target not to execute as expected.

Expected behavior

Maybe the same conditions as aflpp should be added?

tokatoka commented 2 years ago

yes you are right.. additional check is needed thank you for reporting