From: nick@quay.ie (Nick Hilliard)
Subject: Re: while(1){fork();} ???
Date: Mon, 14 Jun 1993 09:34:37 GMT
mdejong@dutiws.twi.tudelft.nl wrote:
: While checking the security of my linux box, i found that the following program
: while(1)
: {
: fork();
: }
: will crash the linux machine, with the console coming with a # (prob in single
: user mode), giving a user complete control !
Really? The last time I tried messing about with fork bombs like that,
nothing spectacular happened. Ok - the machine load went up to about 65 or
thereabouts, but I was able to log on as root and kill all the processes
using 'killall' (If you don't have it, then get it). But it definitely
didn't go to single user mode or anything like that.
: Is this normal, and can there be done anything about it ?
: Most unix systems give a "No more processes" or "fork: try again" or something
: like that, but linux crashes...
Linux will give those, too. Perhaps you've set NR_TASKS too high in
/usr/include/linux/tasks.h? Maybe the fork bomb is causing the machine to
run out of memory? It sounds more like a configuration problem than a
problem with Linux.
: Thanx in advance,
Cheers,
Nick