Commit 9b61a4d1 authored by Russell King's avatar Russell King

ARM: prevent VM_GROWSDOWN mmaps extending below FIRST_USER_ADDRESS

Cc: <stable@vger.kernel.org>
Reported-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 998de4ac
...@@ -247,7 +247,9 @@ __do_page_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr, ...@@ -247,7 +247,9 @@ __do_page_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr,
return handle_mm_fault(mm, vma, addr & PAGE_MASK, flags); return handle_mm_fault(mm, vma, addr & PAGE_MASK, flags);
check_stack: 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; goto good_area;
out: out:
return fault; return fault;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment