[KLUG Members] Fork Bomb in linux

Adam Tauno Williams adam at morrison-ind.com
Wed Mar 23 08:58:42 EST 2005


> > True.  It should also be noted that this method can be used to bring down any
> > type of box, certainly including any version of Win32.
> yes except any of the BSD's and Debian all which out of the box would
> just shrug it off were as most others would lock up if this were run:
> --->8---- (forkbomb.sh) ----
> #!/bin/bash
> 
> for ((;;))
> do
>   ./forkbomb.sh
> done

On my SuSe 9.2 box this almost immediately results in -
./forkbomb.sh: fork: Resource temporarily unavailable

But then my "ulimit -u" responds with 300, whereas the default is 8055.
Your right that 8055 is probably ludicrous,  but i wouldn't be surprised
if a well endowed server could survive a 8,000 process spike as I've
seen running boxes with well more processes than that.

Any administrator running a box who hasn't bothered to
edit /etc/security/limits.conf deserves a good whacking anyway.

By guess would be that their argument for not imposing default limits is
that SuSe Pro and others are intended for desktop/workstation use;  so
what defaults would be reasonable?  And when one of those default limits
whacked someone's work they might not know where to go looking to adjust
it.  And servers should have attendant competent administrators.  What
would be interesting would be to see if RHEL and brethren place any more
emphasis on ulimits and associated values.  Whereas the Debian and BSD
people in general show no hesitation (for better or worse) to make rules
for other people and expect them to know how to break them if required.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://www.kalamazoolinux.org/pipermail/members/attachments/20050323/a01dbc41/attachment.bin


More information about the Members mailing list