hbowden / nextgen

A Genetic File, Syscall and Network Fuzzer.
Other
58 stars 15 forks source link

Nextgen on OSX stops creating child processes after a few seconds. #8

Closed hbowden closed 7 years ago

hbowden commented 7 years ago

As the title says nextgen stops creating additional child processes after just a few seconds on OSX. This does not effect FreeBSD, Linux's staus is unknown. The problem appears to be related to ptrace being called by the fuzz engine for fuzzing. The last system call called before nextgen fails is ptrace and sometimes you can get address sanitizer to spit out a stack trace and error message.

ptrace: REQUEST=14 PID=0x60200003e390 VOID_BUF=0x105561000 INT=2019931829ASAN:DEADLYSIGNAL
=================================================================
==15537==ERROR: AddressSanitizer: SEGV on unknown address 0x6210001068f0 (pc 0x7fff88639452 bp 0x7fff5aa759c0 sp 0x7fff5aa75998 T0)
Can't get child context
==15537==atos returned an error: atos[15539]: atos cannot examine process 15537 (nextgen) for unknown reasons, even though it appears to exist; try running with `sudo`.
    #0 0x7fff88639451 in __syscall (/usr/lib/system/libsystem_kernel.dylib+0x17451)
    #1 0x10544b7f0 in test_syscall (/Users/nah/desktop/nextgen/build/libnxsyscall.dylib+0x67f0)
    #2 0x10544c806 in start_syscall_child (/Users/nah/desktop/nextgen/build/libnxsyscall.dylib+0x7806)
    #3 0x10544c641 in start_child_loop (/Users/nah/desktop/nextgen/build/libnxsyscall.dylib+0x7641)
    #4 0x10544c4bb in start_child (/Users/nah/desktop/nextgen/build/libnxsyscall.dylib+0x74bb)
    #5 0x10544bc91 in create_child (/Users/nah/desktop/nextgen/build/libnxsyscall.dylib+0x6c91)
    #6 0x10544bab7 in start_main_syscall_loop (/Users/nah/desktop/nextgen/build/libnxsyscall.dylib+0x6ab7)
    #7 0x1051a327f in start_syscall_mode_runtime (/Users/nah/desktop/nextgen/build/libnxruntime.dylib+0x927f)
    #8 0x1051a3108 in start_runtime (/Users/nah/desktop/nextgen/build/libnxruntime.dylib+0x9108)
    #9 0x105193aee in main (/Users/nah/Desktop/nextgen/build/./nextgen+0x100009aee)
    #10 0x7fff87ac25ac in start (/usr/lib/system/libdyld.dylib+0x35ac)
    #11 0x5  (<unknown module>)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/usr/lib/system/libsystem_kernel.dylib+0x17451) in __syscall
==15537==ABORTING
hbowden commented 7 years ago

Should no longer be a problem.