Revision 1b528181b2ffa14721fb28ad1bd539fe1732c583 authored by Roland McGrath on 08 September 2010, 02:35:49 UTC, committed by Linus Torvalds on 10 September 2010, 15:10:26 UTC
The CONFIG_STACK_GROWSDOWN variant of setup_arg_pages() does not check the size of the argument/environment area on the stack. When it is unworkably large, shift_arg_pages() hits its BUG_ON. This is exploitable with a very large RLIMIT_STACK limit, to create a crash pretty easily. Check that the initial stack is not too large to make it possible to map in any executable. We're not checking that the actual executable (or intepreter, for binfmt_elf) will fit. So those mappings might clobber part of the initial stack mapping. But that is just userland lossage that userland made happen, not a kernel problem. Signed-off-by: Roland McGrath <roland@redhat.com> Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent be6200a
File | Mode | Size |
---|---|---|
Makefile | -rw-r--r-- | 394 bytes |
compat.c | -rw-r--r-- | 16.9 KB |
compat_mq.c | -rw-r--r-- | 4.0 KB |
ipc_sysctl.c | -rw-r--r-- | 5.1 KB |
ipcns_notifier.c | -rw-r--r-- | 2.2 KB |
mq_sysctl.c | -rw-r--r-- | 2.7 KB |
mqueue.c | -rw-r--r-- | 30.3 KB |
msg.c | -rw-r--r-- | 20.8 KB |
msgutil.c | -rw-r--r-- | 2.8 KB |
namespace.c | -rw-r--r-- | 3.3 KB |
sem.c | -rw-r--r-- | 40.3 KB |
shm.c | -rw-r--r-- | 25.8 KB |
syscall.c | -rw-r--r-- | 2.3 KB |
util.c | -rw-r--r-- | 22.9 KB |
util.h | -rw-r--r-- | 5.2 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...