diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-08-07 18:18:09 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-08-07 18:18:09 +0200 |
commit | 248a67fb75a0d2c98f4f9935b7bb9e11382b2c78 (patch) | |
tree | eea88807a0b5d936d158ef7a62dfb051df174e96 /NOFORK_NOEXEC.lst | |
parent | 316d38e25883c68e51533029dbab059ae0731de8 (diff) | |
download | busybox-w32-248a67fb75a0d2c98f4f9935b7bb9e11382b2c78.tar.gz busybox-w32-248a67fb75a0d2c98f4f9935b7bb9e11382b2c78.tar.bz2 busybox-w32-248a67fb75a0d2c98f4f9935b7bb9e11382b2c78.zip |
free,stat: make NOEXEC
pkill/pgrep/pidof uncovered another quirk: what about noexec's _process names_?
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'NOFORK_NOEXEC.lst')
-rw-r--r-- | NOFORK_NOEXEC.lst | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/NOFORK_NOEXEC.lst b/NOFORK_NOEXEC.lst index 70f38d867..8ec3bdbe6 100644 --- a/NOFORK_NOEXEC.lst +++ b/NOFORK_NOEXEC.lst | |||
@@ -16,6 +16,8 @@ leak categories. | |||
16 | 16 | ||
17 | Why can't be NOEXEC: | 17 | Why can't be NOEXEC: |
18 | suid: runs under different uid - must fork+exec | 18 | suid: runs under different uid - must fork+exec |
19 | if it's important that /proc/PID/cmdline and comm are correct. | ||
20 | ("pkill sh" killing itself before it kills real "sh" is no fun) | ||
19 | 21 | ||
20 | Why shouldn't be NOFORK/NOEXEC: | 22 | Why shouldn't be NOFORK/NOEXEC: |
21 | rare: not started often enough to bother optimizing (example: poweroff) | 23 | rare: not started often enough to bother optimizing (example: poweroff) |
@@ -131,7 +133,7 @@ flash_unlock - hardware | |||
131 | flashcp - hardware | 133 | flashcp - hardware |
132 | flock - spawner, changes state (file locks), let's play safe and not be noexec | 134 | flock - spawner, changes state (file locks), let's play safe and not be noexec |
133 | fold - noexec. runner | 135 | fold - noexec. runner |
134 | free - nofork candidate(struct globals, needs to close /proc/meminfo fd) | 136 | free - noexec. nofork candidate(struct globals, needs to close /proc/meminfo fd) |
135 | freeramdisk - leaks: open+ioctl_or_perror_and_die | 137 | freeramdisk - leaks: open+ioctl_or_perror_and_die |
136 | fsck - interactive, longterm | 138 | fsck - interactive, longterm |
137 | fsck.minix - needs ^C | 139 | fsck.minix - needs ^C |
@@ -172,7 +174,7 @@ inotifyd - daemon | |||
172 | insmod - noexec | 174 | insmod - noexec |
173 | install - runner | 175 | install - runner |
174 | ionice - noexec. spawner | 176 | ionice - noexec. spawner |
175 | iostat - runner | 177 | iostat - longterm: "iostat 1" runs indefinitely |
176 | ip - noexec candidate | 178 | ip - noexec candidate |
177 | ipaddr - noexec candidate | 179 | ipaddr - noexec candidate |
178 | ipcalc - noexec candidate | 180 | ipcalc - noexec candidate |
@@ -244,7 +246,7 @@ mv - noexec candidate, runner | |||
244 | nameif - noexec. openlog(), leaks: config_open2+ioctl_or_perror_and_die | 246 | nameif - noexec. openlog(), leaks: config_open2+ioctl_or_perror_and_die |
245 | nbd-client - noexec | 247 | nbd-client - noexec |
246 | nc - runner | 248 | nc - runner |
247 | netstat - runner with -c | 249 | netstat - longterm with -c (continuous listing) |
248 | nice - noexec. spawner | 250 | nice - noexec. spawner |
249 | nl - runner | 251 | nl - runner |
250 | nmeter - longterm | 252 | nmeter - longterm |
@@ -257,13 +259,13 @@ partprobe - noexec. leaks: open+ioctl_or_perror_and_die(BLKRRPART) | |||
257 | passwd - suid | 259 | passwd - suid |
258 | paste - noexec. runner | 260 | paste - noexec. runner |
259 | patch - needs ^C | 261 | patch - needs ^C |
260 | pgrep - nofork candidate(xregcomp, procps_scan - are they ok?) | 262 | pgrep - must fork+exec to get correct /proc/PID/cmdline and comm field |
261 | pidof - nofork candidate(uses find_pid_by_name, is that ok?) | 263 | pidof - must fork+exec to get correct /proc/PID/cmdline and comm field |
262 | ping - suid, longterm | 264 | ping - suid, longterm |
263 | ping6 - suid, longterm | 265 | ping6 - suid, longterm |
264 | pipe_progress - longterm | 266 | pipe_progress - longterm |
265 | pivot_root - NOFORK | 267 | pivot_root - NOFORK |
266 | pkill - nofork candidate(xregcomp, procps_scan - are they ok?) | 268 | pkill - must fork+exec to get correct /proc/PID/cmdline and comm field |
267 | pmap - noexec candidate, leaks: open+xstrdup | 269 | pmap - noexec candidate, leaks: open+xstrdup |
268 | popmaildir - runner | 270 | popmaildir - runner |
269 | poweroff - rare | 271 | poweroff - rare |
@@ -329,7 +331,7 @@ sort - noexec. runner | |||
329 | split - runner | 331 | split - runner |
330 | ssl_client - longterm | 332 | ssl_client - longterm |
331 | start-stop-daemon - not noexec: uses bb_common_bufsiz1 | 333 | start-stop-daemon - not noexec: uses bb_common_bufsiz1 |
332 | stat - nofork candidate(needs fewer allocs) | 334 | stat - noexec. nofork candidate(needs fewer allocs) |
333 | strings - runner | 335 | strings - runner |
334 | stty - 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 | 336 | stty - 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 |
335 | su - suid, spawner | 337 | su - suid, spawner |
@@ -338,7 +340,7 @@ sum - runner | |||
338 | sv - noexec. needs ^C (uses usleep(420000)) | 340 | sv - noexec. needs ^C (uses usleep(420000)) |
339 | svc - noexec. needs ^C (uses usleep(420000)) | 341 | svc - noexec. needs ^C (uses usleep(420000)) |
340 | svlogd - daemon | 342 | svlogd - daemon |
341 | swapoff - rare | 343 | swapoff - longterm: may cause memory pressure, execing is beneficial |
342 | swapon - rare | 344 | swapon - rare |
343 | switch_root - spawner, rare, changes state (oh yes), execing may be important to free binary's inode | 345 | switch_root - spawner, rare, changes state (oh yes), execing may be important to free binary's inode |
344 | sync - NOFORK | 346 | sync - NOFORK |