User Tools

Site Tools


security:fork_bomb

LINUX FORK BOMB

23.04.2009

$ :(){:|: &};:

:() = unnamed shell function
{…} = function body
:|: = makes a call to the function itself and pipes the output to another call
& = puts all the processes in background, make it impossible to kill
; = completes the function
: = makes the starting call

After a short period of time, your computer will eventually crash.

Remedy: limit the processes limit. In /etc/security/limits.conf add a line with (notice that johndoe can be any username from your system):

#<domain>      <type>  <item>         <value>
johndoe        hard     nproc          100    

Source: Linux For You March 2009

security/fork_bomb.txt · Last modified: 2013/03/16 17:41 (external edit)