aboutsummaryrefslogtreecommitdiff
path: root/NOFORK_NOEXEC.lst
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-08-03 19:00:01 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-08-03 19:03:32 +0200
commit39194f030918b87eeb3e11e94cfa05f575fb47b4 (patch)
tree97ea35e2c5984c5c6757ff9a540630ada4b234d5 /NOFORK_NOEXEC.lst
parent663ae52676eae3b0fdc6bb968ff6497279a034a4 (diff)
downloadbusybox-w32-39194f030918b87eeb3e11e94cfa05f575fb47b4.tar.gz
busybox-w32-39194f030918b87eeb3e11e94cfa05f575fb47b4.tar.bz2
busybox-w32-39194f030918b87eeb3e11e94cfa05f575fb47b4.zip
new NOFORKs: pwdx,kill[all5],ttysize,realpath,readlink NOEXECs: date,resize
function old new delta run_nofork_applet 258 280 +22 readlink_main 112 123 +11 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 33/0) Total: 33 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'NOFORK_NOEXEC.lst')
-rw-r--r--NOFORK_NOEXEC.lst140
1 files changed, 71 insertions, 69 deletions
diff --git a/NOFORK_NOEXEC.lst b/NOFORK_NOEXEC.lst
index 02eba46e8..7073611a4 100644
--- a/NOFORK_NOEXEC.lst
+++ b/NOFORK_NOEXEC.lst
@@ -1,11 +1,10 @@
1Why an applet can't be NOFORK or NOEXEC? 1Why an applet can't be NOFORK or NOEXEC?
2 2
3Why can't be NOFORK: 3Why can't be NOFORK:
4daemon: runs indefinitely
5interactive: may wait for user input, ^C has to work 4interactive: may wait for user input, ^C has to work
6spawner: "tool PROG ARGS" which changes program's environment - must fork 5spawner: "tool PROG ARGS" which changes program's environment - must fork
7changes state: e.g. environment, signal handlers 6changes state: e.g. environment, signal handlers
8runner: sometimes may run for long time, and/or works with network: 7runner: sometimes may run for long(ish) time, and/or works with network:
9 ^C has to work (cat BIGFILE, chmod -R, ftpget, nc) 8 ^C has to work (cat BIGFILE, chmod -R, ftpget, nc)
10 9
11"runners" can become eligible after hush is taught ^C to interrupt NOFORKs! 10"runners" can become eligible after hush is taught ^C to interrupt NOFORKs!
@@ -15,9 +14,12 @@ suid: runs under different uid - must fork+exec
15 14
16Why shouldn't be NOFORK/NOEXEC: 15Why shouldn't be NOFORK/NOEXEC:
17complex: no immediately obvious reason why NOFORK wouldn't work, 16complex: no immediately obvious reason why NOFORK wouldn't work,
18 but does some non-obvoius operations (example: fuser, lsof, losetup). 17 but does some non-obvoius operations (example: fuser, lsof, losetup);
19 for NOFORK, nested xmallocs (typical in complex code) is a problem. 18 nested xmallocs (typical in complex code) is a problem for NOFORK
20rare: not used often enough to bother optimizing (example: poweroff) 19rare: not used often enough to bother optimizing (example: poweroff)
20longterm: often runs for a long time (many seconds), execing would make
21 memory footprint smaller
22daemon: runs indefinitely
21 23
22[ - NOFORK 24[ - NOFORK
23[[ - NOFORK 25[[ - NOFORK
@@ -31,7 +33,7 @@ arch - NOFORK
31arp 33arp
32arping - runner 34arping - runner
33ash - interactive 35ash - interactive
34awk - noexec, runner 36awk - noexec. runner
35base64 - runner 37base64 - runner
36basename - NOFORK 38basename - NOFORK
37beep 39beep
@@ -44,63 +46,63 @@ bunzip2 - runner
44busybox 46busybox
45bzcat - runner 47bzcat - runner
46bzip2 - runner 48bzip2 - runner
47cal 49cal - runner: cal -n9999
48cat - runner 50cat - runner
49chat 51chat
50chattr - runner 52chattr - runner
51chgrp - noexec, runner 53chgrp - noexec. runner
52chmod - noexec, runner 54chmod - noexec. runner
53chown - noexec, runner 55chown - noexec. runner
54chpasswd - runner (list of "user:password"s from stdin) 56chpasswd - runner (list of "user:password"s from stdin)
55chpst - spawner 57chpst - spawner
56chroot - spawner 58chroot - spawner
57chrt - spawner 59chrt - spawner
58chvt 60chvt
59cksum - noexec, runner 61cksum - noexec. runner
60clear - NOFORK 62clear - NOFORK
61cmp - runner 63cmp - runner
62comm - runner 64comm - runner
63conspy - interactive 65conspy - interactive
64cp - noexec, runner 66cp - noexec. runner
65cpio - runner 67cpio - runner
66crond - daemon 68crond - daemon
67crontab 69crontab
68cryptpw 70cryptpw
69cttyhack - spawner 71cttyhack - spawner
70cut - noexec, runner 72cut - noexec. runner
71date 73date - noexec. nofork candidate(needs to stop messing up env, free xasprintf result, not use xfuncs after xasprintf)
72dc - runner (eats stdin if no params) 74dc - runner (eats stdin if no params)
73dd - noexec, runner 75dd - noexec. runner
74deallocvt 76deallocvt
75delgroup 77delgroup
76deluser 78deluser
77depmod 79depmod
78devmem 80devmem - runner, complex (access to device memory may hang)
79df 81df - complex (nested allocs)
80dhcprelay - daemon 82dhcprelay - daemon
81diff - runner 83diff - runner
82dirname - NOFORK 84dirname - NOFORK
83dmesg 85dmesg - runner
84dnsd - daemon 86dnsd - daemon
85dnsdomainname 87dnsdomainname - DNS resolution may trigger, need ^C
86dos2unix - noexec, runner 88dos2unix - noexec. runner
87dpkg - runner 89dpkg - runner
88du 90du - runner
89dumpkmap 91dumpkmap
90dumpleases 92dumpleases
91echo - NOFORK 93echo - NOFORK
92ed - interactive 94ed - interactive
93egrep - runner 95egrep - runner
94eject 96eject
95env - noexec, changes state (env) 97env - noexec. changes state (env)
96envdir - spawner 98envdir - spawner
97envuidgid - spawner 99envuidgid - spawner
98expand - runner 100expand - runner
99expr 101expr - complex (nested allocs)
100factor - runner (eats stdin if no params) 102factor - runner (eats stdin if no params)
101fakeidentd - daemon 103fakeidentd - daemon
102false - NOFORK 104false - NOFORK
103fatattr 105fatattr - complex (xopen+xioctl can leak fd)
104fbset 106fbset
105fbsplash - runner, interactive 107fbsplash - runner, interactive
106fdflush 108fdflush
@@ -108,15 +110,15 @@ fdformat - runner
108fdisk - interactive 110fdisk - interactive
109fgconsole 111fgconsole
110fgrep - runner 112fgrep - runner
111find - noexec, runner 113find - noexec. runner
112findfs - suid 114findfs - suid
113flash_eraseall 115flash_eraseall
114flash_lock 116flash_lock
115flash_unlock 117flash_unlock
116flashcp 118flashcp
117flock 119flock
118fold - noexec, runner 120fold - noexec. runner
119free 121free - nofork candidate(struct globals, needs to close /proc/meminfo fd)
120freeramdisk 122freeramdisk
121fsck - interactive 123fsck - interactive
122fsck.minix 124fsck.minix
@@ -134,12 +136,12 @@ groups - noexec
134gunzip - runner 136gunzip - runner
135gzip - runner 137gzip - runner
136halt - rare 138halt - rare
137hd - noexec, runner 139hd - noexec. runner
138hdparm - complex, rare 140hdparm - complex, rare
139head - noexec, runner 141head - noexec. runner
140hexdump - noexec, runner 142hexdump - noexec. runner
141hostid - NOFORK 143hostid - NOFORK
142hostname 144hostname - DNS resolution may trigger, need ^C
143httpd - daemon 145httpd - daemon
144hush - interactive 146hush - interactive
145hwclock 147hwclock
@@ -169,11 +171,11 @@ iproute
169iprule 171iprule
170iptunnel 172iptunnel
171kbd_mode 173kbd_mode
172kill 174kill - NOFORK
173killall 175killall - NOFORK
174killall5 176killall5 - NOFORK
175klogd - daemon 177klogd - daemon
176last 178last - runner (I've got 1300 lines of output when tried it)
177less - interactive 179less - interactive
178link - NOFORK 180link - NOFORK
179linux32 - spawner 181linux32 - spawner
@@ -189,7 +191,7 @@ losetup - complex
189lpd - daemon 191lpd - daemon
190lpq - runner 192lpq - runner
191lpr - runner 193lpr - runner
192ls - noexec, runner 194ls - noexec. runner
193lsattr 195lsattr
194lsmod 196lsmod
195lsof - complex 197lsof - complex
@@ -203,7 +205,7 @@ lzopcat - runner
203makedevs 205makedevs
204makemime - runner 206makemime - runner
205man - spawner, interactive 207man - spawner, interactive
206md5sum - noexec, runner 208md5sum - noexec. runner
207mdev - daemon 209mdev - daemon
208mesg 210mesg
209microcom - interactive, complex 211microcom - interactive, complex
@@ -225,11 +227,11 @@ mount - suid
225mountpoint 227mountpoint
226mpstat 228mpstat
227mt 229mt
228mv 230mv - runner (can be noexec?)
229nameif 231nameif
230nbd-client 232nbd-client
231nc - runner 233nc - runner
232netstat 234netstat - runner with -c
233nice - spawner 235nice - spawner
234nl - runner 236nl - runner
235nmeter - runner 237nmeter - runner
@@ -240,40 +242,40 @@ od - runner
240openvt - spawner 242openvt - spawner
241partprobe 243partprobe
242passwd - suid 244passwd - suid
243paste - noexec, runner 245paste - noexec. runner
244patch 246patch
245pgrep 247pgrep - nofork candidate(xregcomp, procps_scan - are they ok?)
246pidof 248pidof - nofork candidate(uses find_pid_by_name, is that ok?)
247ping - suid, runner 249ping - suid, runner
248ping6 - suid, runner 250ping6 - suid, runner
249pipe_progress 251pipe_progress
250pivot_root 252pivot_root
251pkill 253pkill - nofork candidate(xregcomp, procps_scan - are they ok?)
252pmap 254pmap
253popmaildir - runner 255popmaildir - runner
254poweroff - rare 256poweroff - rare
255powertop - interactive 257powertop - interactive, longterm
256printenv - NOFORK 258printenv - NOFORK
257printf - NOFORK 259printf - NOFORK
258ps 260ps
259pscan 261pscan
260pstree 262pstree
261pwd - NOFORK 263pwd - NOFORK
262pwdx 264pwdx - NOFORK
263raidautorun 265raidautorun
264rdate 266rdate
265rdev 267rdev
266readlink 268readlink - NOFORK
267readprofile 269readprofile
268realpath 270realpath - NOFORK
269reboot - rare 271reboot - rare
270reformime - runner 272reformime - runner
271remove-shell 273remove-shell
272renice 274renice - nofork candidate(uses getpwnam, is that ok?)
273reset - spawner (execs "stty") 275reset - spawner (execs "stty")
274resize 276resize - noexec. changes state (signal handlers)
275rev - runner 277rev - runner
276rm - noexec, rm -i interactive 278rm - noexec. rm -i interactive
277rmdir - NOFORK 279rmdir - NOFORK
278rmmod 280rmmod
279route 281route
@@ -289,7 +291,7 @@ script
289scriptreplay 291scriptreplay
290sed - runner 292sed - runner
291sendmail - runner 293sendmail - runner
292seq - noexec, runner 294seq - noexec. runner
293setarch - spawner 295setarch - spawner
294setconsole 296setconsole
295setfont 297setfont
@@ -300,22 +302,22 @@ setserial
300setsid - spawner 302setsid - spawner
301setuidgid 303setuidgid
302sh - interactive 304sh - interactive
303sha1sum - noexec, runner 305sha1sum - noexec. runner
304sha256sum - noexec, runner 306sha256sum - noexec. runner
305sha3sum - noexec, runner 307sha3sum - noexec. runner
306sha512sum - noexec, runner 308sha512sum - noexec. runner
307showkey - interactive 309showkey - interactive
308shred - runner 310shred - runner
309shuf - noexec, runner 311shuf - noexec. runner
310slattach 312slattach
311sleep - runner 313sleep - runner
312smemcap - runner 314smemcap - runner
313softlimit - spawner 315softlimit - spawner
314sort - noexec, runner 316sort - noexec. runner
315split - runner 317split - runner
316ssl_client - network 318ssl_client - network
317start-stop-daemon 319start-stop-daemon
318stat 320stat - nofork candidate(needs fewer allocs)
319strings - runner 321strings - runner
320stty 322stty
321su - suid, spawner 323su - suid, spawner
@@ -326,11 +328,11 @@ svc
326svlogd - daemon 328svlogd - daemon
327swapoff - rare 329swapoff - rare
328swapon - rare 330swapon - rare
329switch_root - spawner, rare, change state 331switch_root - spawner, rare, changes state
330sync - NOFORK 332sync - NOFORK
331sysctl 333sysctl
332syslogd - daemon 334syslogd - daemon
333tac - noexec, runner 335tac - noexec. runner
334tail - runner 336tail - runner
335tar - runner 337tar - runner
336taskset - spawner 338taskset - spawner
@@ -341,9 +343,9 @@ telnetd - daemon
341test - NOFORK 343test - NOFORK
342tftp - runner 344tftp - runner
343tftpd - daemon 345tftpd - daemon
344time - spawner, change state (signals) 346time - spawner, changes state (signals)
345timeout - spawner, change state (signals) 347timeout - spawner, changes state (signals)
346top - interactive 348top - interactive, longterm
347touch - NOFORK 349touch - NOFORK
348tr - runner 350tr - runner
349traceroute - suid, runner 351traceroute - suid, runner
@@ -351,7 +353,7 @@ traceroute6 - suid, runner
351true - NOFORK 353true - NOFORK
352truncate - NOFORK 354truncate - NOFORK
353tty - NOFORK 355tty - NOFORK
354ttysize 356ttysize - NOFORK
355tunctl 357tunctl
356tune2fs 358tune2fs
357ubiattach 359ubiattach
@@ -370,14 +372,14 @@ uname - NOFORK
370uncompress - runner 372uncompress - runner
371unexpand - runner 373unexpand - runner
372uniq - runner 374uniq - runner
373unix2dos - noexec, runner 375unix2dos - noexec. runner
374unlink - NOFORK 376unlink - NOFORK
375unlzma - runner 377unlzma - runner
376unlzop - runner 378unlzop - runner
377unxz - runner 379unxz - runner
378unzip - runner 380unzip - runner
379uptime 381uptime - nofork candidate(is getutxent ok?)
380users 382users - nofork candidate(is getutxent ok?)
381usleep - NOFORK 383usleep - NOFORK
382uudecode - runner 384uudecode - runner
383uuencode - runner 385uuencode - runner
@@ -395,10 +397,10 @@ which - NOFORK
395who 397who
396whoami - NOFORK 398whoami - NOFORK
397whois 399whois
398xargs - noexec, spawner 400xargs - noexec. spawner
399xxd - noexec, runner 401xxd - noexec. runner
400xz - runner 402xz - runner
401xzcat - runner 403xzcat - runner
402yes - noexec, runner 404yes - noexec. runner
403zcat - runner 405zcat - runner
404zcip - daemon 406zcip - daemon