summaryrefslogtreecommitdiff
path: root/curvetun/Makefile
blob: 134e2c7a4b14fdbd58d7f728cc578210767b3bd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
curvetun-libs =	-l${CONFIG_NACL_LIB} \
		-lpthread

curvetun-objs =	xmalloc.o \
		epoll2.o \
		str.o \
		dev.o \
		stun.o \
		sock.o \
		sig.o \
		link.o \
		patricia.o \
		corking.o \
		trie.o \
		taia.o \
		hash.o \
		rnd.o \
		curve.o \
		curve_test.o \
		cookie.o \
		keypair.o \
		ioexact.o \
		ioops.o \
		cpusched.o \
		die.o \
		sysctl.o \
		curvetun_mgmt_servers.o \
		curvetun_mgmt_users.o \
		curvetun_server.o \
		curvetun_client.o \
		curvetun.o

curvetun-eflags = -I ${CONFIG_NACL_INC_DIR}

curvetun-confs =
/a> /fs/binfmt_script.c parent8d238027b87e654be552eabdf492042a34c5c300 (diff)
exec: use -ELOOP for max recursion depth
To avoid an explosion of request_module calls on a chain of abusive scripts, fail maximum recursion with -ELOOP instead of -ENOEXEC. As soon as maximum recursion depth is hit, the error will fail all the way back up the chain, aborting immediately. This also has the side-effect of stopping the user's shell from attempting to reexecute the top-level file as a shell script. As seen in the dash source: if (cmd != path_bshell && errno == ENOEXEC) { *argv-- = cmd; *argv = cmd = path_bshell; goto repeat; } The above logic was designed for running scripts automatically that lacked the "#!" header, not to re-try failed recursion. On a legitimate -ENOEXEC, things continue to behave as the shell expects. Additionally, when tracking recursion, the binfmt handlers should not be involved. The recursion being tracked is the depth of calls through search_binary_handler(), so that function should be exclusively responsible for tracking the depth. Signed-off-by: Kees Cook <keescook@chromium.org> Cc: halfdog <me@halfdog.net> Cc: P J P <ppandit@redhat.com> 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>
Diffstat (limited to 'fs/binfmt_script.c')