ARM: prevent VM_GROWSDOWN mmaps extending below FIRST_USER_ADDRESS
Cc: <stable@vger.kernel.org> Reported-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
998de4acb2
commit
9b61a4d1b2
1 changed files with 3 additions and 1 deletions
|
@ -247,7 +247,9 @@ good_area:
|
|||
return handle_mm_fault(mm, vma, addr & PAGE_MASK, flags);
|
||||
|
||||
check_stack:
|
||||
if (vma->vm_flags & VM_GROWSDOWN && !expand_stack(vma, addr))
|
||||
/* Don't allow expansion below FIRST_USER_ADDRESS */
|
||||
if (vma->vm_flags & VM_GROWSDOWN &&
|
||||
addr >= FIRST_USER_ADDRESS && !expand_stack(vma, addr))
|
||||
goto good_area;
|
||||
out:
|
||||
return fault;
|
||||
|
|
Loading…
Reference in a new issue