We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62f3e58 commit a17dfdeCopy full SHA for a17dfde
fs/exec.c
@@ -770,7 +770,8 @@ int setup_arg_pages(struct linux_binprm *bprm,
770
stack_base = calc_max_stack_size(stack_base);
771
772
/* Add space for stack randomization. */
773
- stack_base += (STACK_RND_MASK << PAGE_SHIFT);
+ if (current->flags & PF_RANDOMIZE)
774
+ stack_base += (STACK_RND_MASK << PAGE_SHIFT);
775
776
/* Make sure we didn't let the argument array grow too large. */
777
if (vma->vm_end - vma->vm_start > stack_base)
0 commit comments