1*08b48e0bSAndroid Build Coastguard Worker# defork 2*08b48e0bSAndroid Build Coastguard Worker 3*08b48e0bSAndroid Build Coastguard Workerwhen the target forks, this breaks all normal fuzzing runs. 4*08b48e0bSAndroid Build Coastguard WorkerSometimes, though, it is enough to just run the child process. 5*08b48e0bSAndroid Build Coastguard WorkerIf this is the case, then this LD_PRELOAD library will always return 0 on fork, 6*08b48e0bSAndroid Build Coastguard Workerthe target will belive it is running as the child, post-fork. 7*08b48e0bSAndroid Build Coastguard Worker 8*08b48e0bSAndroid Build Coastguard WorkerThis is defork.c from the amazing preeny project 9*08b48e0bSAndroid Build Coastguard Workerhttps://github.com/zardus/preeny 10*08b48e0bSAndroid Build Coastguard Worker 11*08b48e0bSAndroid Build Coastguard WorkerIt is altered for AFL++ to work with its fork-server: the initial fork will go through, the second fork will be blocked. 12