You are not logged in.
Pages: 1
The following code will bring down a default Arch install if entered in a shell:
:() { :|:& }; :It's called a forkbomb, and it works by spawning infinite processes, hogging all available resources and making the system unresponsive. It's also completely preventable. The ulimit command sets resource consumption limits for each user. If Arch set a reasonable default process limit (400 should be safe, I can't imagine a single user hitting it except in a forkbomb situation) in /etc/profile, it would remove a potential DoS risk with no real side effects.
Offline
I think ulimit is set, but maybe too high (8190?). I will check when I get home. The last time I tried to fork bomb arch, it came back. Maybe it just took a bit to hit the limit and you restarted before that? ...or maybe the config was changed and i am blowing hot air.
Cheers
Offline
The output of ulimit -u (max user processes) is 32768, which I assume is more than enough for a fork bomb to make a computer unresponsive.
Offline
Mine is
bash-3.2$ ulimit -u
4095I have not changed mine. hmm
Offline
I haven't changed mine either. It probably varies depending on the specifications of the computer Arch has been installed on.
Offline
There's been some topics about forkbombs already.
Offline
the best option right now: set ulimits yourself.
my ulimit is unset (test box), and it is defaulting to 768.
Pretty sure it is based on memory and other system info..
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
LOL just tried this on a server box at work and killed it ![]()
Offline
LOL just tried this on a server box at work and killed it
Are you sure your original name here on this forum wasn't more appropriate? ![]()
Offline
On my machine I have my limits set to allow maximal 1024 procs, the bash bomb ( :(){ :|:& };: ) ended after like half a minute but when I executed "perl -e "fork while fork" " I had put myself in a giant DoS, whatever I tried to execute gave me a "fork: resource temporally unavailable" and I was totally locked out while perl kept my cpu at 100% and my procs kept jumping up to 1024...
I managed to kill my screen session and that stopped it... But in a tty without screen I would have been totally locked out... I couldn't even login in another tty because setuid couldn't fork...
So the limit stuff gives full protection against bash bombs but perl still manages to achieve a DoS...
Last edited by Ramses de Norre (2007-06-30 12:21:07)
Offline
well if this is a single user system the best protection in to not run it (:
Offline
well if this is a single user system the best protection in to not run it (:
I was curious whether I was protected or not ![]()
Offline
Arch is an operating system with the able user in mind, so it's up to you.
Use UNIX or die.
Offline
Arch is an operating system with the able user in mind, so it's up to you.
Yes, but the problem with a forkbomb is the non-root user being able to crash the machine (or at least cause a DoS). I knew very good what I was doing when I executed those forkbombs but I wanted to test what the abilities of non-root users were in an Arch system and it seems like the knowledgeable dude that gets access to your machine can crash it easily...
Offline
this largely depends on the system and how much it can handle before crashing. there is no one perfect solution to forkbombs. you as the admin, need to assess the situation for your machine and make the changes accordingly in /etc/security/limits.
Offline
When I tried it all I get is
bash: fork: Resource temporarily unavailable
It does this for a while (couple of minutes) then stops. Any thing else I'm running keeps working.
Norm
Offline
Lol. I didn't even know about this. When I wanted to do fork bombs I just wrote a program in C =\ I guess this is the kind of things that it should be up to the user. Every process is a fork of some other. I once wrote a project for college that had an insane ammount of forks, but without crashing the computer, so I guess there really isn't a good number to choose as a limit.
Offline
When I tried it all I get is
bash: fork: Resource temporarily unavailable
It does this for a while (couple of minutes) then stops. Any thing else I'm running keeps working.
That's what bash does here too, but perl is naughtier...
Offline
Pages: 1