# Linux Kernel Module Cheat

##### 27.4.3.2. Fork bomb

https://en.wikipedia.org/wiki/Fork_bomb

DANGER! Only run this on your host if you have saved all data you care about! Better run it inside an emulator! QEMU v4.0.0 user mode is not safe enough either because it is very native does not limit guest memory, so it will still blow up the host!

So without further ado, let’s rock with either:

    ./run --eval-after './posix/fork_bomb.out danger'
    ./run --eval-after './fork_bomb.sh danger'

Sources:

- userland/posix/fork_bomb.c

- rootfs_overlay/lkmc/fork_bomb.sh

Outcome for the C version on LKMC 762cd8d601b7db06aa289c0fca7b40696299a868 + 1: after a few seconds of an unresponsive shell, we get a visit form the Linux out-of-memory killer, and the system is restored!