Brain Dump

Fork Bomb

Tags
security

Is a resource attack that overloads a computers resources by spawning an exponential number of processes in a short amount of time through recursive forking.

The general structure of a fork bomb involves defining a process that spawns itself at least twice and doesn't have any way to terminate. It'll keep doubling up until you run out of system resources.

Examples

while (1) fork();
Code Snippet 1: A C fork-bomb.
fork() { fork|fork & }
fork
Code Snippet 2: A shell script fork bomb.