diff --git a/src/osax/mach_loader.c b/src/osax/mach_loader.c index 0ee24da7..220b27b8 100644 --- a/src/osax/mach_loader.c +++ b/src/osax/mach_loader.c @@ -75,7 +75,7 @@ bool mach_loader_inject_payload(pid_t pid) return false; } - if (vm_protect(task, stack, stack_size, 0, VM_PROT_READ | VM_PROT_WRITE) != KERN_SUCCESS) { + if (vm_protect(task, stack, stack_size, 1, VM_PROT_READ | VM_PROT_WRITE) != KERN_SUCCESS) { fprintf(stderr, "could not change protection for stack segment\n"); return false; }