jtpereyda / boofuzz

A fork and successor of the Sulley Fuzzing Framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fuzzing session prevents application from exiting with `exit()` or `sys.exit()`

678098 opened this issue · comments

Fuzzing main loop handles all exceptions, but for SystemExit exception (that is being generated when exit() or sys.exit() is called) it just doesn't stop. So it's impossible to exit fuzzing application from another thread with exit() or sys.exit().

Workaround: brutally exit with os._exit() (it just doesn't raise SystemExit exception).

Can you tell us where exactly the SystemExit exception is being caught?
I tried a raise SystemExit in _main_fuzz_loop but that exited the program just fine.

def _main_fuzz_loop(self, fuzz_case_iterator):

We catch Exception in some places, which I have to admit is not pretty, but doesn't catch BaseException which SystemExit or KeyboardInterrupt inherit from. I couldn't find any occurrences of base except: so SystemExit should work. https://docs.python.org/3/library/exceptions.html#Exception

I will double check it soon