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 b5ff52b commit f31b256Copy full SHA for f31b256
fs/exec.c
@@ -813,7 +813,8 @@ int setup_arg_pages(struct linux_binprm *bprm,
813
stack_base = calc_max_stack_size(stack_base);
814
815
/* Add space for stack randomization. */
816
- stack_base += (STACK_RND_MASK << PAGE_SHIFT);
+ if (current->flags & PF_RANDOMIZE)
817
+ stack_base += (STACK_RND_MASK << PAGE_SHIFT);
818
819
/* Make sure we didn't let the argument array grow too large. */
820
if (vma->vm_end - vma->vm_start > stack_base)
0 commit comments