All of lore.kernel.org
 help / color / mirror / Atom feed
* evading ulimits
@ 2006-12-22 21:23 John Richard Moser
  2006-12-24  0:12 ` Jan Engelhardt
  0 siblings, 1 reply; 6+ messages in thread
From: John Richard Moser @ 2006-12-22 21:23 UTC (permalink / raw)
  To: linux-kernel

I've set up some stuff on my box where /etc/security/limits.conf
contains the following:

@users          soft    nproc           3072
@users          hard    nproc           4096

I'm in group users, and a simple fork bomb is easily quashed by this:

bluefox@icebox:~$ :(){ :|:; };:
bash: fork: Resource temporarily unavailable
Terminated

Oddly enough, trying this again and again yields the same results; but,
I can kill the box (eventually; about 1 minute in I managed to `/exec
killall -9 bash` from x-chat, since I couldn't get a new shell open)
with the below:

bluefox@icebox:~$ :(){ :|:|:; };:

How exactly does the ulimit work?  Why do I seem to be able to evade
limits on maximum number of processes by doing a bigger fork bomb?  I
would have thought that the above would have terminated much sooner,
since it was spawning x^3 processes instead of x^2 for iteration x and
should have hit 4096 a lot sooner.


-- 
    We will enslave their women, eat their children and rape their
    cattle!
             -- Bosc, Evil alien overlord from the fifth dimension
Anti-Spam:  https://bugzilla.mozilla.org/show_bug.cgi?id=229686

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-12-24 10:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-22 21:23 evading ulimits John Richard Moser
2006-12-24  0:12 ` Jan Engelhardt
2006-12-24  0:42   ` John Richard Moser
2006-12-24  6:55     ` Valdis.Kletnieks
2006-12-24  7:20       ` John Richard Moser
2006-12-24 10:21     ` Jan Engelhardt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.