Don't allow the stack to grow into hugetlb reserved regions (CVE-2007-3739)
commit2c70c535915f621fe51508076804b4575171a23d
authorAdam Litke <agl@us.ibm.com>
Fri, 19 Oct 2007 17:05:10 +0000 (19 19:05 +0200)
committerAdrian Bunk <bunk@kernel.org>
Fri, 19 Oct 2007 17:05:10 +0000 (19 19:05 +0200)
tree6160dacf53faaba579478790c2d5643579706c30
parentc19b3d848a376abb057d6c80788f424e4c565223
Don't allow the stack to grow into hugetlb reserved regions (CVE-2007-3739)

When expanding the stack, we don't currently check if the VMA will cross
into an area of the address space that is reserved for hugetlb pages.
Subsequent faults on the expanded portion of such a VMA will confuse the
low-level MMU code, resulting in an OOPS.  Check for this.

Signed-off-by: Adam Litke <agl@us.ibm.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
mm/mmap.c