aboutsummaryrefslogtreecommitdiff
path: root/NOFORK_NOEXEC.lst
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-08-04 19:55:01 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-08-04 19:55:01 +0200
commit5c527dc57e74c1b60c910dc1a3f3ec9683fca43d (patch)
tree03bbbda1f4869c079f381bea45c1cdbf6fcd35a7 /NOFORK_NOEXEC.lst
parent6514785f95878911b3ec88e2367234df74c14cd4 (diff)
downloadbusybox-w32-5c527dc57e74c1b60c910dc1a3f3ec9683fca43d.tar.gz
busybox-w32-5c527dc57e74c1b60c910dc1a3f3ec9683fca43d.tar.bz2
busybox-w32-5c527dc57e74c1b60c910dc1a3f3ec9683fca43d.zip
make 17 state-changing execing applets (ex: "nice PROG ARGS") noexec
The applets with "<applet> [opts] PROG ARGS" API very quickly exec another program, noexec is okay for them: chpst/envdir/envuidgid/softlimit/setuidgid chroot chrt ionice nice nohup setarch/linux32/linux64 taskset cttyhack "reset" and "sulogin" applets don't have this form, but also exec another program at once, thus made noexec too. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'NOFORK_NOEXEC.lst')
-rw-r--r--NOFORK_NOEXEC.lst46
1 files changed, 23 insertions, 23 deletions
diff --git a/NOFORK_NOEXEC.lst b/NOFORK_NOEXEC.lst
index ccd8f0c96..5ec9ae3fe 100644
--- a/NOFORK_NOEXEC.lst
+++ b/NOFORK_NOEXEC.lst
@@ -20,7 +20,7 @@ suid: runs under different uid - must fork+exec
20Why shouldn't be NOFORK/NOEXEC: 20Why shouldn't be NOFORK/NOEXEC:
21rare: not started often enough to bother optimizing (example: poweroff) 21rare: not started often enough to bother optimizing (example: poweroff)
22daemon: runs indefinitely; these are also always fit "rare" category 22daemon: runs indefinitely; these are also always fit "rare" category
23longterm: often runs for a long time (many seconds), execing would make 23longterm: often runs for a long time (many seconds), execing makes
24 memory footprint smaller 24 memory footprint smaller
25complex: no immediately obvious reason why NOFORK wouldn't work, 25complex: no immediately obvious reason why NOFORK wouldn't work,
26 but does some non-obvoius operations (example: fuser, lsof, losetup); 26 but does some non-obvoius operations (example: fuser, lsof, losetup);
@@ -66,9 +66,9 @@ chgrp - noexec. runner
66chmod - noexec. runner 66chmod - noexec. runner
67chown - noexec. runner 67chown - noexec. runner
68chpasswd - runner (list of "user:password"s from stdin) 68chpasswd - runner (list of "user:password"s from stdin)
69chpst - noexec candidate, spawner 69chpst - noexec. spawner
70chroot - noexec candidate, spawner 70chroot - noexec. spawner
71chrt - noexec candidate, spawner 71chrt - noexec. spawner
72chvt - leaks: get_console_fd_or_die() may open a new fd, or return one of stdio fds. Also, "rare" category. noexec candidate. 72chvt - leaks: get_console_fd_or_die() may open a new fd, or return one of stdio fds. Also, "rare" category. noexec candidate.
73cksum - noexec. runner 73cksum - noexec. runner
74clear - NOFORK 74clear - NOFORK
@@ -80,7 +80,7 @@ cpio - runner
80crond - daemon 80crond - daemon
81crontab 0 leaks: open+xasprintf 81crontab 0 leaks: open+xasprintf
82cryptpw - changes state: with --password-fd=N, moves N to stdin. Also, "rare" category. noexec candidate. 82cryptpw - changes state: with --password-fd=N, moves N to stdin. Also, "rare" category. noexec candidate.
83cttyhack - noexec candidate, spawner 83cttyhack - noexec. spawner
84cut - noexec. runner 84cut - noexec. runner
85date - noexec. nofork candidate(needs to stop messing up env, free xasprintf result, not use xfuncs after xasprintf) 85date - noexec. nofork candidate(needs to stop messing up env, free xasprintf result, not use xfuncs after xasprintf)
86dc - runner (eats stdin if no params) 86dc - runner (eats stdin if no params)
@@ -107,8 +107,8 @@ ed - interactive, longterm
107egrep - longterm runner ("CMD | egrep ..." may run indefinitely, better to exec to conserve memory) 107egrep - longterm runner ("CMD | egrep ..." may run indefinitely, better to exec to conserve memory)
108eject - leaks: open+ioctl_or_perror_and_die, changes state (moves fds) 108eject - leaks: open+ioctl_or_perror_and_die, changes state (moves fds)
109env - noexec. spawner, changes state (env) 109env - noexec. spawner, changes state (env)
110envdir - noexec candidate, spawner 110envdir - noexec. spawner
111envuidgid - noexec candidate, spawner 111envuidgid - noexec. spawner
112expand - runner 112expand - runner
113expr - leaks: nested allocs 113expr - leaks: nested allocs
114factor - runner (eats stdin if no params) 114factor - runner (eats stdin if no params)
@@ -128,7 +128,7 @@ flash_eraseall
128flash_lock 128flash_lock
129flash_unlock 129flash_unlock
130flashcp 130flashcp
131flock - spawner, changes state (file locks) 131flock - spawner, changes state (file locks), let's play safe and not be noexec
132fold - noexec. runner 132fold - noexec. runner
133free - nofork candidate(struct globals, needs to close /proc/meminfo fd) 133free - nofork candidate(struct globals, needs to close /proc/meminfo fd)
134freeramdisk - leaks: open+ioctl_or_perror_and_die 134freeramdisk - leaks: open+ioctl_or_perror_and_die
@@ -170,7 +170,7 @@ init - daemon
170inotifyd - daemon 170inotifyd - daemon
171insmod - noexec 171insmod - noexec
172install - runner 172install - runner
173ionice - spawner 173ionice - noexec. spawner
174iostat - runner 174iostat - runner
175ip - noexec candidate 175ip - noexec candidate
176ipaddr - noexec candidate 176ipaddr - noexec candidate
@@ -190,8 +190,8 @@ klogd - daemon
190last - runner (I've got 1300 lines of output when tried it) 190last - runner (I've got 1300 lines of output when tried it)
191less - interactive, longterm 191less - interactive, longterm
192link - NOFORK 192link - NOFORK
193linux32 - spawner 193linux32 - noexec. spawner
194linux64 - spawner 194linux64 - noexec. spawner
195linuxrc - daemon 195linuxrc - daemon
196ln - noexec 196ln - noexec
197loadfont - leaks: config_open+bb_error_msg_and_die("map format") 197loadfont - leaks: config_open+bb_error_msg_and_die("map format")
@@ -247,11 +247,11 @@ netstat - runner with -c
247nice - noexec candidate, spawner 247nice - noexec candidate, spawner
248nl - runner 248nl - runner
249nmeter - longterm 249nmeter - longterm
250nohup - noexec candidate (maybe free concat_path_file result?), spawner 250nohup - noexec. spawner
251nproc - NOFORK 251nproc - NOFORK
252ntpd - daemon 252ntpd - daemon
253od - runner 253od - runner
254openvt - spawner 254openvt - longterm: spawns a child and waits for it
255partprobe - noexec candidate (simple), leaks: open+ioctl_or_perror_and_die(BLKRRPART) 255partprobe - noexec candidate (simple), leaks: open+ioctl_or_perror_and_die(BLKRRPART)
256passwd - suid 256passwd - suid
257paste - noexec. runner 257paste - noexec. runner
@@ -304,15 +304,15 @@ scriptreplay
304sed - runner 304sed - runner
305sendmail - runner 305sendmail - runner
306seq - noexec. runner 306seq - noexec. runner
307setarch - spawner 307setarch - noexec. spawner
308setconsole 308setconsole
309setfont 309setfont
310setkeycodes 310setkeycodes
311setlogcons 311setlogcons
312setpriv - spawner 312setpriv - spawner, changes state, let's play safe and not be noexec
313setserial 313setserial
314setsid - spawner 314setsid - spawner, uses fork_or_rexec() [not audted to work in noexec], let's play safe and not be noexec
315setuidgid 315setuidgid - noexec. spawner
316sha1sum - noexec. runner 316sha1sum - noexec. runner
317sha256sum - noexec. runner 317sha256sum - noexec. runner
318sha3sum - noexec. runner 318sha3sum - noexec. runner
@@ -323,7 +323,7 @@ shuf - noexec. runner
323slattach 323slattach
324sleep - runner, longterm 324sleep - runner, longterm
325smemcap - runner 325smemcap - runner
326softlimit - noexec candidate, spawner 326softlimit - noexec. spawner
327sort - noexec. runner 327sort - noexec. runner
328split - runner 328split - runner
329ssl_client - longterm 329ssl_client - longterm
@@ -332,21 +332,21 @@ stat - nofork candidate(needs fewer allocs)
332strings - runner 332strings - runner
333stty - noexec/nofork candidate. has no allocs or opens except xmove_fd(xopen("-F DEVICE"),STDIN). tcsetattr(STDIN) is not a problem: it would work the same across processes sharing this fd 333stty - noexec/nofork candidate. has no allocs or opens except xmove_fd(xopen("-F DEVICE"),STDIN). tcsetattr(STDIN) is not a problem: it would work the same across processes sharing this fd
334su - suid, spawner 334su - suid, spawner
335sulogin - spawner 335sulogin - noexec. spawner
336sum - runner 336sum - runner
337sv - noexec candidate, needs ^C (uses usleep(420000)) 337sv - noexec candidate, needs ^C (uses usleep(420000))
338svc - noexec candidate, needs ^C (uses usleep(420000)) 338svc - noexec candidate, needs ^C (uses usleep(420000))
339svlogd - daemon 339svlogd - daemon
340swapoff - rare 340swapoff - rare
341swapon - rare 341swapon - rare
342switch_root - spawner, rare, changes state 342switch_root - spawner, rare, changes state (oh yes), execing may be important to free binary's inode
343sync - NOFORK 343sync - NOFORK
344sysctl - noexec candidate, leaks: xstrdup+xmalloc_read 344sysctl - noexec candidate, leaks: xstrdup+xmalloc_read
345syslogd - daemon 345syslogd - daemon
346tac - noexec. runner 346tac - noexec. runner
347tail - runner 347tail - runner
348tar - runner 348tar - runner
349taskset - spawner 349taskset - noexec. spawner
350tcpsvd - daemon 350tcpsvd - daemon
351tee - runner 351tee - runner
352telnet - interactive, longterm 352telnet - interactive, longterm
@@ -354,8 +354,8 @@ telnetd - daemon
354test - NOFORK 354test - NOFORK
355tftp - runner 355tftp - runner
356tftpd - daemon 356tftpd - daemon
357time - spawner, changes state (signals) 357time - spawner, longterm, changes state (signals)
358timeout - spawner, changes state (signals) 358timeout - spawner, longterm, changes state (signals)
359top - interactive, longterm 359top - interactive, longterm
360touch - NOFORK 360touch - NOFORK
361tr - runner 361tr - runner