Re: forkbombing Linux distributions

Natanael Copa
2005-03-24T10:05:51Z

On Thu, 2005-03-24 at 08:07 +0100, Jan Engelhardt wrote:
> >> >brings down almost all linux distro's while other *nixes survives.
> >>
> >> Let's see if this can be confirmed.
> >
> >open/free/netbsd survives. I guess OSX does too.
>
> Confirmed. My OpenBSD install copes very well with forkbombs.
> However, I _was able_ to spawn a lot of shells by default.
> The essence is that the number of processes/threads within
> a _session group_ (correct word?) is limited. That way, you can
> start a ton of "/bin/sh"s from one another, i.e.:
>
> \__ login jengelh
> \__ /bin/sh
> \__ /bin/sh
> \__ /bin/sh
> ...
>
> So I think that if you add a setsid() to your forkbomb,
> you could once again be able to bring a system - BSD this time - down.

I seriously doubt that. Try raising your maxproc setting (sysctl
kern.maxproc?) to something insane and try bombing again.

I tried to bring the box down by raising the limit to something similar
linux default and run the classic ":() { :|:& };:" However, the bomb was
stopped by maximum number of pipes and BSD survived.

If you don't hit the maximum number of processes you will hit another
limit.

--
Natanael Copa