[2449] in bugtraq

home help back first fref pref prev next nref lref last post

Re: fork()

daemon@ATHENA.MIT.EDU (Ed Arnold)
Tue Dec 12 13:50:34 1995

Date:         Mon, 11 Dec 1995 11:29:52 -0700
Reply-To: Ed Arnold <era@ucar.edu>
From: Ed Arnold <era@ucar.edu>
X-To:         BUGTRAQ@CRIMELAB.COM
To: Multiple recipients of list BUGTRAQ <BUGTRAQ@CRIMELAB.COM>

Alex Leipold <aleipold@clark.net> wrote:

> O'm new to the list, so Im not sure if this has been covered, but someone
> can crash any system with a few lines of code. (tested on UNIX, LINUX)
>
> main() {
> int x;
> while(x=0;x<1000000;x++)
> {
> system("uptime");
> fork();
> }
> }
>
> Gcc it, run it and whatever system your on will crash. Is their any way
> to stop users from doing this? I.e. restricting number of process that
> can run?

On SunOS, edit param.c and set MAXUPRC considerably lower than NPROC.
Keeps the pigs at bay.

I assume Solaris allows a similar thing but I don't know the details.
Who does?

home help back first fref pref prev next nref lref last post