Security Hole Fix?

Security Hole Fix?

Post by Jesse Weiger » Tue, 02 Dec 1997 04:00:00



In linux, compiling and running the following program as a normal user
crashes the system.  I was wondering how to limit the amount of RAM each
person has access to, or setting aside a certain amount or RAM to root.

#include <stdlib.h>
/* Crashes a linux box by eating up all ram */

main()
{
    while (1)
    {
        malloc(1);    /* Allocate 1 byte of memory */
    }
    return 0;

Quote:}

It might also be alloc, I'm not sure which is for Linux.  This will make
the system unsuable until you do a hard reboot with the power switch.
 
 
 

Security Hole Fix?

Post by Thomas Maier Komo » Wed, 03 Dec 1997 04:00:00



> In linux, compiling and running the following program as a normal user
> crashes the system.  I was wondering how to limit the amount of RAM each
> person has access to, or setting aside a certain amount or RAM to root.

> #include <stdlib.h>
> /* Crashes a linux box by eating up all ram */

> main()
> {
>     while (1)
>     {
>         malloc(1);    /* Allocate 1 byte of memory */
>     }
>     return 0;
> }

> It might also be alloc, I'm not sure which is for Linux.  This will make
> the system unsuable until you do a hard reboot with the power switch.

under bash try the ulimit command
under csh try the limit command

for help look into the man pages of bash or csh