winafl icon indicating copy to clipboard operation
winafl copied to clipboard

Warning: post-fuzz handler was never reached.

Open lyliu opened this issue 5 years ago • 4 comments

Hi @ivanfratric! I was trying to fuzz ffmpeg on Windows. First, I used drrun.exe to find correct target_offset, I set the offset of main as the target_offset, but there was waring as title, what caused this problem, I made sure that the the "exit" function is called in main.

lyliu avatar Oct 30 '19 08:10 lyliu

The target function must not call exit as this causes the process to be terminated and post-fuzz handler not being reached. The target function should use return instead of exit.

ifratric avatar Oct 30 '19 08:10 ifratric

Thanks for replying, the main function of ffmpeg is end with "call exit_program" instead of return, the main function is the direct parent caller function of opening file and closing file. So, in this case, how to choose the target_offset?

lyliu avatar Oct 30 '19 08:10 lyliu

you need to choose a function which returns.

hardik05 avatar Nov 24 '19 17:11 hardik05

or you can patch the binary to jump on return

expend20 avatar Dec 22 '19 15:12 expend20