Files
linux-legacy/include/linux
Kirill A. Shutemov bf2a9a3963 Allow recursion in binfmt_script and binfmt_misc
binfmt_script and binfmt_misc disallow recursion to avoid stack overflow
using sh_bang and misc_bang.  It causes problem in some cases:

$ echo '#!/bin/ls' > /tmp/t0
$ echo '#!/tmp/t0' > /tmp/t1
$ echo '#!/tmp/t1' > /tmp/t2
$ chmod +x /tmp/t*
$ /tmp/t2
zsh: exec format error: /tmp/t2

Similar problem with binfmt_misc.

This patch introduces field 'recursion_depth' into struct linux_binprm to
track recursion level in binfmt_misc and binfmt_script.  If recursion
level more then BINPRM_MAX_RECURSION it generates -ENOEXEC.

[akpm@linux-foundation.org: make linux_binprm.recursion_depth a uint]
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Pavel Emelyanov <xemul@openvz.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-16 11:21:38 -07:00
..
2008-10-13 21:51:51 +01:00
2008-09-12 16:30:20 -07:00
2008-10-09 08:56:22 +02:00
2008-10-16 11:21:32 -07:00
2008-10-10 13:37:12 +01:00
2007-02-09 17:39:36 -05:00
2008-10-12 12:05:55 +02:00
2008-10-08 19:44:18 -04:00
2006-10-02 07:57:12 -07:00
2008-09-22 07:29:31 +01:00
2008-10-14 23:51:02 +02:00
2008-10-09 11:59:55 -07:00
2008-09-22 21:28:11 -07:00
2008-10-07 15:34:37 -07:00
2008-10-16 11:21:31 -07:00
2008-10-12 11:44:37 -07:00
2008-02-06 10:41:01 -08:00
2008-10-13 09:47:43 +11:00
2008-10-09 08:56:06 +02:00
2005-04-16 15:20:36 -07:00
2008-10-14 23:50:47 +02:00
2008-07-24 10:47:24 -07:00
2005-04-16 15:20:36 -07:00
2006-11-30 04:40:22 +01:00
2008-06-06 11:29:12 -07:00
2008-10-01 07:03:24 -07:00
2006-08-27 11:01:32 -07:00
2008-02-14 21:13:33 -08:00
2008-10-08 16:38:41 -07:00
2008-09-16 19:35:05 -07:00
2006-10-03 23:01:26 +02:00
2008-10-02 15:53:13 -07:00
2008-09-22 19:51:15 -07:00
2008-10-12 12:37:32 +02:00
2008-10-07 14:22:33 -07:00
2005-04-16 15:20:36 -07:00
2008-07-26 20:53:12 -04:00
2008-10-07 14:43:06 -07:00
2008-10-13 09:51:40 -07:00
2008-10-16 11:21:33 -07:00
2008-08-16 16:45:56 -07:00
2008-10-16 11:21:31 -07:00
2008-07-25 10:53:40 -07:00