Re: forkbombing Linux distributions
From: Grant Coady
Date: Mon Mar 21 2005 - 00:17:49 EST
On Mon, 21 Mar 2005 14:27:55 +1100, Peter Chubb <peterc@xxxxxxxxxxxxxxxxxx> wrote:
>>>>>> "William" == William Beebe <wbeebe@xxxxxxxxx> writes:
>
>William> Sure enough, I created the following script and ran it as a
>William> non-root user:
>
>William> #!/bin/bash $0 & $0 &
>
>There are two approaches to fixing this.
> 1. Rate limit fork(). Unfortunately some legitimate usges do a lot
> of forking, and you don't really want to slow them down.
> 2. Limit (per user) the number of processes allowed. This is what's
> currently done; and if you as administrator want to you can set
> RLIMIT_NPROC in /etc/security/limits.conf
>
>On an almost-single-user system such as most desktops, there isn't much
>point in setting this. On shared systems, it can be useful.
Had to try it out of curiosity, five ssh logins at the time,
but I hit Ctrl-S on the terminal running forkbomb, then other
terminals responsive and I could recover, do 'killall forkbomb'.
Even 'top' segfaulted. Machine didn't die though.
slackware-current running 2.4.29-hf5
Just checked logs, messages: --> kernel: VFS: file-max limit 52427 reached
nothing in syslog or debug
Cheers,
Grant.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/