Slashdot Mirror


Some Linux Distros Found Vulnerable By Default

TuringTest writes "Security Focus carries an article about a security compromise found on several major distros due to bad default settings in the Linux kernel. 'It's a sad day when an ancient fork bomb attack can still take down most of the latest Linux distributions', says the writer. The attack was performed by spawning lots of processes from a normal user shell. Is interesting to note that Debian was not among the distros that fell to the attack. The writer also praises the OpenBSD policy of Secure by Default."

541 comments

  1. Fork vulnerability by madaxe42 · · Score: 5, Funny

    Kittens are vulnerable to forks by default as well - you can easily get at the kernel if you just - oh, hang on, a different kind of fork, you say?

  2. Thank god I use Windows by Anonymous Coward · · Score: 5, Funny

    Thank god I use Windows, I'm safe!

    1. Re:Thank god I use Windows by rokzy · · Score: 5, Funny

      only if you're running XP Starter Edition!

    2. Re:Thank god I use Windows by LiquidCoooled · · Score: 5, Funny

      No, with XP starter, you are restricted to running only 3 trojans at once.

      --
      liqbase :: faster than paper
    3. Re:Thank god I use Windows by Anonymous Coward · · Score: 1, Informative

      C:\>type bomb.bat
      start bomb.bat
      call bomb.bat
      C:\>bomb.bat

    4. Re:Thank god I use Windows by Anonymous Coward · · Score: 0

      All your TCP connections are belong to us?

    5. Re:Thank god I use Windows by SlayerofGods · · Score: 1

      Considering this is a fork bomb for windows it's not offtopic
      Stupid mods

      --

      Technology, the cause of and solution to all of life's problems.
    6. Re:Thank god I use Windows by rudabager · · Score: 3, Interesting

      put this in notepad, save it as kill.bat then run it

      cmd
      cmd
      cmd
      cmd
      cmd
      cmd
      cmd
      cmd
      cmd
      cmd
      cmd
      kill.bat
      kill.bat
      kill.bat

      I can drop my ath 2000 512mb system in say oh 10 seconds. Increase the amount of cmd's and kill.bat's for added effect :)

      --
      If I wanted easy I wouldnt be an engineer or a patriot.
    7. Re:Thank god I use Windows by anakin357 · · Score: 5, Funny
      No, with XP starter, you are restricted to running only 3 trojans at once.

      Possible obvious responses:

      Only 3 trojans? I'm a self-replicating-trojan author you insensitive clod.

      So I can only run three instances of Internet Explorer at once?

      Customer: Whenever I try to start a second program, it gives me an error...
      Techie: Yeah, you can't run Gator, Precision Time, Weatherbug AND something else... you've gotta turn something off.
      Customer: (incredulous)WHAT!!?? I NEED TO KNOW WHAT TIME IT IS, SAVE MY PASSWORDS, AND KNOW WHAT THE WEATHER IS LIKE OUTSIDE.
      Techie: (mutes customer): "Fucking Chuck Noris, all those goddamn ninjas had to go after the pirates."

      --
      http://www.fsckin.com/
    8. Re:Thank god I use Windows by soconnor99 · · Score: 5, Informative

      You can put a hundred kill.bat's in there but they never get called. It will transfer control, you need to use "call kill.bat" if you want to continue in the same script.

    9. Re:Thank god I use Windows by Corbin+Dallas · · Score: 1

      This will not take down an XP machine, Microsoft's latest. But it does take down several of the latest distros. As a Linux zealot myself, I'm pretty displeased.

      --
      Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote.
    10. Re:Thank god I use Windows by dtfinch · · Score: 1

      @echo off
      top:
      start kill.bat
      start defrag c:
      goto top

    11. Re:Thank god I use Windows by rudabager · · Score: 1

      Well it was more the point that the CMDs would be the ones to kill the machine, but your idea is more effective. I will use that in the future when I want to kill someon.... ahhh my box.

      --
      If I wanted easy I wouldnt be an engineer or a patriot.
    12. Re:Thank god I use Windows by _xeno_ · · Score: 3, Informative

      That won't work, because "cmd" runs the new process and then waits for it to complete. So you'll wind up with new CMDs every time you type "EXIT" but that's about it.

      You want something like:

      CMD /K KILL.BAT
      KILL.BAT

      Which, on Windows XP at least, also didn't work. I've got it running in the background right now, so if you see this comment, it failed to bring my system down.

      --
      You are in a maze of twisty little relative jumps, all alike.
    13. Re:Thank god I use Windows by Anonymous Coward · · Score: 0

      kill.bat? bah

      back in the old days I'd name it autoexec.bat ...

    14. Re:Thank god I use Windows by Anonymous Coward · · Score: 1, Insightful

      With Windows XP Starter Edition, trojans run you!

    15. Re:Thank god I use Windows by Ava3ar · · Score: 0

      @echo off top: start fork.bat close start fork.bat goto top that works

      --
      ¦^)= The Vengance Will Come =(^¦
    16. Re:Thank god I use Windows by Lord+Kano · · Score: 1

      If he's running a Windows PE CD and no network, he's OK.

      --
      "Hi. This is my friend, Jack Shit, and you don't know him." - Lord Kano
    17. Re:Thank god I use Windows by joxeanpiti · · Score: 3, Interesting

      Easy to modify the "fork bomb" script for Windows.

      start cmd
      start cmd
      start cmd
      start cmd
      start cmd
      start cmd
      start cmd
      start cmd
      start cmd
      start kill.bat
      start kill.bat
      start kill.bat
      start kill.bat
      start kill.bat
      start kill.bat

      Try it! My machine has been freezed in about 15 seconds.

    18. Re:Thank god I use Windows by rudabager · · Score: 1

      Hey look MS actually fixed something. About two years ago this would work with Win XP. Since then I have moved on from batch.

      --
      If I wanted easy I wouldnt be an engineer or a patriot.
    19. Re:Thank god I use Windows by Anonymous Coward · · Score: 0

      Don't worry, they didn't. You wanted "START" not "CMD" but other than that - kablooie!

    20. Re:Thank god I use Windows by rudabager · · Score: 1

      Wow youre right. Its been so long that i forgot. Sweet im back in business now.

      --
      If I wanted easy I wouldnt be an engineer or a patriot.
    21. Re:Thank god I use Windows by Anonymous Coward · · Score: 0

      Interesting, I eventually started to get error messages and was able to log out after a long time. Maybe it's because I'm using Win2k Server?

    22. Re:Thank god I use Windows by TubeSteak · · Score: 1
      I don't get the Chuck Norris joke.

      The last time I heard about him, was on Late Night With Conan O'Brien.

      Pull The Walker, Texas Ranger Lever!

      --
      [Fuck Beta]
      o0t!
    23. Re:Thank god I use Windows by Anonymous Coward · · Score: 0

      Don't know much about trusted computing, but that sounds like very safe sex to me.

    24. Re:Thank god I use Windows by another_mr_lizard · · Score: 1

      Reply written on my works PC after running your kill.bat file a couple of times and not shutting down any dos boxes. Outlook and a couple of our homebrew apps are still running quite happily in the background.

      This is an Optiplex Gx-280 (PIV 2.4 with 512mb) running XP SP2 and a few patches.

      By no means do I want to appear an MS shill, but batter them over the head for the things they clearly do wrong rather than the things you would like to think they do wrong.

      --
      "My parents were strict, but they never pitted me against livestock" - Doug Stanhope
    25. Re:Thank god I use Windows by Sj0 · · Score: 1

      Now, replace those cmds with qbasic.exe

      Some things are much more fragile than they let on.

      --
      It's been a long time.
    26. Re:Thank god I use Windows by grolschie · · Score: 0

      Maybe I'm out of touch, but doesn't the ye old classic recursive malloc() C program slow most any machine to a crawl by eating its RAM?

    27. Re:Thank god I use Windows by Anonymous Coward · · Score: 0

      Not if you are using an operating sytem that imposes per-user/per-process resource limits and actually use them.

    28. Re:Thank god I use Windows by marcansoft · · Score: 1

      If you use M$IE anyway, it's just easier to say:

      javascript:window.open(window.location);window.o pe n(window.location)

      (Add more ;window.open(window.location) for enhanced effect)

      Note you have to run it twice: the first one will bring out (number of window.open's) windows and then stop, and the second one will get it into a big loop (since now window.location is updated with the URL).

      Also, just opening c:\aux used to crash M$IE. It was nice having it as startpage.

    29. Re:Thank god I use Windows by Anonymous Coward · · Score: 0

      Thank God I use Linux.
      Vulnerability found and fix ON TIME by many heads.

      > Thank god I use Windows, I'm safe!

    30. Re:Thank god I use Windows by keziahw · · Score: 1

      I ran it and my winxp was dead in a couple seconds, with 200+ command prompts open and not enough RAM to show a "close group" menu. I had opened Firefox first, though, so I could escape and I wouldn't be totally forked. I switched to the Firefox window and X'd it (there wasn't enough ram to close via rightclick), and then I "close group"ed the command prompts before they had a chance to start spawning some more. By opening firefox 1st, I had reserved the RAM necessary to close the group and save myself.

    31. Re:Thank god I use Windows by keziahw · · Score: 1

      I wasn't running the example with all the CMD.EXE stuff, just one that started itself. That way, it forked much faster and was a more solid freeze.

  3. How long? by Anonymous Coward · · Score: 0, Insightful

    Let's see how long it will take before someone says the study is invalid...

    1. Re:How long? by biendamon · · Score: 2, Funny

      Let's see how long it will take before someone says the study is invalid...

      The study is invalid!!!

    2. Re:How long? by Kong+the+Medium · · Score: 2, Funny

      And the answer is:

      5 minutes.

      --
      ... whenever a text is transmitted, variation occurs. This is because human beings are careless, fallible, and occasiona
  4. Sheesh, it's a fork bomb by gowen · · Score: 4, Insightful

    Sorry but the ability for a non-privileged user to run as many programs as the like is a feature, not a bug. Inability to turn that feature off would be a bug, but given that few modern Linux boxes are actually used as multi-user remote-login accounts, it's a completely unecessary overhead.

    And if you are administrating a true multi-user old-style-Unix type server, you should know enough to stop people fork bombing you (i.e. quotas).

    --
    Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
    1. Re:Sheesh, it's a fork bomb by Anonymous Coward · · Score: 3, Insightful

      And if you are administrating a true multi-user old-style-Unix type server, you should know enough to stop people fork bombing you (i.e. quotas).

      Hope you're not administrating any multi-user Linux boxes then, since in Linux, the quotas only deal with drive space ;)

    2. Re:Sheesh, it's a fork bomb by gowen · · Score: 4, Informative

      Sorry, brain fart. I meant hard ulimits

      --
      Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
    3. Re:Sheesh, it's a fork bomb by CaymanIslandCarpedie · · Score: 4, Insightful

      Sounds much like the same reasoning MS used to use for having defaults set to a "user-friendly" setting.

      Now that its been found in Linux, its a "feature" ;-)

      Come on, I love Linux but the hypocrocy is a bit much ;-) Its OK to admit it was bad or admit MS's settings were OK, but you cannot do both.

      --
      "reality has a well-known liberal bias" - Steven Colbert
    4. Re:Sheesh, it's a fork bomb by woginuk · · Score: 3, Insightful

      I don't know about how it works nowadays. But when I was new to UNIX, I would write the following program:
      int main() {
      while(1)
      fork() ;

      return 0 ;
      }
      Compiling and running it would hang the box. You could ping the system, but nothing else would would work.

      Ultimately, I would have to switch the box off and on again. And I remember thinking that this was a bug.

      A user should be allowed to do whatever he/she wants. But if the system becomes unusable, surely it is a bug.

    5. Re:Sheesh, it's a fork bomb by gowen · · Score: 2, Insightful
      I love Linux but the hypocrocy is a bit much. Its OK to admit it was bad or admit MS's settings were OK, but you cannot do both.
      There's no hypocrisy, at least not from me. I've never criticised MS software because local users are able to fill up disk space, spawn a zillion processes, suck the processor and generally exhaust the resources... That's what users do, they use up your resources.
      --
      Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
    6. Re:Sheesh, it's a fork bomb by gowen · · Score: 2, Interesting
      But if the system becomes unusable, surely it is a bug.
      I run codes *all the time* that cause my system to become completely unresponsive. By running huge numerical simulations without enough physical RAM. I'd be mightily annoyed if the kernel told me I wasn't allowed to do this.

      Users use resources. If an admin wants to starve their untrustworthy users of resources, they can (and, if they've a lot of untrustworthy users, its highly recommended), but there is simply no compelling reason why it should be turned on by default.
      --
      Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
    7. Re:Sheesh, it's a fork bomb by kfg · · Score: 4, Insightful

      Sorry but the ability for a non-privileged user to run as many programs as the like is a feature, not a bug.

      Sorry, but the ability of a mail reader to automagically run as many programs as it likes is a feature, not a bug.

      The point being that while this may, in some rare cases, be desirable, it shouldn't be the default setting, but rather something that the adminstrator has to enable for that rare user for which it is deemed both necessary and desirable.

      "Able" and "capable of" are not the same thing.

      It shouldn't be the responsibility of the admin to turn on every possible security feature, but rather to turn off only those ones he deems gets in the way of the functioning of his system.

      It's exactly this lacadasical approach to security that has made Windows the hell hole that it is. It certainly puts money in my pocket trying to fix it all, over and over and over again, but I'd far rather be spending my time and earning my money doing something useful.

      Like computing.

      KFG

    8. Re:Sheesh, it's a fork bomb by tlhIngan · · Score: 2, Funny

      int main() {
      while(1)
      fork() ;

      return 0 ;
      }


      On a modern Unix/Unix-like system, you often have Perl. Save yourself the effort of compiling:

      perl -e 'while(1){fork()}'

      One thing I always liked to do was run this for about 1 minute, hit Ctrl-C, and see how long until the kernel finally manages to reap all the child processes and the system returns back to normal. Usually can take anywhere from 30 seconds to a couple of minutes before the system becomes responsive again.

      (It *is* a great way to get impressive loadaverages of 500+ though!).

    9. Re:Sheesh, it's a fork bomb by Anonymous Coward · · Score: 1, Interesting

      I generally agree with what you're saying, but there should be "some" way for the system to differentiate between useful processes spawning tasks to achieve a computational goal, vs an abhorrent process run amuck. In one formerly well-known OS, each user had a process limit that was something sane. Special users for certain programs needed their process limit raised. This was a per-user setting and "nice" programs always warned when the process limit needed to be exceeded at which time the sysadmin could raise it if appropriate.

    10. Re:Sheesh, it's a fork bomb by Xugumad · · Score: 4, Interesting

      And if you are administrating a true multi-user old-style-Unix type server, you should know enough to stop people fork bombing you (i.e. quotas).

      *shuffles nervously* So, out of curiousity, for my.. . err... desktop... how do I stop this exactly? :)

    11. Re:Sheesh, it's a fork bomb by skubeedooo · · Score: 1
      I think it says a lot, when someone makes a "it's all the fault of you stupid users...if you don't know how to set things up correctly then get back to watching the tv" comment, but then gets his own facts wrong.

      To cross fertilize, "I for one welcome our unix wielding overlords"

    12. Re:Sheesh, it's a fork bomb by DelawareBoy · · Score: 1

      Words like "Should know enough" and "is a feature, not a bug" is what got Microsoft into trouble (and continues to).

      You should not allow unprivilged users to fork as many processes as they want. Having an "assume the worst" mentality helps prevent security blips like this one.

      Laugh if you will, but the "Writing Secure Code" book by MS Press is actually pretty good at identifying this kind of thing. You would have hoped the MS folks would have actually read it. There are a bunch of other good security books out there as well, non MS.

    13. Re:Sheesh, it's a fork bomb by halivar · · Score: 2, Funny

      And if you are administrating a true multi-user old-style-Unix type server, you should know enough to stop people fork bombing you (i.e. quotas).

      Or you can switch back to MS-DOS. Just one process; ultimate security!

    14. Re:Sheesh, it's a fork bomb by gowen · · Score: 2, Interesting
      but there should be "some" way for the system to differentiate between useful processes spawning tasks to achieve a computational goal, vs an abhorrent process run amuck.
      Yes, they're should. But, sadly, that problem is one that is generally considered hard by computer scientists. I didn't follow it closely, but the debates around the heuristics for the Linux kernel out-of-memory process killer tells me that it really isn't easy to do.

      Maybe I'm just biased, because last year, I had a horrible time overcoming some hard-coded limits (on stack size) when trying to run some Fortran code on a SunOS box.
      --
      Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
    15. Re:Sheesh, it's a fork bomb by gowen · · Score: 2, Insightful
      You should not allow unprivilged users to fork as many processes as they want.
      You should not allow untrusted users to fork as many processes as they want. However, very few boxes have untrusted users. If yours does, the command you need is ulimit
      --
      Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
    16. Re:Sheesh, it's a fork bomb by hackstraw · · Score: 1

      All *NIX boxes can limit the number of processes and/or threads by UID. I cannot think of a "reasonable" default because of the variability in the hardware available and the variability of the type of users.

      Actually, in the case of something like your fork bomb program, one simple command would be sufficient.

      userdel

      Its one thing to do something out of ignorance or by mistake, but to intentionally do something on a machine that you have been given an account on, I would imagine that if thats the best you can do with the usage of the box, I don't see why you need an account. If someone over me said a user like you needed an account, your account would be very, very limited in its functionality. Limited perhaps, by accident, to the point that you would just go to another machine for day to day computing.

    17. Re:Sheesh, it's a fork bomb by gowen · · Score: 5, Informative

      man ulimit

      Specifically ulimit -H -u <number> in their startup file.

      --
      Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
    18. Re:Sheesh, it's a fork bomb by gowen · · Score: 1
      Sorry, but the ability of a mail reader to automagically run as many programs as it likes is a feature, not a bug.
      Mail readers take data from untrusted sources. That's why they need extra care from a security perspective.

      Shells don't take data from an untrusted source, unless you don't trust your users. As I've said many times here, if you don't trust your users, then you need to set limits for them. If you do trust your users, then you don't.

      Capiche?
      --
      Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
    19. Re:Sheesh, it's a fork bomb by Anonymous Coward · · Score: 0

      Everyone that says it's a bad default is right.

      That said it's not a remote security vulnerability.

      When I have written on the "insecure by default" nature of Windows I am talking about the fact that when you install a new system you are vulnerable to remote attack immediately.

      If there is some feature that users can exploit to attack a system well...they are the users.

      The remote threats are of utmost urgency.

      That's not an excuse for making this a default...it's just the priority.

      -Chris

    20. Re:Sheesh, it's a fork bomb by jacksonj04 · · Score: 1

      Thanks for saving me the effort of typing that exact same comment.

      --
      How many people can read hex if only you and dead people can read hex?
    21. Re:Sheesh, it's a fork bomb by IDontAgreeWithYou · · Score: 2, Interesting

      I used to work at a university that gave all students, faculty and staff unix accounts. A CS professor told us a story of a CS student in an operating systems course who wrote a program that forked so much they had to reboot the server. When some of the administration found out why the server had to be unexpectedly rebooted they wanted to punish the student, but thankfully the IT guys were able to save him. He definitely should not have had the ability to write such a program. Of course, after hearing this story everyone tried it, it didn't cause any problems.

      --
      Finding other idiots on /. that agree with your opinion doesn't make it any less stupid.
    22. Re:Sheesh, it's a fork bomb by iplayfast · · Score: 1

      Well that works :)

      Tried it under XP with cygwin.

      I've never seen a computer cry like that before...

    23. Re:Sheesh, it's a fork bomb by Anonymous Coward · · Score: 1, Funny

      Come on, I love Linux but the hypocrocy is a bit much ;-) Its OK to admit it was bad or admit MS's settings were OK, but you cannot do both.

      This is just another example how Microsoft continuously neglects the security issues of its...oh its on Linux?!?...errr

      Linux is an innovator in making itself user friendly by implementing a feature like this...

    24. Re:Sheesh, it's a fork bomb by NewStarRising · · Score: 1, Insightful

      "A user should be allowed to do whatever he/she wants"

      Then why not let them run as root?
      I thought the idea of User Accounts was to limit what they could do, at least as far as system-files, machine-security, inhibiting other users, etc goes.

      No, I don;t consider this a 'bug'. I consider it an "inappropriate default setting".

      --
      b3 4phr41d 0f my 4bov3-4v3r4g3 c0mpu73r kn0wI3dg3!
      MadDwarf
    25. Re:Sheesh, it's a fork bomb by Anonymous Coward · · Score: 0

      Do you know what the best thing about operating system arguments is? It's when someone takes one thing one guy said about operating system X (it's fast!) and then sees one thing a different guy said about operating system X (it's slow because its featureful!) and then calls both of them hypocrites.

    26. Re:Sheesh, it's a fork bomb by JohnFluxx · · Score: 1

      What facts wrong? You use ulimit to set process quotas. Go look up on a dictionary what quota means.

    27. Re:Sheesh, it's a fork bomb by Anonymous Coward · · Score: 0

      you still had to write a thank sentence... nice saving

    28. Re:Sheesh, it's a fork bomb by spaceman375 · · Score: 1

      You need to make this system wide or the end user WILL change it on you. How depends on which distro you are running. Also, note that the default behavior is dependent on the shell you run it under.

      --
      On the one hand you take life too seriously, and on the other, you do not take playful existence seriously enough. Seth
    29. Re:Sheesh, it's a fork bomb by puke76 · · Score: 2, Interesting

      The Gentoo discussion thread, with hard and soft resource limit recommendations, is here.

    30. Re:Sheesh, it's a fork bomb by gowen · · Score: 2, Informative
      You need to make this system wide
      In the sense of /etc/<shell>rc, yes you do. You can always test the username against a blacklist, though.
      --
      Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
    31. Re:Sheesh, it's a fork bomb by kfg · · Score: 2, Insightful

      There's a word for admins who trust the users:

      "Fired."

      I don't even trust my own mother on her own network.She loves me for it. Her system stays up.

      KFG

    32. Re:Sheesh, it's a fork bomb by kfg · · Score: 1

      "The remote threats are of utmost urgency."

      Since the beginning of time the majority of serious security threats have always come from someone trusted.

      See the Battle of Thermopylae and Benedict Arnold.

      In any case, in this particular instance there is no real reason to "prioritize," because there is no real impediment to implimenting both.

      It would, in fact, only become an issue of priorities if left to each individual admin to close every hole, instead of a group of indviduals setting reasonable defaults for each admin to share and rely on being in place.

      KFG

    33. Re:Sheesh, it's a fork bomb by skubeedooo · · Score: 1

      But surely any user is infallible. S/he might accidentally write the loop incorrectly and fork indefinitely, bringing down everyone else's sessions.

    34. Re:Sheesh, it's a fork bomb by Zork+the+Almighty · · Score: 1

      This sort of kills Mac OS X on a dual-G5.

      --

      In Soviet America the banks rob you!
    35. Re:Sheesh, it's a fork bomb by DavidTC · · Score: 1
      While 'shells' do not, programs do, and those, and all other, programs should be subject to limits.

      No program should be able to spawn 1000 children, be it bash or httpd. If a program or user needs to do that, than it needs to be given permission by the admin.

      --
      If corporations are people, aren't stockholders guilty of slavery?
    36. Re:Sheesh, it's a fork bomb by gowen · · Score: 1

      Well, sure that might happen. But in the grand scheme of "things people are likely to do by accident", I'm more worried about them unplugging the machine in order to vaccuum up the biscuit crumbs under the desk...

      --
      Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
    37. Re:Sheesh, it's a fork bomb by JabberWokky · · Score: 1
      Under SUSE 9.1 on a 2.8 Ghz laptop, that spikes the load average well past 300 with no problem. X becomes fairly unresponsive (move mouse, wait, arrow leaps), but a console is not so bad. It reaps quite quickly when killed.

      It's also a good way to turn on the cooling fan.

      --
      Evan

      --
      "$30 for the One True Ring. $10 each additional ring!" -- JRR "Bob" Tolkien
    38. Re:Sheesh, it's a fork bomb by Wybaar · · Score: 2, Interesting
      Everybody makes mistakes. Having a high-but-finite and changeable limit prevents a mistake made by a trusted user from getting out-of-control while still allowing that user to get close to the threshold of control.

      For instance, imagine writing a recursive program to calculate the factorial of a number (note: no error checking included, and I'm letting the kth factorial number for k
      function y = factorial(x)
      if x <= 2
      y = 1;
      else
      y = factorial(x-1) + factorial(x-2);
      end

      Now assume that instead of typing (x-1) in the recursive call on the next to last line, the user types (x+1). If the user calls this with x > 2 and you don't have some limit on the number of recursive calls a function can make, this program will never end (unless you exceed the stack limit, which is not a graceful way to exit.) If there is a limit, the program will hit that limit and error, giving the programmer a chance to catch their typo. If the user really was interested in blowing the stack and they have the authority to change the recursion limit, they can do so if they want ... but they have to explicitly point the recursive gun at their foot and explicitly pull the trigger. They won't get shot accidentally.
      --
      Y|
    39. Re:Sheesh, it's a fork bomb by Anonymous Coward · · Score: 0

      I run codes *all the time* that cause my system to become completely unresponsive. By running huge numerical simulations without enough physical RAM.

      I think a better way than to arbitrarily say 'this many processes but no more' is to allow the offending task to run at a low priority, but have the system remain reasonably responsive to other processes. Of course, I have never found an OS that pulls this off completely. When the offending process does something which involves a lot of kernel time (opening and closing files/sockets for example), the system tends to grind to a halt. Linux usually behaves better than XP, which in turn is much better than 9x.

    40. Re:Sheesh, it's a fork bomb by gnuman99 · · Score: 1
      The parent is *insightful*? What?? *ANY* system can be brought down by local users and most systems can be brought down by a sigle user. The admin can't do anything about it, but prevent people from getting local access, period. I mean, how do you stop,

      int memoryPerProcess = 10*1024*1024; // 10M, adjust as needed
      unsigned int i;
      for( i=0; i<1000; i++ )
      fork();

      char *mem = malloc( memoryPerProcess );
      while( 1 )
      mem[ ++i % memoryPerProcess ] = (char)i;

      And how do you stop this from trashing the system? You can only stop this for a single user if that user cannot use ALL of the capabilities of the box.

      Resource exhaustion of a local user is impossible to stop. It is much more productive to track down the users that do this and shut them down out from the system.

    41. Re:Sheesh, it's a fork bomb by Anonymous Coward · · Score: 0

      man ulimit

    42. Re:Sheesh, it's a fork bomb by Khashishi · · Score: 1

      MS-DOS:
      main() {
      while(1){}
      }

    43. Re:Sheesh, it's a fork bomb by schon · · Score: 2, Interesting
      You need to make this system wide or the end user WILL change it on you.

      How? I thought by default that you have to be root to change the ulimit (either up or down)
      karl@spanky:~$ uname -a
      Linux spanky 2.4.29 #6 Thu Jan 20 16:30:37 PST 2005 i686 unknown unknown GNU/Linux
      karl@spanky:~$ ulimit -H -u 15000
      -bash: ulimit: max user processes: cannot modify limit: Operation not permitted
      I tried the :(){:|:&};: test on Slackware 10, and it failed - load rose for about 30 seconds, then went back to normal - the command was halted.
    44. Re:Sheesh, it's a fork bomb by Anonymous Coward · · Score: 0

      perl -e 'while(1){fork()}'

      Wow. My system (Debian unstable + kernel 2.4) took 70 minutes to shut down after that. I could (occasionally) type stuff into a shell but all the commands I tried got me "fork: resource temporarily unavailable". So, sort of working, but only just.

    45. Re:Sheesh, it's a fork bomb by Anonymous Coward · · Score: 0

      Carefull, now all the tolls will come out and rant about Gentoo sucks, including that ancient piece of shit rehashed troll post.

      And they'll get modded up +5 insightful, +5 funny, etc.

    46. Re:Sheesh, it's a fork bomb by DarkHelmet · · Score: 1
      Wouldn't doing this via /etc/security/limits.conf be better than placing the limit within the shell? This is assuming that pam_limit is installed.

      Just asking.

      --
      /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i
    47. Re:Sheesh, it's a fork bomb by Mad+Merlin · · Score: 4, Insightful

      You can set hard limits on the amount of RAM a user may consume, in addition to how many processes they can spawn, as well as a number of other useful things with a trivial amount of effort in Linux, have a look at /etc/security/limits.conf.

    48. Re:Sheesh, it's a fork bomb by cagle_.25 · · Score: 1

      You meant "Fibonacci", but your point is substantially correct. :-)

      --
      Human being (n.): A genetically human, genetically distinct, functioning organism.
    49. Re:Sheesh, it's a fork bomb by Sj0 · · Score: 1

      to be fair, my gentoo install wasn't an ancient piece of shit when I started installing it, it's just that it so long to compile everything that now I have to upgrade to this new X11 thing!

      --
      It's been a long time.
    50. Re:Sheesh, it's a fork bomb by perseguidor · · Score: 1

      I prefer the following (from a post of mine at the linked gentoo forums thread).

      If you've given shell access to untrusty people and just want to be on the safe side, adding the following to your /etc/security/limits.conf (if it's not already there) should do the trick:

      @remote hard nproc 10

      Then, of course, add shell accounts to the 'remote' group. It worked for me.

      --
      O make me a mask
    51. Re:Sheesh, it's a fork bomb by Sj0 · · Score: 1

      I'd have to second this. Though there are serious issues with the default XP installations (not so bad with sp2 since it's all firewalled away), worrying about arbitrary limits on resource usage are not one of them.

      --
      It's been a long time.
    52. Re:Sheesh, it's a fork bomb by say · · Score: 1

      Funny thing. My university set up a linux login box for us students to enjoy last week (before that it was all Solaris). These are my ulimits:

      core file size (blocks, -c) 0
      data seg size (kbytes, -d) unlimited
      file size (blocks, -f) unlimited
      max locked memory (kbytes, -l) 32
      max memory size (kbytes, -m) unlimited
      open files (-n) 1024
      pipe size (512 bytes, -p) 8
      stack size (kbytes, -s) 10240
      cpu time (seconds, -t) unlimited
      max user processes (-u) 32766
      virtual memory (kbytes, -v) unlimited

      It's Red Hat Enterprise Linux WS release 4 (Nahant).

      This looks like it's ready to be wasted...

      --
      Roses are #FF0000, violets are #0000FF, all my base are belong to you
    53. Re:Sheesh, it's a fork bomb by WilliamSChips · · Score: 1

      That's what --usepkg is for. :P But seriously, a full Gentoo install usually takes only a few days on good hardware

      --
      Please, for the good of Humanity, vote Obama.
    54. Re:Sheesh, it's a fork bomb by bckrispi · · Score: 1

      SuSe 9.2 is ok as well. The user executing the bomb slows down considerably, and is incapable of running anything worthwhile until the attack ends. But other users aren't affected too horribly.

      --
      Xenon, where's my money? -Borno
    55. Re:Sheesh, it's a fork bomb by Sj0 · · Score: 1

      I'm joking mostly. I prefer debian unstable, because I have no attention span. :)

      --
      It's been a long time.
    56. Re:Sheesh, it's a fork bomb by JabberWokky · · Score: 2, Interesting
      Thinking about it after my post, I came up with the following criteria for this test on OSes:

      Fail - The OS grinds to a halt and after waiting five minutes, there is no recourse other than cutting power and rebooting.

      Pass (one/a) - The OS grinds, but the user can navigate to a feature (console, Control-ESC in KDE, etc) that allows the user to quickly kill the offending process(es).

      Pass (one/b) - The OS grinds or not, but regardless automatically kills the offending process. I consider this to be a worse level than the following.

      Pass (two) - The OS grinds and automatically offers the user a method to kill the offending process(es). (KDE had something like that at one point. It may still). Sometimes you may want to let it run.

      Pass (three) - The OS does not grind and upon approaching resource limits, offers the user an option to shut down the process or let it run.

      And finally...

      Pass (four) - The OS does not grind and upon approaching resource limits, offers the user an option to increase limits, potentially by moving the process to another machine or allocating more systems to the process. Presumably the migration would be automatic (and transparent) if the resource limits were higher than the local machine.

      Obviously, "user" may be a combination of user and admin in certain cases (multi-user machine, accessing other machines off a local cluster, etc).

      --
      Evan

      --
      "$30 for the One True Ring. $10 each additional ring!" -- JRR "Bob" Tolkien
    57. Re:Sheesh, it's a fork bomb by brsmith4 · · Score: 1

      Users should not be able to set hard limits. You can, however, remove the -H and you should be able to reset the number of allowable processes (unless slackware has a default hard limit specified in /etc/security/limits.conf). It is up to the administrator to set reasonable softlimits (that users can change if need be) and reasonable hard limits to protect the server.

    58. Re:Sheesh, it's a fork bomb by brsmith4 · · Score: 1

      Nevermind... The process limit looks like it is protected by default (which is good) from user tampering.

    59. Re:Sheesh, it's a fork bomb by Anonymous Coward · · Score: 0

      I think SysRq may help in this case, I'm not in a position to test right now though.

    60. Re:Sheesh, it's a fork bomb by PitaBred · · Score: 1

      Slackware has no /etc/security/limits.conf file

    61. Re:Sheesh, it's a fork bomb by jonadab · · Score: 1

      Yeah. On a related note, the kernel issue that bothers me most (and well neigh
      the only time I even think about my kernel) is what happens when one process is
      flogging a disk hard, so that the system is IO-bound: all the other processes
      slow down too, even if their disk usage requirements are quite minimal. It
      ought to be possible (perhaps at the expense of slowing the IO-bound process
      a little) to allow every *other* process on the system to function normally
      in such a scenerio. As it is, if I try to run du -h over my whole filesystem,
      I can't effectively do much else until it completes. It would be okay with
      me if du took half again as long, if it meant the rest of the system could
      stay responsive. (I'm using kernel 2.4.22 currently, and yes, I have heard
      that 2.6 is starting toward addressing this issue a little better. I'll
      upgrade eventually, but I'm waiting for the next release of my distro.)

      --
      Cut that out, or I will ship you to Norilsk in a box.
    62. Re:Sheesh, it's a fork bomb by Anonymous Coward · · Score: 0

      I run a knoppix remaster. I would suppose that Knoppix already entertained ideas along this line to protect the system, and that they are, if required, in the distro. I am not sure.

    63. Re:Sheesh, it's a fork bomb by Anonymous Coward · · Score: 0

      Well, I consider my P200 with 96MB of RAM good hardware.

      It handles: ftp, ssh, dhcp, dns, http, samba, sql, nat/firewall and a few other misc. services. At points it has served upwards of about 4,000 hits/minute (on the http server).

      In all it took about a 12-hour day to install & configure.

      I highly doubt Gentoo could even compile in that time, never mind leave enough time for me to configure it all.

      So nehh.

    64. Re:Sheesh, it's a fork bomb by NuclearDog · · Score: 1

      What would this fall under?

      On FreeBSD 5.3R, if I run "perl -e 'while (1) {fork()}'", all my SSH sessions logged in as the same user are unresponsive. My other SSH sessions (another username, root) are only slightly laggy (barely noticable). If I Ctrl+C as the user than spawned the app, it dies within a few seconds and leaves no traces in a ps listing.

      --
      This statement is forty-five characters long.
    65. Re:Sheesh, it's a fork bomb by Anonymous Coward · · Score: 0

      "How? I thought by default that you have to be root to change the ulimit (either up or down)"

      The user edits their ~/.(shell)rc and changes the ulimit line, login then log back out.

      Voila.

    66. Re:Sheesh, it's a fork bomb by deek · · Score: 1
      • You can set hard limits on the amount of RAM a user may consume, in addition to how many processes they can spawn, as well as a number of other useful things with a trivial amount of effort in Linux, have a look at /etc/security/limits.conf.

      Just make sure that you've enabled the pam_limits module in the services/programs you require. E.g /etc/pam.d/ssh or /etc/pam.d/login . Otherwise the /etc/security/limits.conf file does not affect anyone.
    67. Re:Sheesh, it's a fork bomb by sehari24jam · · Score: 1

      Try "hdparm -u1 -m1 /dev/hda" in your 2.4 Debian.
      If your hd capable of DMA..

      --
      cogito ergo sum
    68. Re:Sheesh, it's a fork bomb by JabberWokky · · Score: 1
      It's one/a. I thought about that, and it still boils down to "your account is unresponsive, but you can fix it". Perhaps a new intervening level of "it only affects the one account and/or session, not other accounts and/or sessions" would be good.

      --
      Evan

      --
      "$30 for the One True Ring. $10 each additional ring!" -- JRR "Bob" Tolkien
    69. Re:Sheesh, it's a fork bomb by Anonymous Coward · · Score: 0

      That code won't work. The int will overflow considerably, because the limit for an in is 65535 (16 bits). Then, you're assigning memory. Pray, tell me how this kills the system? Plus, 1,000 processes doesn't kill my system, not even close. I've run a counter on a forkbomb and have gotten much higher than that.

  5. Big Fuss by Anonymous Coward · · Score: 0

    So?
    There are lots of ways a normal user can take down a system. I don't think that there is any reasonable way of preventing all of them

    1. Re:Big Fuss by Skye16 · · Score: 1

      Perhaps, but when there are reasonable ways for preventing most of them, don't you think you should, oh, I donno, try?

      "There are always going to be security holes in Windows, so why bother fixing any of them?" Pffft.

    2. Re:Big Fuss by agraupe · · Score: 2, Interesting

      The difference being that a default install of *anything*, except possibly OpenBSD, should be in a situation where there might be users on it that you don't trust completely. For my personal use of linux, all I need is a box that is secure from hackers, not users.

    3. Re:Big Fuss by Anonymous Coward · · Score: 0

      I'm not sure if there's a reasonable way to prevent this. Maybe you could catch stuff like fork() in a loop, but other than that you're probably going to put a hard cap on the number of times a process can fork itself. I have a feeling that that might break to many applications.

    4. Re:Big Fuss by Skye16 · · Score: 1

      Yes, you put a cap on it, but you allow people to raise it. We're talking about default settings stopping these sorts of shennanigans, not removing the ability to customize to your heart's content. We're essentially saying "security out of the box", not "security after you set it up".

    5. Re:Big Fuss by Anonymous Coward · · Score: 0

      Like, uh maybe...'Turn off Computer"?

  6. Re:In other news... by woginuk · · Score: 2, Insightful

    That is no reason why the same should be true of Linux. Or any other OS for that matter.

  7. Grep Bomb by cheezemonkhai · · Score: 5, Interesting


    So what would a good limit to the number of processes spawned be?

    I mean what can say what is good for everyone?

    Saying that if you think the fork bomb is good grep bombs are more fun and particularly good for silincing the mass of Quake 3 players in an undergraduate lab:

    'grep foo /dev/zero &' fun about 5 of them and watch the box grind to a screaming halt then eventually recover.

    Oh hang on did i just discover a new exploit :P

    1. Re:Grep Bomb by Anonymous Coward · · Score: 0

      No, you didn't discover anything, except that if you allow someone else to log in to your machine they can use the resources - shock, horror.

    2. Re:Grep Bomb by Anonymous Coward · · Score: 1, Informative

      So what would a good limit to the number of processes spawned be?

      I mean what can say what is good for everyone?


      You've hit the nail right on the head. The version of RedHat I'm using at work right now actually does have a "max user processes" limit set (presumably by default), it's just very high (5000+ per shell). So it's not a matter of that feature not existing, or even not being applied by default, but rather the defaults being too liberal. This is not clearly a bad thing -- setting the limit too low by default can cause as many problems as setting it too high.

    3. Re:Grep Bomb by rtaylor · · Score: 2, Informative

      grep foo /dev/zero &

      This may be a Linux only issue. FreeBSDs grep exits almost immediately, but Suse certainly spins.

      I find this interesting because BSD's grep claims to be GNU Grep version 2.5.1 which is the same version as on my Suse installation.

      Perhaps it's a difference in the way /dev/zero works?

      --
      Rod Taylor
    4. Re:Grep Bomb by Anonymous Coward · · Score: 0

      You do understand humour yeah?

    5. Re:Grep Bomb by Anonymous Coward · · Score: 0

      I tried this in Linux 2.6.10 and nothing happened, it just ran out of memory in about 5 seconds. I suppose this is another advantage of not enabling swap ;-)

      I'm more worried that grep has to keep everything in memory.

    6. Re:Grep Bomb by climb_no_fear · · Score: 1

      RedHat 8 says

      grep: memory exhausted after about 10 secs

      and stops the process immediately.

      [1]+ Exit 1 grep foo /dev/zero

      With grep (GNU grep) 2.5.1

      Please note, I compile my own kernels but I never fiddled with defaults or memory limitation settings. Sounds like the default settings from kernel.org are fine but that some distributions fiddle about with things.

    7. Re:Grep Bomb by ajs · · Score: 1

      Fedora Core 2

      Kicked off 5 at a time on my (fairly old) desktop box.... waited a few seconds, greps started dying (correcty) when they ran out of memory.

      System's fine.

      Posting this message seconds later.

      No problems here; move along.

    8. Re:Grep Bomb by Anonymous Coward · · Score: 0

      > So what would a good limit to the number of processes spawned be?

      A hundred is usually far more than sufficient.

      > I mean what can say what is good for everyone?

      These are defaults. Anyone who needs to override them probably either has sudo or can ask an admin and have it done.

      > 'grep foo /dev/zero &' fun about 5 of them and watch the box grind to a screaming halt then eventually recover.

      Most real multiuser boxes use dynamic priorities. Your process would gum up the system for about 20 seconds (still a while I'll admit) and then get reniced to the stratosphere. Not quite the QoS you can get with partitionable hardware, but at that level it's not really a software problem.

    9. Re:Grep Bomb by Anonymous Coward · · Score: 0

      > Perhaps it's a difference in the way /dev/zero works?

      I should hope not. /dev/zero emits an infinite stream, or it's badly broken if it doesn't. It may be that grep bailed on the "binary file" ... does grep -a hang?

      Possibly it even special cases devices such as this.

    10. Re:Grep Bomb by cloudmaster · · Score: 1
      7 seconds:
      dsauer@danny-pc dsauer $ time grep foo /dev/zero
      grep: memory exhausted

      real 0m7.063s
      user 0m4.709s
      sys 0m1.773s
    11. Re:Grep Bomb by aav · · Score: 1
      My guess is that the size of the swap partitions are different between the two machines. I think the swap on the one running Suse is larger.

      Grep should claim "memory exhausted "when it would have filled the entire memory. Since this includes the swap, systems with larger swaps will take longer to stop the process.

      Also, since all this time is spent in a malloc/realloc + read from /dev/zero, it might be possible that a slower processor would take a tad longer. If your computers had similar hardware and were similarly configured (i.e. size of swap), I think the command should be stopped in about the same amount of time.

      If you were curious, here's what I found on my SuSE from running 'time grep foo /dev/zero':
      real 0m2.424s
      user 0m1.827s
      sys 0m0.546s
      I would guess that the sytem time accounts for the malloc, while the user time accounts for the reading from /dev/zero.

    12. Re:Grep Bomb by rtaylor · · Score: 1

      Ahh.. That must be it.

      grep -a foo /dev/zero blocks.

      --
      Rod Taylor
  8. Yawn. by BJH · · Score: 3, Insightful

    So what? Anybody in their right mind would have locked down their box if they're letting third parties access it remotely.

    Running around screaming "FORKBOMB! FORKBOMB! The sky's falling in!" seems to be a common pattern every few years. If you know what you're doing, it's trivial to prevent and if you don't know what you're doing, why are you running a public box?

    1. Re:Yawn. by Anonymous Coward · · Score: 1, Insightful
      So what? Anybody in their right mind would have locked down their box if they're letting third parties access it remotely.

      Interesting that your "solution" is perfectly OK when applied to Linux, but is entirely unacceptable for the SAME problem with Windows.

    2. Re:Yawn. by gowen · · Score: 1
      Interesting that your "solution" is perfectly OK when applied to Linux, but is entirely unacceptable for the SAME problem with Windows.
      Really? I take it you'll back that up with an earlier post from BJH in which he castigates Windows for allowing users to have fork bombs.
      --
      Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
    3. Re:Yawn. by BJH · · Score: 1

      Please point out my criticism of Windows, because I seem to have missed it...

      To be honest, I don't use it anyway, so I have no idea whether it's possible to forkbomb a Windows box, and even less interest in the subject.

    4. Re:Yawn. by Anonymous Coward · · Score: 0

      99% of multiuser Windows boxes are in managed Citrix environments. (Because each connection costs $$$) If someone sets off a forkbomb the Admin can easily LART their asses.

      OTOH, there's quite a few public Unix shellservers out there.

    5. Re:Yawn. by Taxman415a · · Score: 4, Insightful

      This level of fanboyness is unbelievable. Well actually I should not be surprised, blindness to linux's faults is endemic here on Slashdot.

      The author is not "Running around screaming...", he is simply very surprised that a local user can exhaust a system so easily. Maybe every single admin should think of all n possible security problems every single time they take a box live, but people are human.

      Which one is worse: limits in place by default so that an admin needs to know how to raise them when necessary and the forkbomb would not work, or no limits in place and having to know to set them or else the box can be brought to its knees? Secure by default or free for all.

      I suppose you think every default install should also have telnetd enabled by default because any admin with half a brain should know how to turn that off? Point is admins are fallible, the default should be the lower total risk/cost option. I think which one that is is clear here.

    6. Re:Yawn. by RFC959 · · Score: 1

      If the author is "surprised", it is only because he is ignorant. Forkbombs are the oldest trick in the book. They were old news ten years ago and they were probably old news ten years before that and ten years before that. As far as being one of "Linux's faults", I think you'll find that just about any multiprocessing OS can be forkbombed. Fork bombs are also about the most trivial form of attack imaginable, and also the most trivial to protect against. They have to be launched locally, they don't permit privilege elevation, it's obvious who's doing it, and the worst possible effect is that you have to power-cycle the box. If there weren't any way to prevent them, I'd be more concerned, but as it is, this article rates a big yawn.

      As far as limits in place by default - a computer is a general-purpose tool and I as the admin am the user of that tool. If there are going to be any limits on what I do, they should be there because I put them there. You can hand-wave away the possibility of running into the limits, but I have seen real situations in which a host needed to run thousands of processes under the same UID, and then ran into a limit which no one expected to be there. In contrast to the "lower total risk/cost option", I'd rather use the "principle of least surprise."

    7. Re:Yawn. by pigah · · Score: 1

      Can you imagine Tom Jones singing this song. "Forkbomb!, Forkbomb! there's a forkbomb You can give it to me when I need to come along"

    8. Re:Yawn. by RedBear · · Score: 2, Insightful

      Stability is supposed to be one of the selling points of Linux. What exactly is the benefit in having a default setting that allows any user on any Linux desktop computer to lock up their machine just by starting up some application or script that consumes too many resources? Thanks but no thanks. I want both my server and my personal desktop computer to be able to recover from such things without a hard reboot. Whether they are malicious or just a mistake in some shell script doesn't matter. If it takes down the box, it's bad, and should be disabled by default.

      Nobody in their right mind should be defending a lack of stability in Linux. Those who want to push the box to its absolute limits (and risk a hard lockup) can find out how to activate the options that allow this. It should NEVER be the default to have options active that compromise the stability of a machine so easily. Desktops are just as important as servers in this regard, as far as I'm concerned.

      Linux is supposed to be better than Windows, remember? Raising a valid objection to a default setting capable of causing (or allowing) real-world problems on everyday computer systems is not "running around screaming".

      Oh, and by the way, not everyone on Earth is a trained Linux system administrator, and being a Linux admin isn't a prerequisite to being in one's right mind. There are plenty of perfectly intelligent people who have no idea how to "lock down their box" and never will, just like most people have no idea how to break down a carburator or build a nuclear reactor. Some people have other things to do. If Linux distros want to market to the general public, they should be safe to use by the general public. We're talking about DEFAULTS here that are being used by every person running Linux in general. Not just servers run by Linux gurus. Your statement comes across like saying people who aren't expert car mechanics shouldn't be allowed on public roadways. In other words, a little elitist, don't you think?

  9. Not your usual vulnerability by David's+Boy+Toy · · Score: 5, Informative

    Fork bombs only work if you can log into the system in question. This is a bit lower priority than your usual vulnerabilities which allow outside attacks.

    1. Re:Not your usual vulnerability by theManInTheYellowHat · · Score: 1

      Sort of.... But coupled with an ssh or httpd exploit then you have real damage.
      However, I could see some poorly writen loops and the first experiments with fork bringing down the house. But none of us would do that would we....

    2. Re:Not your usual vulnerability by Doc+Ido · · Score: 1

      I took down one of my college's servers while programming in a networking class. I didn't know what fork meant, but now I do. :)

    3. Re:Not your usual vulnerability by Jeff+DeMaagd · · Score: 2, Insightful

      The biggest security problems come from the inside. Other employees can't be trusted just because they work for the same company.

    4. Re:Not your usual vulnerability by hackstraw · · Score: 1

      Also, if there are no limits on users they can DOS the box by taking all available memory and/or disk space. Hell, I don't even know how to eliminate a user from filling up /var/log by pumping a bunch of crap into the 'logger' command. I believe that the same can be done with file descriptors, but I could be wrong.

      So, what we have learned is that Linux being a multiuser OS can have one of its users with the default configuration consume all or enough resources on a box. Well, actually the default is a good thing. It would be annoying to be in the middle of doing something important and stuff stop working because you've forked too many processes. Also, an installation cannot predict the resources available to the system, therefore no generic limits would be reasonable.

      In summary, nothing to see here. Please move along.

    5. Re:Not your usual vulnerability by Chanc_Gorkon · · Score: 1

      Correct. I would not put a limit on this or if a limit is established, make it very high.

      Also, who launches anything with default settings? they don't even do that with Windows where I work.

      --

      Gorkman

    6. Re:Not your usual vulnerability by Pentavirate · · Score: 1

      Yet the BSD Unices and the Debian distro have no problem with this. Why don't we find out what they're doing and implement it and then it truly is a non-issue.

      Then we can move along with a lot more confidence.

    7. Re:Not your usual vulnerability by halber_mensch · · Score: 1
      Fork bombs only work if you can log into the system in question. This is a bit lower priority than your usual vulnerabilities which allow outside attacks.


      But if you RTFA, you'll notice how the cracker got in - through a parameter to nwstats.pl that wasn't checked for perl syntax. The cracker broke the line of execution into a logical OR, allowing him to execute arbitrary PERL expressions as the apache user. Including fork(). Including++ while() { fork(); }

      But in this case the attacker simply wanted to gain access to the box to DDoS other sites and other frivolous activities.
      --
      perl -e "eval pack(q{H*},join q{},qw{70 72696e74207061636b28717b482a7d2c717b343 637323635363534323533343430617d293b})"
    8. Re:Not your usual vulnerability by halber_mensch · · Score: 1

      Actually, I need to correct myself here... the paramter that was abused is slapped into a system call, and that call is therefore appended with a logical OR allowing the attacker to execute arbitrary processes on the system. I need to RTFA more closely.

      --
      perl -e "eval pack(q{H*},join q{},qw{70 72696e74207061636b28717b482a7d2c717b343 637323635363534323533343430617d293b})"
    9. Re:Not your usual vulnerability by teg · · Score: 1

      The biggest security problems come from the inside. Other employees can't be trusted just because they work for the same company.

      For unauthorized data access, that's likely. But DOS? I doubt it...

    10. Re:Not your usual vulnerability by halber_mensch · · Score: 1

      And just to correct myself one more time,

      s/logical\ or/UNIX pipe/g

      --
      perl -e "eval pack(q{H*},join q{},qw{70 72696e74207061636b28717b482a7d2c717b343 637323635363534323533343430617d293b})"
    11. Re:Not your usual vulnerability by bani · · Score: 1

      here's a common theme i've seen in recently compromised boxes:

      sniff/bruteforce non-root user's password
      ftp to the user's account and upload some CGIs
      run the CGIs which do password bruteforcing of entire /16's (50mbit/sec of SYNs for example)

      would be a simple task for them to forkbomb from a cgi. they don't even need shell access. just ftp and http.

  10. Re:In other news... by Winterblink · · Score: 1
    every windows distro found insecure by default AND after patching.
    You obviously missed the point of the article. Move along...
    --
    "I'm a leaf on the wind. Watch how I soar."
    -Hoban Washburn
  11. Retarded by 0123456 · · Score: 4, Interesting

    Sorry, but this article seems pretty retarded to me. Windows is insecure because people can use IE bugs to install scumware that takes over your entire machine... Linux is insecure because ordinary users who are legitimately logged into your machine can fork off as many processes as they want? Huh?

    Sure, maybe if you're running a server that allows remote logins, you want to restrict how many processes a user can run. But as a single-user system, I want to be able to run as many processes as I choose, not be restricted by the distribution author's ideas of what's good for me.

    1. Re:Retarded by phasm42 · · Score: 4, Informative

      If you had read the article, you'd have realized that this was not Windows vs Linux. It was a report on how a fork bomb can take down default Linux installs, but not default BSD installs. Also, the article was clearly not concerned about single-user installs, but multi-user. Or if the box is hacked into, this is an extra bit of protection.

      --
      "No one likes working in a hamster wheel, and your shop smells of cedar shavings from here." - TaleSpinner
    2. Re:Retarded by LurkerXXX · · Score: 1

      And if you run some badly coded app that has an unintended fork-bomb included from a screwup in some routine? Your machine freezes. It's not going to happen often, but why let it? Why not set some sane limits, and let the user modify those limits later as they see fit?

    3. Re:Retarded by 0123456 · · Score: 2, Insightful

      "It was a report on how a fork bomb can take down default Linux installs,"

      Yes, and? I don't care about fork bombs, since I don't run them on my PC... being able to run as many processes as I choose on that PC is a feature, not a flaw. I do care about having scumware remotely installed on my PC through security holes in applications and the operating system, which is a flaw, not a feature.

      Seriously, if you're letting people log onto your PC and run fork bombs, you have far greater problems than a lack of resource limits in the default install.

    4. Re:Retarded by ctrl_apple_banana · · Score: 1

      But as a single-user system, I want to be able to run as many processes as I choose, not be restricted by the distribution author's ideas of what's good for me.

      When your disk is full, you are very happy that the OS tell you so. You may even be more happy if it told you so before the disk is full.

      But if your OS is not capable to run all the processes you ask him to spawn, you want it to just crash ?

      Can you elaborate ?

    5. Re:Retarded by Anonymous Coward · · Score: 0
      Believe it or not, there are people who use Unix for more than web browsing on single-user systems...

      (The words "Mom's basement" not used as a result of great restraint on my part.)

    6. Re:Retarded by Anonymous Coward · · Score: 0

      "but not default BSD installs"

      but not default OpenBSD installs

    7. Re:Retarded by Alioth · · Score: 4, Insightful

      *Any* local exploit is *also* a potential remote exploit (just like the IRC conversation shows). I had someone nearly pwn a box of mine by using an exploit in a buggy PHP script, then trying to elevate privileges through a local exploit.

      Had I not considered local exploits important, I'd have had one nicely hacked box.

    8. Re:Retarded by Chanc_Gorkon · · Score: 1

      Who launches a multi-user system with DEFAULTS???

      --

      Gorkman

    9. Re:Retarded by Anonymous Coward · · Score: 0

      No, article says FreeBSD, NetBSD and OpenBSD. Tre reading sometime.

    10. Re:Retarded by phasm42 · · Score: 4, Insightful

      Two things: 1. Just because you don't care doesn't mean other people won't care. A lot of people (especially in a business environment) do have more than one person logging. 2. The article is trying to point out something that Linux installs could improve on. That is all.

      --
      "No one likes working in a hamster wheel, and your shop smells of cedar shavings from here." - TaleSpinner
    11. Re:Retarded by compass46 · · Score: 2, Insightful

      What about a poorly written program run by you with an unintentional bug that ends up causing this? What about a remote exploit which allows abitrary code execution? Do you inspect every line of code in programs that you use to make sure this isn't going to happen?

      User land programs should not be able to bing an entire system to it's knees. Come on, when I first started with Linux, Slashdotters made fun of Win98 because a single program could crush the machine.

    12. Re:Retarded by NewStarRising · · Score: 1

      "But as a single-user system, I want to be able to run as many processes as I choose, not be restricted by the distribution author's ideas of what's good for me."

      As a single-user system it should be simple for you to change the defaults to how you want them.
      Out-Of-The-Box Defaults should be secure.
      The whole point about having root/user accounts is to limit what users can do. On a single-user machine you can set those limits yourself, and alter them as you please.

      This article was about Defaults.
      If you want to alter your defaults, go ahead.

      --
      b3 4phr41d 0f my 4bov3-4v3r4g3 c0mpu73r kn0wI3dg3!
      MadDwarf
    13. Re:Retarded by someonehasmyname · · Score: 1

      Try reading the article. He tested a NetBSD laptop, a FreeBSD server and an OpenBSD firewall, and none of them had any problems from an attempted forkbomb.

      --
      Common sense is not so common.
    14. Re:Retarded by Yaztromo · · Score: 2, Insightful
      Yes, and? I don't care about fork bombs, since I don't run them on my PC... being able to run as many processes as I choose on that PC is a feature, not a flaw.

      A fork bomb doesn't necessarily have to be due to a purposeful attack. A software bug can easily cause a fork bomb by going into an endless loop launching new processes. Should this take your system completely down?

      Admittedly, you probably shouldn't bee seeing such a serious bug in any release software. But what if you're a developer, and have code that is forking in a loop which, due to logic problems, never exits? Should you be forced to reboot your system?

      I can think of a lot of such instances where a runaway process might start forking -- and personally, I'd prefer to be able to kill the process instead of being forced to reboot. I doubt if I'm ever going to purposefully spawn 5000 simultaneous processes. I think you'd have a valid complaint if the OS was limiting you to 50 processes, but there is a realistic upper limit of the number of processes a given hardware configuration is going to be able to reliably handle -- why shouldn't the kernel prevent the system from surpassing such a limit? Do you really want to be able to open enough processes to kill your system so badly the only way out is a reboot?

      Yaz.

    15. Re:Retarded by Peaceful_Patriot · · Score: 1

      but not default OpenBSD installs

      and not Debian, which was trashed on /. yesterday for being 'stale' and 'out of date'.

      --
      There is nothing so powerful as an idea whose time has come.
    16. Re:Retarded by ccady · · Score: 1

      Bingo! Sensible defaults would make it so you *could* launch a multi-user system with defaults. Would that be cool, or what?

      --
      J'aime mieux les méchants que les imbéciles, parce qu'ils se reposent. -- Alexandre Dumas
    17. Re:Retarded by Anonymous Coward · · Score: 0

      Had you been a decent php coder, they wouldn't have been on your box in the first place.

      Had they been an actual hacker, they would've rooted your box. The mere fact that you had a buggy php script implies that either you do not know php well enough to be using it on a live server, or that you are not smart enough to inspect the code you download- either one makes me doubt your overall security 'skills'.

      A compromise nearly _always_ results in a further elevation of priv's, something like 95% of all root compromises come after an unpriv'd local user is obtained.

    18. Re:Retarded by Some+Dumbass... · · Score: 1

      *Any* local exploit is *also* a potential remote exploit (just like the IRC conversation shows). I had someone nearly pwn a box of mine by using an exploit in a buggy PHP script, then trying to elevate privileges through a local exploit.

      How can a fork bomb be used as a remote exploit? You've just eliminated all the meaning from the words "local" and "remote". I mean really, even in your own example it was a real remote exploit (buggy PHP script) which allowed access to the system in the first place.

      Yes local exploits are dangerous (I don't think the grandparent post disagreed with that) but without remote access to the machine, in practice that system will be fine. So no, they're not the same thing. The remote access/remote exploit is by far the more dangerous part. Once an attacker has that, they can do all sorts of things even without privilege escalation (filling up the HD with junk files, sending out spam e-mails, etc.). Unless of course you very carefully protect against every one of those things, but that's awfully hard. Show me an OS which by default would prevent an attacker who got access to a non-root account from sending out spam, and I'll show you an OS with no TCP/IP stack. ;)

    19. Re:Retarded by argent · · Score: 1

      *Any* local exploit is *also* a potential remote exploit

      This isn't a local exploit, it's a local denial of service attack.

    20. Re:Retarded by Chanc_Gorkon · · Score: 1

      Um...even if I could, I wouldn't. I am kind of weird like that in not trusting the distro to do things right. It WOULD be cool, but would NEVER happen. What works for a desktop distro would be completly unappropriate for a server.

      --

      Gorkman

  12. Debian not vulnerable? by lintux · · Score: 5, Interesting

    I really wonder what kind of Debian installation he runs. Just a couple of weeks ago I had to reboot my Debian box after some experimenting with an obfuscated fork bomb. Won't work again now that I set some ulimits, but they're not there by default.

    In case anyone is interested, here's the obfuscated fork bomb: :(){ :&:;};:

    1. Re:Debian not vulnerable? by jon787 · · Score: 2, Informative

      You were reading bash.org weren't you?

      And yes, my Debian box also fell to that the first time I ran it.

      I put that on the wall of the CS computer lab here for fun, I don't know how many poor souls ran it.

      --
      X(7): A program for managing terminal windows. See also screen(1).
    2. Re:Debian not vulnerable? by initsix · · Score: 3, Funny

      Sweet!
      mark@stewie:~$ w
      11:11:04 up 216 days, 19:50, 2 users, load average: 258.41, 767.84, 339.94

    3. Re:Debian not vulnerable? by mslinux · · Score: 1

      Same here. I wrote a forkbomb using Python... had to pweroff the machine (push and hold the power button). I'm running Debian Testing.

    4. Re:Debian not vulnerable? by _xeno_ · · Score: 1

      I just tried that in Windows XP, and it would appear that Windows has some form of limit, as it didn't take long before bash started spitting out "resource not available" errors and wasn't able to fork more children.

      Cygwin, before anyone asks.

      Although the system was basically unusable until I forcibly killed the root Cygwin process (they're tied to the window in Windows, so I just had to hit that nice X). But it seems to have recovered, without a reboot.

      --
      You are in a maze of twisty little relative jumps, all alike.
    5. Re:Debian not vulnerable? by buster_dog · · Score: 1

      Seems to bring cygwin/windows XP to its knees

    6. Re:Debian not vulnerable? by cronot · · Score: 1

      Tried it here too, and saw pretty much the same thing. After recovering...

      [~]: $ ulimit -a
      core file size (blocks, -c) unlimited
      data seg size (kbytes, -d) unlimited
      file size (blocks, -f) unlimited
      open files (-n) 256
      pipe size (512 bytes, -p) 8
      stack size (kbytes, -s) 2043
      cpu time (seconds, -t) unlimited
      max user processes (-u) 63
      virtual memory (kbytes, -v) 2097152

      As you can see, maximum user processes is 63. I can't see why Windows/Cygwin isn't respecting these limits. Or it is, but Windows screams before reaching such a low limit. On Linux, this limit is usually "unlimited". On my Debian box here, setting a limit of 1024 makes the attack futile (less than 2 seconds before the script craps out because of lack of resources).

      So I guess Windows is even more fragile than Linux on this...

    7. Re:Debian not vulnerable? by spankers · · Score: 2, Informative

      Debian is vulnerable. I am running Unstable and...

      pam_limits is commented out in /etc/pam.d/login and /etc/security/limits.conf has no default user limits:

      eherr@chernobyl:~$ ulimit -a
      core file size (blocks, -c) 0
      data seg size (kbytes, -d) unlimited
      file size (blocks, -f) unlimited
      max locked memory (kbytes, -l) unlimited
      max memory size (kbytes, -m) unlimited
      open files (-n) 1024
      pipe size (512 bytes, -p) 8
      stack size (kbytes, -s) 8192
      cpu time (seconds, -t) unlimited
      max user processes (-u) unlimited
      virtual memory (kbytes, -v) unlimited

    8. Re:Debian not vulnerable? by Penguinshit · · Score: 1


      fork: Resource temporarily unavailable
      $ uname -a
      Linux gnudity 2.2.20-idepci #1 Sat Apr 20 12:45:19 EST 2002 i686 GNU/Linux

      This is a brand-new Debian 3.0 installation on a P3-500mhz IBM 390X laptop. The usage shot to 45 before the shell crashed, leaving my system temporarily slow but otherwise unaffected.

    9. Re:Debian not vulnerable? by hawk · · Score: 1

      I think it's fixed in FreeBSD now, but five years ago, I brought down both Debian and FreeBSD by trying to load a file bigger than virtual memory into a binary editor (I was trying to recover a deleted file from a hard disk, iirc).

      hawk

  13. "Interesting to note" by Anonymous Coward · · Score: 0
    Why is it interesting to note that Debian wasn't affected? Is Debian supposed to be super secure, or is this just Debian fanboy praise? Conversely, does Debian have a reputation for being very insecure and it is interesting that it wasn't affected?

    Which other ones were not affected? Why aren't they noteworthy and interesting?

  14. Not a vulnerability. by argent · · Score: 5, Insightful

    A forkbomb is just a relatively simplistic way to mount a resource exhaustion attack. I would be extremely wary of anyone who claims that their UNIX class operating system is immune to resource exhaustion from a local user. There's just too many resources that can be commandeered, and to lock them all down would leave you with a system that's so restricted as to be nearly useless as a general computing platform.

    It must be a slow day on /. if they're reporting this as news.

    1. Re:Not a vulnerability. by mOdQuArK! · · Score: 3, Insightful
      I would be extremely wary of anyone who claims that their UNIX class operating system is immune to resource exhaustion from a local user.

      Eh? Most modern UNIX systems let you put some hard limits on all the collective ways that users can consume resources, including # processes, disks space, real/virtual memory, cpu time, etc. Any administrator who is responsible for a multi-user system should have those set to "reasonable" values, and no individual user (except for the administrator of course) would be able to bring down the system.

      What kind of resource are you thinking of that any user can exhaust which would stop the system (through resource exhaustion)? Log file messages?

    2. Re:Not a vulnerability. by Anonymous Coward · · Score: 0

      and everyone fails to mention that WINDOWS has been available for fork bombing cince day one and they will NEVER fix that.

      cripes, what's next?

      LINUX INSECURE! all versions allow people to log in!

    3. Re:Not a vulnerability. by Anonymous Coward · · Score: 2, Insightful
      You can always allocate a big chunk of memory and write one byte to each page. The machine will be swapping so hard it would take an hour to log in and figure out which job is the problem. Yes, it doesn't "crash" the system, but unusable is the same as down in my book.

      The grandparent post is right. Absolute security is absolutely unusable. You need to trust your users a little so they can do the work they need to do. If they step over the line most want to know how to avoid doing it again.

    4. Re:Not a vulnerability. by Anonymous Coward · · Score: 0

      How about semaphores?
      It's pretty easy to use them all up so no new processes can create them. Though I guess this wouldn't make the system unuseable.

    5. Re:Not a vulnerability. by mOdQuArK! · · Score: 2, Insightful
      You can always allocate a big chunk of memory and write one byte to each page.

      That would be caught by the limits on virtual memory usage. As I said, what resource are you thinking of that a decent system administrator couldn't limit to prevent a normal user from exhausting resources?

    6. Re:Not a vulnerability. by argent · · Score: 1

      Most modern UNIX systems let you put some hard limits on all the collective ways that users can consume resources, including # processes, disks space, real/virtual memory, cpu time, etc.

      All at once, through multiple sessions, using setuid applications and TCP services as proxies? If I'm going to try and take down a system, I'm certainly not going to follow rules like "you must only use one attack at a time" or any other "must be this tall to storm the castle" type restrictions.

      A resource exhaustion attack is basically a very richly equipped denial of service attack. Denial of Service is inherently hard to guard against without blocking legitimate requests, and when the attacker can run arbitrary code on the local system it's almost impossible.

    7. Re:Not a vulnerability. by Anonymous Coward · · Score: 1, Interesting

      The way that virtual memory is accounted for makes it totally impossible to provide for a "normal user" (e.g. someone running GNOME) and absolutelu prevent exhaustion of system resources on a modest desktop machine. The situation in which the user runs an OpenGL screensaver (colossal VM size due to userspace mapping say 256MB of graphics card) can't be distinguished in this way from the situation in which they allocate 256MB of RAM-backed VM and then strobe through it touching one byte at a time. One is normal usage, the other brings the machine to its knees.

      Here's another example... it sounds OK to allow a user to run 24 processes, right? And it sounds OK to allow them to allocate 100MB of memory, right? But that's 2.4GB of memory you just permitted! And there's no way (due to lack of per-page inspection for performance reasons) for the kernel to distinguish if they've really got 2.4GB or if each process is sharing 98% of that memory with the rest.

      Machines that are locked down enough to actually _prevent_ (not detect, but prevent) resource exhaustion are usually quite useless. Very few scenarios require you to do this, it's often enough to prevent trivial fork-bombs and put up a big warning saying "We catch you breaking it, we make you pay".

    8. Re:Not a vulnerability. by snorklewacker · · Score: 1

      That would be caught by the limits on virtual memory usage. As I said, what resource are you thinking of that a decent system administrator couldn't limit to prevent a normal user from exhausting resources?

      The log is a big one. Of course it can take a lot of time to fill up a log partition of a mere 10 gigs, at which time someone is likely to notice. Security against malicious attacks is at root about controlling human behavior. When a human controls the attack, at some point a human may have to get involved in the defense. The appropriate technical measure in this case is the slay command.

      --
      I am no longer wasting my time with slashdot
    9. Re:Not a vulnerability. by Etyenne · · Score: 1
      It must be a slow day on /. if they're reporting this as news.

      Actually, it have been slow days for the past 5 years already. Where have you been since 1998 ?

      --
      :wq
    10. Re:Not a vulnerability. by legirons · · Score: 1

      "There's just too many resources that can be commandeered, and to lock them all down would leave you with..."

      With SELinux? Locking down all such resources sounds just like the definition of a "hardened" operating system.

    11. Re:Not a vulnerability. by argent · · Score: 1

      Locking down all such resources sounds just like the definition of a "hardened" operating system.

      Or a realtime operating system. Have you used a tightly partitioned OS with mandatory access controls? I have... and, well, getting back to my original message and completing the text you quoted: "to lock them all down would leave you with a system that's so restricted as to be nearly useless as a general computing platform"... that's a pretty good description of guaranteed-response-time hard realtime and MAC partitioned environments.

    12. Re:Not a vulnerability. by wirelessbuzzers · · Score: 1

      Fork + malloc bomb comes to mind: memory limits are usually per process.

      Also possible are exhausting kernel file descriptors or, as one poster mentioned, semaphores. Or you can get a whole bunch of programs reading and writing a large number of files spread out across the disk (eg some in /tmp/) and thrash the machine so that disk I/O slows to a crawl. On many systems, there are system calls that take a lot of CPU time to complete; these are also a good candidate for attack.

      --
      I hereby place the above post in the public domain.
    13. Re:Not a vulnerability. by Anonymous Coward · · Score: 0

      2005 - 1998 = 7

      7 != 5

    14. Re:Not a vulnerability. by greed · · Score: 2, Informative
      I would be extremely wary of anyone who claims that their UNIX class operating system is immune to resource exhaustion from a local user.

      There are some things that Linux responds to in a much worse way than some of the older UNIXes.

      I wrote a fork() bomb at work to demonstrate what a buggy program had just done to one of our Big Sun Machines. It was out of process slots (entirely--because the per-user limit was something like 30,000, and with the number of users on the system with hundreds of unreaped child processes it overloaded the kernel process table).

      while(-1!=fork());

      I've done things like that on AIX machines I was testing in the past, and sure, they get pretty unresponsive and it's hell to kill off; you basically have to switch to that user and carefully kill -9 -1. (Careful to make sure you don't do it as root....) But if you don't try to hide the bomb, CTRL-C eventually goes through.

      It wedged my Linux machine so hard that caps lock stopped responding. (My test for "is it X11 that's dead or the whole kernel".) CTRL-C or CTRL-\ just weren't going to happen... I tried for 15 minutes before hitting the power button.

      And I've got a 4095 per-user process limit. But as fork() starts failing in some processes, other processes get scheduled to try fork() themselves. So you get over 4000 processes all trying to fork() at once, and nothing else gets time on the CPU.

      A different scheduling algorithm could mitigate some of the impact of a forkbomb on Linux. Similar to the way Linux will dump all its VM pages in favor of allocating them to disk buffers; Linux's approach to some things may be great for performance, but can make things worse when things go wrong.

    15. Re:Not a vulnerability. by Nevyn · · Score: 2, Interesting
      • Sendmail -- most BSDs use it ... craps itself under load, and is a major PITA to cleanup the queue.
      • Attach the disks, have multiple procs read/writting data as fast as possible (you don't need much disk space, writting small files is fine).
      • Using recursive SCM_RIGHTS to use huge numbers of PF_LOCAL sockets (it isn't accounted after SCM_RIGHTS).
      • Find a simple setuid() app. and fork/exec bomb to that.
      • BIND is fairly simple to DOS attack from the local machine.
      • HTTP is also likely to be easy to DOS, due to needing 1 proc per connection ... where you, as the attacker, don't need anything like that.
      • portmap almost always doesn't do any auth checks on assign X service to Y port calls ... so that would easily take out NFS, FAM and/or any other RPC services you are running (re-direct the ports to HTTP for even more fun).
      • Run something like: (while :; do; mkdir a; cd a; done) ... takes out more than a few directory walking applications (often including backups).

      There's probably some more obvious ones, if I thought about it a bit.

      I guess I wouldn't mind if Fedora came with defauts that stopped a forkbomb on my box, if I was stupid enough to run one ... but if they fucked it up and set it too low I guarantee I'd be very pissed.

      --
      ustr: Managed string API with ave. 44% overhead over strdup(), for 0-20B
    16. Re:Not a vulnerability. by Taladar · · Score: 1

      Think of Harddisk usage as a ressoure and you have a perfect example. Even with only 10 MB of disk quota it shouldn't be hard to kill hard disk performance for all other users.

    17. Re:Not a vulnerability. by argent · · Score: 1

      Similar to the way Linux will dump all its VM pages in favor of allocating them to disk buffers;

      Surely there's something you can use to tune the VM/buffer cache ratio...?

    18. Re:Not a vulnerability. by Etyenne · · Score: 1

      Nitpicker ...

      --
      :wq
  15. in other news by Anonymous Coward · · Score: 0

    script kiddy admits to fork bombing... http://www.securityfocus.com/archive/75/393292/

    1. Re:in other news by Anonymous Coward · · Score: 0

      seems the link is not working now! http://www.securityfocus.com/archive/75/393292/ really something should be implemented to stop stuff like this. http://www.securityfocus.com/archive/75/393292 god damn it slashdot why dont the link work?

  16. Re:In other news... by oscartheduck · · Score: 5, Insightful

    No, I understand the article. I just couldn't resist the jab. The fact is that GNU/Linux ought to be the best it can be in and of itself. That some distributions are screwing that up and making very poor defaults is not to be forgiven. Not at all. Especially when it isn't difficult to do better.

    --
    How to use coral cache: http://slashdot.org.nyud.net:8090/~oscartheduck
  17. Obligatory Quote by cheezemonkhai · · Score: 1, Flamebait

    User - Give me a gun I want to shoot my foot off.

    *NIX - Sure here it the gun it's loaded

    Windows 9* - Are you ...[BSOD] fatel exception

    Windows NT - Are you sure?
    - Sure your sure?
    - Oh by the way sorry your only admin,
    not the SYSTEM account so I can't let
    you do that.

    I know it's a bit trollish, but I like the ability to over rule what the OS thinks is best for me.

    And as previously mentioned you can turn this option on easily enough.

    1. Re:Obligatory Quote by Anonymous Coward · · Score: 0

      Without being rude...

      J O K E !!!

    2. Re:Obligatory Quote by Anonymous Coward · · Score: 0

      I don't quite understand your post. Are you praising *nix because it will let you do it, or are you praising NT because it won't?

    3. Re:Obligatory Quote by Anonymous Coward · · Score: 0

      Does it really matter when a post is that astonishingly hilarious?

  18. And of course, shell access is so easy to get by n0dalus · · Score: 5, Insightful

    On the 3 distros listed as vulnerable, the default settings would stop any remote person from having a chance of getting a shell open on the box to perform the fork attack in the first place.
    If a person has enough access to the machine to be able to "forkbomb" it, then there's plenty of other nasty things you could do to it.

    1. Re:And of course, shell access is so easy to get by thrashbluegrass · · Score: 1

      And of course, there exist no cgi scripts which use shells to do something, right? And even if there are, we know how hard it is to find a flaw in 'em, right?

      Remember that no exploit exists in a vacuum; it's going to be one of a series of vulnerabilities used to bring your box down/gain root/read data.

      And, although you're right that someone could do something much nastier with shell access, if you just wanted to DOS a machine, this seems like a pretty damned simple way to do it.

    2. Re:And of course, shell access is so easy to get by n0dalus · · Score: 1

      And of course, there exist no cgi scripts which use shells to do something, right?

      If you find a vulnerability in a CGI script, there's worse things you can do than a fork attack. Infact, if you wanted to retain your remote control over the server, the last thing you want to do is give it a denial of service like this.

    3. Re:And of course, shell access is so easy to get by thrashbluegrass · · Score: 1

      Forget about the trees, and see the forest:

      The original post was about how "hard" it was to get access to a shell. I pointed out that it wasn't quite so simple.

      But what if I didn't want to control it, just bring it down? This is one more vector.

      Cracking systems doesn't necessarily mean affecting control.

  19. "Secure By Default"? by EXTomar · · Score: 3, Interesting

    Doesn't OpenBSD still install 'ftpd' by default? Although it is not turned 'on', the fact is it is still on the file system ready for exploit and requires rigoriously patched unless you take steps to remove it. Doesn't this seem like a dubious definition?

    I'm all for making special install kernels and distros "out of the box" to be as hardened as possible. I would love see many distros do a "paranoid" configuration. There are plenty of things OpenBSD does right but that does not excuse OpenBSD. Just like Linux and every other operating system out there, they can still strive to do better.

    1. Re:"Secure By Default"? by Anonymous Coward · · Score: 0

      whomever marked this as 'insightful' needs their head checked ...

      Under those remarks - every OS in the world is shid because it includes applications (running or not).

    2. Re:"Secure By Default"? by DustMagnet · · Score: 1
      Doesn't OpenBSD still install 'ftpd' by default? Although it is not turned 'on', the fact is it is still on the file system ready for exploit and requires rigoriously patched unless you take steps to remove it. Doesn't this seem like a dubious definition?

      If a tree falls in the forest and no one is there to hear it, does it make a sound?

      We could argue all day about this one, but it has nothing to do with security. It's only about the definitions of "sound" and "secure".

      --
      'SBEMAIL!' is better than a goat!!
    3. Re:"Secure By Default"? by ducomputergeek · · Score: 1
      It doesn't excuse OpenBSD, however it the stated goal of OpenBSD to create as secure default install as possible. No system is ever going to be 100% secure ever, but OpenBSD is farther ahead of the game than most in the security department.

      Just look at the number of exploits published for OpenBSD vs. Linux, Apple, other BSD's, and Windows. OpenBSD isn't batting 1.000, but higher than the others...

      --
      "The problem with socialism is eventually you run out of other people's money" - Thatcher.
    4. Re:"Secure By Default"? by ArbitraryConstant · · Score: 4, Interesting

      Please explain how the ftpd binary (not suid) can be used to exploit the system in ways that the user otherwise could not.

      Taking away the ftpd binary wouldn't stop the user from doing exactly the same thing by some other means. For example, they could simply download the source and compile a new one by themselves. Or use Perl. Or compile a binary somewhere else and download that.

      --
      I rarely criticize things I don't care about.
    5. Re:"Secure By Default"? by Nimrangul · · Score: 1
      Whomever marked this as insightful needs to be kicked.

      For one, the ftpd included in OpenBSD is not the GNU one which constantly seems to have issues, it is the BSD one which came from NetBSD when the two systems forked.

      How is it wrong to have a commonly used daemon on the system should someone want to use it? It isn't running by default so it is no problem unless activated.

      If someone wants to use a differnet ftp daemon they need not remove the original one, they just add another and start it. The base system's ftpd never need be started if the administrator doesn't want it to.

      Seems I am redundant, but I felt the need to chime in agreement with the others.

      --
      I'm sick of following my dreams - I'm just going to ask them where they're going and hook up with them later.
    6. Re:"Secure By Default"? by Anonymous Coward · · Score: 0

      This is the OpenBSD ftpd. If there are any known security issues they are fixed. There is a constant search for previously unknown holes. It is also compiled with stack protection and does privilege seperation.

      How did this clueless FUD get insightful?

    7. Re:"Secure By Default"? by binand · · Score: 2, Insightful

      OpenBSD does not install wu-ftpd. Instead, they have their own ftpd, called ftpd-BSD (which has been ported to Linux as well, look it up on rpmfind or something). It is wu-ftpd that has a reputation of being buggy.

    8. Re:"Secure By Default"? by rosie_bhjp · · Score: 1

      Looking at the advisories page, ftpd for OpenBSD hasn't required a patch since April 23,2001.

      So ftpd is a very good example how the Net and Open folks have gotten it 'right'.

      --
      A radio maverick jumps to internet only. The Future of Rock n Roll
    9. Re:"Secure By Default"? by Anonymous Coward · · Score: 0

      Actually, OpenBSD provides systrace. If you run a systraced server, you most certainly would not be allowed to run any binary outside the rules defined. Also, if you're running at securelevel 3, you won't be able to change firewall rules to allow ftp traffic even if you're root.

    10. Re:"Secure By Default"? by halber_mensch · · Score: 2, Funny

      Clearly, OpenBSD should re-evaluate its install process. The fact that OpenBSD installs so many exploitable executables like "ftpd", "telnet", "ping", "sed", "awk", "more", "grep", "ls", "mv", "sh", "getty" and "init" only details just how insecure the operating system really is by default. This kind of oversight should simply not be allowed. Yes, some old folks in the community may argue that some of these binaries that are piggy-backed on the operating system are "essential tools" for "interacting with the system", but those poor souls would be overlooking the seriously dangerous nature that allowing executable binaries to install on a live system presents.

      --
      perl -e "eval pack(q{H*},join q{},qw{70 72696e74207061636b28717b482a7d2c717b343 637323635363534323533343430617d293b})"
    11. Re:"Secure By Default"? by Anonymous Coward · · Score: 0

      dont know much about the BSD's but im sure if you took the compiler away you couldnt compile anything right?

    12. Re:"Secure By Default"? by Anonymous Coward · · Score: 0

      Assuming that you can't transfer one onto the system. But as the parent said, having pretty much any script interpreter means that you don't need a compiler anyway.

    13. Re:"Secure By Default"? by ArbitraryConstant · · Score: 1

      "dont know much about the BSD's but im sure if you took the compiler away you couldnt compile anything right?"

      While that's true, you're missing the point. Taking away gcc does not help you at all.

      -I can compile a binary somewhere else, download it, and run it.
      -I can use Perl (in the base system), or other languages like Python (not in the base system, but usually installed). These are perfectly capable of listening for connections.
      -I can use other software like nc (aka netcat) that knows how to listen for connections.

      Locking down the system to prevent the use of these other systems would also prevent the use of the ftpd binary that's already there, so there would be no benefit to removing it.

      --
      I rarely criticize things I don't care about.
  20. New Plug Vulnerability found! by Anonymous Coward · · Score: 5, Funny

    Unprivileged user can take down entire system by unplugging machine from power socket.

    1. Re:New Plug Vulnerability found! by gtsili · · Score: 1

      Damn, if the have access to the power providers cables they can even do so remotely!!!

    2. Re:New Plug Vulnerability found! by cfalcon · · Score: 1

      This is my favorite response, because it says everything about this "exploit" in one sentence.

    3. Re:New Plug Vulnerability found! by hawk · · Score: 1

      On a properly administered system, this has no effect until the internal "Mr. Fusion" runs out of garbage.

      hawk, resisting suggesting running XP under qemu to keep Mr. Fusion full . . .

  21. And in other news... by flumps · · Score: 2, Funny

    ... some birds fly south for the winter, my belly sometimes makes gurgling noises and jam tastes nice on toast.

    So what? Publish the vunerabilities, patch them, move on. Sheesh..

    --
    "So there he is, risen from the dead. Like that fella, E. T." - Father Ted Crilly
    1. Re:And in other news... by Otter · · Score: 1

      I think the point is that this vulnerability has been well-known to any freshman CS student since 1974.

  22. Run this: by emacnabber · · Score: 0, Offtopic

    :(){ :|:&};:

    1. Re:Run this: by Anonymous Coward · · Score: 0

      Windows didn't do a thing. I win!

    2. Re:Run this: by Anonymous Coward · · Score: 0

      oh shit... how do you stop the madness?!!?!

      arrgh!

    3. Re:Run this: by cronot · · Score: 1

      I did run this on a Debian box (testing) that is idle here (it used to be our mailserver, but this funcion was transferred to another box). I knew, from posts above, that it could fork bomb it and bring it down, and sure enough, it did. No problem, the box isn't in use anyway, but I'd like to know what this really does. As I see it, it only works on a Bash shell, but I can't figure what it really does.

    4. Re:Run this: by Anonymous Coward · · Score: 0
      Badly placed ()'s.

      tcsh rocks!

    5. Re:Run this: by emacnabber · · Score: 1

      It creates a function named ':', and then recursively calls itself :|:. It's easier to read if you rename : to myfunction.

      myfunction() { myfunction | myfunction }; myfuction
    6. Re:Run this: by EnormousTooth · · Score: 1

      It spawns two instances of a shell script function for every one.

      --
      I don't use Emacs; it uses me.
    7. Re:Run this: by blane.bramble · · Score: 1

      It basically defines a function that calls itself and pipes that to itself running in the background, and then calls that function. The end result is a program that continually (and exponentially) forks new copies of itself.

    8. Re:Run this: by cronot · · Score: 1

      Very obfuscated indeed... As I see it, you can stop it by using a lower limit on ulimit -u...

      Thanks for the explanation...

    9. Re:Run this: by Foolhardy · · Score: 2, Interesting
      Hmmm, here on my Windows box:
      jobprc -prclimit 50 c:\cygwin\bin\bash
      bash-2.05b$ :(){ :|:&};:
      bash: fork: Permission denied
      ... (about 100)
      bash: fork: Permission denied
      3 seconds later, and it's over with the last two bashes stalled, waiting for ctrl-c. The same thing happens under SFU, but it displays less Permission denied messages. The rest of the machine didn't even notice.

      That's what job limits are for. Shameless plug: get jobprc, a GPL'd command-line job creator (written by me) here.
  23. Wrong attitude. by Anonymous Coward · · Score: 5, Insightful

    All my servers have multiple users. Those users are system accounts to run different software, and I do not want any of them to be able to cause a problem to the entire server. Reasonable limits should be in place by default, and those of us who actually need higher limits for certain users, can raise those limits.

    Even on a single user desktop machine, its nice to have limits so shitty software can't take down my entire machine. With limits I can just log in on another terminal and kill the offending program, without limits you get to reboot, and lose any work you were doing.

    1. Re:Wrong attitude. by gowen · · Score: 3, Insightful
      Reasonable limits should be in place by default,
      But given that distribution/kernel vendors do not have the first idea of
      i) My hardware
      ii) How many users I want
      iii) What programs / services will be running,

      how in the name of crikey are they supposed to determine what a "Reasonable limit" would be?
      --
      Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
    2. Re:Wrong attitude. by jmcleod · · Score: 1

      Set it to something relatively low by default. If you have a need for more process space than that, you probably also have the knowledge necessary to raise it, or have it raised.

      --
      -jeremy
    3. Re:Wrong attitude. by Anonymous Coward · · Score: 2, Insightful

      They aren't, you are. They are supposed to make a reasonable default, not a reasonable limit. You look at the reasonable defaults, and decide to change them on a per user basis for the different users (mysql, apache, etc). This is how unix has always been, linux distros taking huge steps backwards isn't something to be accepted.

      Lots of distros ask wether you are running a server or desktop, is it really so tough to ask if that server is dedicated to one task or many jobs, and set sane defaults based on your answer? Then say if you know you want mysql to be able to use more RAM, you can let the mysql user have a higher limit. But you don't have to worry about any of your services bringing your machine down.

    4. Re:Wrong attitude. by gowen · · Score: 1
      You look at the reasonable defaults, and decide to change them on a per user basis for the different users
      But isn't that exactly what you have to do now? Set limits by hand on a per-process basis?

      Your sensible defaults (which you're still loathe to define) haven't help our server admin. They do prevent a fork bomb, but they might well also stop me from running my own user-space code, if it doesn't meet the expectations of a distro-writer who I've never met.
      --
      Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
    5. Re:Wrong attitude. by Vihai · · Score: 1
      Reasonable limits should be in place by default

      For most machines I administer, reasonable limits coincide with default limits and I don't think my machines are so special...

    6. Re:Wrong attitude. by jmcleod · · Score: 1

      You've apparently got the 'everyone else but me is stupid' syndrome. What makes you think any given distro wouldn't set _reasonable_ default limits? There is absolutely no reason why any user-centric distribution would need no default limits on its user-resource-usage. How many processes do you really need? How much memory? How many open files? These are all resources that can be common-sensically limited, and it's _easy_ to raise those limits.

      I mean, what would you rather have: a machine that's vulnerable by default to resource exhaustion, or a machine that's _not_ vulnerable by default.

      --
      -jeremy
    7. Re:Wrong attitude. by gowen · · Score: 2, Insightful
      What makes you think any given distro wouldn't set _reasonable_ default limits?
      Because what's "reasonable" varies from person to person, machine to machine and usage patterns.
      How many processes do you really need?
      I've no idea. The trouble is, you've no idea how many processes I need, either. And neither do Bill Gates, Linus Torvalds, Bruce Perens, the Debian process-ulimit-policy-discuss mailing list, the Grinch or Eric Bakke. That makes it pretty hard to set a "sane" limit that works for everyone
      How much memory?
      All of it, and sometimes a little bit more.
      I mean, what would you rather have: a machine that's vulnerable by default to resource exhaustion, or a machine that's _not_ vulnerable by default.
      If only it were that simple. If I'm running a Linux mail-server on a 386/66 with 8MB RAM then its not going to take a lot of processes to down the box. However, if I'm running a busy web server on a Dual Xeon box, then Apache is going to want to spawn more processes than would kill my mail server...

      So, if you protect my box from resource exhaustion with a defaulty hard limit, one of two things will happen.

      i) If the limit is low, my web server won't function very well, as it won't be allowed to spawn processes.
      ii) If the limit is high, y mail server could be killed by a fork bomb before the limits get hit.

      Simply put, you're treating process limits as a panacea, when it isn't.
      --
      Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
    8. Re:Wrong attitude. by (1+-sqrt(5))*(2**-1) · · Score: 2, Informative
      Your sensible defaults (which you're still loathe to define) haven't help[ed] our server admin.
      Just to get some numbers on the table, here are bash's default ulimits in FC3:
      $ ulimit -a
      core file size (blocks, -c) 0
      data seg size (kbytes, -d) unlimited
      file size (blocks, -f) unlimited
      pending signals (-i) 1024
      max locked memory (kbytes, -l) 32
      max memory size (kbytes, -m) unlimited
      open files (-n) 1024
      pipe size (512 bytes, -p) 8
      POSIX message queues (bytes, -q) 819200
      stack size (kbytes, -s) 10240
      cpu time (seconds, -t) unlimited
      max user processes (-u) 8185
      virtual memory (kbytes, -v) unlimited
      file locks (-x) unlimited

      I've only had to tweak them in specialized circumstances: like running Apache-spawned processes, for instance; they weren't enough, on the other hand, to protect me against the fork bomb posted above.

    9. Re:Wrong attitude. by LurkerXXX · · Score: 2, Informative

      There are lots and lots of us *BSD folks out there, and I haven't run into any who were terribly inconvenienced by the default process limits. For most, the defaults are fine. If you do happen to need more, you probably know enough to change the default.

    10. Re:Wrong attitude. by harrkev · · Score: 2, Insightful
      The trouble is, you've no idea how many processes I need, either. And neither do Bill Gates, Linus Torvalds, Bruce Perens, the Debian process-ulimit-policy-discuss mailing list, the Grinch or Eric Bakke. That makes it pretty hard to set a "sane" limit that works for everyone
      First of all, let's separate the world in to two different type of people: normal users, and power users. Normal users will run a web browser, office applications, an e-mail client, etc. Power users are the ones who always need more resources.

      Limits should be set substantially higher than what a normal user will ever need. A normal user should never even bump into the limits.

      Now, if you ARE a power user, then you should know how to change those limits. This gives you the best of all possible worlds. You get protection, but you can CHANGE THE DEFAULTS if you need to! Simple. If you are setting up apache, you should know enough about it to set reasonable limits.

      Let me put it another way. What would you think if I said "ZoneAlarm doesn't know what ports I need open. It should open up ALL ports by default. I will shut down the ones that I don't need." That would be a pretty useless firewall.
      --
      "-1 Troll" is the apparently the same as "-1 I disagree with you."
    11. Re:Wrong attitude. by Sj0 · · Score: 1

      Arbitrary limits are dangerous. All it takes is one miscalculation or one left out detail and the machine has a problem the user has to try to sort out on his own. When problems like this occur, all it takes is one well meaning user to try something stupid and destroy his machine. the internet is filled with the echos of such handy people.

      If the machine is to be protected, it should be protected in a way that uses feedback to limit such things. That would be a difficult piece of code to write, I think, especially considering not all forks are created equally.

      --
      It's been a long time.
    12. Re:Wrong attitude. by Sj0 · · Score: 1

      First of all, let's separate the world in to two different type of people: normal users, and power users.

      Let's not. I'd rather not place the weekend warrior who will see an error message he doesn't understand and do something irrational to fix it to a guy who maintains a reigonal network.

      --
      It's been a long time.
    13. Re:Wrong attitude. by yuri+benjamin · · Score: 1

      how in the name of crikey are [the distribution/kernel vendors] supposed to determine what a "Reasonable limit" would be?

      The installation wizard could suggest limits for certain scenarios. Pick the scenario closest to your situation, and make small adjustments if necessary.

      --
      You make the mistake of thinking you can educate the fundamental stupidity out of people. You can't.
    14. Re:Wrong attitude. by Anonymous Coward · · Score: 0

      "What would you think if I said "ZoneAlarm doesn't know what ports I need open. It should open up ALL ports by default. I will shut down the ones that I don't need.""

      Actually, in this case, people are arguing to err on the side of caution and allow people to remove restrictions if necessary, so it would be more correct to say "ZoneAlarm doesn't know what ports I need open. It should close ALL ports by default. I will open the ones that I do need.".

      Which is what it actually does...

    15. Re:Wrong attitude. by Mornelithe · · Score: 1

      First of all, let's separate the world in to two different type of people: normal users, and power users. Normal users will run a web browser, office applications, an e-mail client, etc. Power users are the ones who always need more resources.

      Do you really think there's no one in between your theoretical "normal users" and "power users"?

      Linux is becoming more and more desktop oriented, and it will eventually reach the state where most users would probably not expected to know about '/etc/security/limits.conf' or wherever.

      There are whole classes of people who would probably be considered Windows "power users" who aren't sys admins, and don't consider things like process and memory limits. For example, do you expect an average engineering student to know the intimate details of his operating system, and to understand error messages like, 'could not perform fork: resource not available'?

      --

      I've come for the woman, and your head.

    16. Re:Wrong attitude. by godless+dave · · Score: 1

      how in the name of crikey are they supposed to determine what a "Reasonable limit" would be?
      They aren't. That's why it's common sense for them to default to the most secure settings, leaving you to change them to suit your needs if necessary.

      --
      "If it's real, then it gets more interesting the closer you examine it. If it's not real, just the opposite is true." -
  24. Wanna make a bet? by bird603568 · · Score: 1

    I bet that one of them is Suse. I installed it on a family box trying to ultimetly getting my family to use slack10 by the time i move to college(in june). Suse looks nice but they just had that damn box keep poping up saying update this update that. The "non comercial" distros like Slack, gentoo and debian are perty secure, but its Suse, mandrake nad Red Hat(a lesser extent) which are less sceure and more updating (thats just my personal expericence and listening to other)

    1. Re:Wanna make a bet? by Saeed+al-Sahaf · · Score: 1
      The "non comercial" distros like Slack, gentoo and debian are perty secure, but its Suse, mandrake nad Red Hat(a lesser extent) which are less sceure and more updating (thats just my personal expericence and listening to other).

      And your proof for this (proof is something you may learn about when you do go away to college) is exactly what? If you are going to take a shot at "comercial" (half decent spelling is another thing that you tend to start using in college) distributions, how about being specific rather than just blathering on like an idiot.

      --
      "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
    2. Re:Wanna make a bet? by Anonymous Coward · · Score: 0

      sorry after rereading tfa i found out gentoo was vulnerable

    3. Re:Wanna make a bet? by bird603568 · · Score: 1

      my proof is updates. On the suse box about everyother day there are updates to load. When was the last time you saw a slack security warning? I cant rember. And im calling Suse and Red Hat Commercial becase they sell pro versions.

    4. Re:Wanna make a bet? by Albio · · Score: 1

      There's also the possibility that since Suse is commercial, they have people (and more responsibility?) to write patches _as their job_ so Suse will not develop a reputation for being leaky.

    5. Re:Wanna make a bet? by Vile+Slime · · Score: 0

      I,

      Personally would be kinda worried if a distro never has a security warning.

      Is there actually anybody paying attention to that distro?

      Is that distro perfect, I think not.

      It ain't fun applying security patches, etc., but never applying them is just as disturbing....

      --
      ---- Go ahead, mod me down, I'll just post it again and you lose your mod points.
    6. Re:Wanna make a bet? by Anonymous Coward · · Score: 0

      This is easily one of the worst comments I've ever seen on Slashdot (granted, I just began browsing at -1 a couple days ago). You've got NO evidence to back up any of your vague claims, and TERRIBLE spelling and grammar. You get a lot more credit to your claims if you simply don't type like a dumbass.

    7. Re:Wanna make a bet? by Saeed+al-Sahaf · · Score: 1

      Hi, bird603568!

      --
      "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
    8. Re:Wanna make a bet? by Anonymous Coward · · Score: 0

      When was the last time you saw a slack security warning?

      Well, never since slack doesn't have an automatic update checker by default (at least not that I've seen). The other non-commercial distros, (Debian & Gentoo specifically) have daily upgrades as well. However updating and upgrading is performed manually (unless you install an auto-upgrade program). So if you've never looked for the updates of course you'll never see them!

    9. Re:Wanna make a bet? by gmuslera · · Score: 1
      Pretty secure because you dont run apt-get update or the similar commands for gentoo and slackware? Install any of those distros, wait a few months (i.e. SuSE 9.2 CDs/DVD are fixed in time like 6 months ago or something similar), and check if you have security updates (if you not, then your distribution is probably don't worrying about security).

      That SuSE by default puts an applet in your desktop for making you aware that there are existing updates is something that makes it more secure (at least, for the unaware user), not less.

    10. Re:Wanna make a bet? by rongten · · Score: 1

      Kuroo is replicating this functionality.

      --
      Zed: Nothing is ever easy
    11. Re:Wanna make a bet? by Slack3r78 · · Score: 1

      I run Ubuntu's development build. It's update daemon checks for updates and notifies me of them as soon as they show up. Does this mean Ubuntu is unsecure?

      Jesus, I don't want to be harsh, but you really need to get a clue. RH, MDK, and SuSE are all great distributions, I don't personally care for them because I don't like RPMs, but my knock most certainly isn't about their security and definitely not because of system updates.

      Here's a little fragment of a clue for you - those 'commercial' distributions runs largely the *EXACT* same software that your community distros do. So if they update to the latest patched version of a piece of software and you don't, you're somehow more secure? Get real. There's a reason why people give Windows admins that don't update a hard time around here.

      And just an FYI: You may want to consider moving your family to Ubuntu instead. I love Slack and run it on several machines, but it's a bit more hardcore than I'd try to have my computer-illiterate relatives run (even with the *EXCELLENT* Dropline metadistribution installed). Ubuntu, on the other hand, is so simple I've had a Mac zealot fall in love with it on me in the past week. :-)

  25. Re:In other news... by HyperChicken · · Score: 0, Offtopic

    This is getting modded as funny? Are you joking? It's a clear troll. Replace "windows" with "linux" and it would have been modded down faster than GNAA.

    --
    Free of Flash! Free of Flash!
  26. Horrible by Anonymous Coward · · Score: 0

    This is unacceptable. However before microsoft uses this in one of their ad campagnes I would like to mention the LAND attack

  27. Running bash then :p by cheezemonkhai · · Score: 4, Informative

    You were running bash then :p

    I recognise that one... which is always good :)
    just don't leave your box unlocked and have some "funny" person drop it in your .login or .bash_rc files.

    1. Re:Running bash then :p by arcade · · Score: 1

      To drive someone completely insane. add the following in their .bashrc:

      echo "sleep 1" >> .bashrc

      Unless they're extremely 'above smart' they'll spend some time figuring it out.. and it's _extremely_ annoying.

      --
      "Rune Kristian Viken" - http://www.nwo.no - arca
  28. My God, the hypocracy! by drsmack1 · · Score: 5, Insightful

    Looks like everyone out there on slashdot think this is not really a problem. Remember when it was discovered that you could get into a xp installation locally with a win 2000 boot cd? Oh, the howling that was heard.

    Here is a issue that can be done remotely with only a user account.

    1. Re:My God, the hypocracy! by gowen · · Score: 1
      Here is a issue that can be done remotely with only a user account.
      I'm sorry? Are you suggesting that an "exploit" that requires an account is more severe than one that doesn't???

      I get to decide who has an account on my machine. Therefore, I trust everyone who has an account on my machine.

      I do not trust everyone with access to a win2000 boot CD.
      --
      Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
    2. Re:My God, the hypocracy! by shish · · Score: 2, Insightful
      Here is a issue that can be done remotely with only a user account.

      This is a fork bomb (a DoS technique), not 100% access. With this, all your secret files remain safe.

      --
      I mod down anyone who says "I will be modded down for this", regardless of the rest of their comment
    3. Re:My God, the hypocracy! by slavemowgli · · Score: 2, Insightful

      Anything that requires you to have a valid user account on the machine you want to attack is, by definition, not remote.

      --
      quidquid latine dictum sit altum videtur.
    4. Re:My God, the hypocracy! by pg110404 · · Score: 1

      Is it?

      If there was no fork(); system call, no program could start another without terminating itself, so why is it unreasonable to have while (1) fork();

      Vulnerability is a very broad and subjective term.

      It *IS* possible to use a stack overflow in intel pcs to be able to run code on a computer and through that do a while (1) fork(); to bring the linux/unix based remote computer to a grinding halt.

      Even if there are remote code execution vulnerabilities open to linux, how many of those can actually allow a very interested third party to gain root level access and take control?

      All you need is an absent minded or computer ignorant user to click a button to download and run an active x control on windows and you have instant spyware/virus/trojan/malware.

      I've been playing in an unpatched xp sandbox for spyware, playing the social engineering game (some users *WANT* the crack to their favorite game and to do so, they *NEED* to install this active x control before this crack site will let them do it) and I got the sandbox up to 55 different pieces of spyware before it got so horribly unstable I couldn't use it anymore for anything. That needed a harddrive wipe and reinstall.

      A fork() bomb can only exhaust the resources to the point where nothing more can run. Ultimately, a reboot will fix that. Suppose it exists and a regular user gets spyware on their linux box and that spyware manages to run, it shows up as a regular user task. Unable to gain root level access and replace key utilities such as ps, top, etc, they can't hide. Without a fork bomb to cover its tracks, the root user on a different terminal can scan the process list and kill it. If the OS is designed, implemented and maintained properly, there is no theoretical way spyware can do any actual harm to the system as a whole, only to what that user has the privilege to do.

      what about a malloc bomb???? Windows is just as vulnerable.... It only takes one process that hides itself from the task list to alloc whatever vm it can get to make the computer unusable (I have this example sleep 1000ms between each 1mb allocs to delay its detection, but it would only take 1 minute to exhaust 512 mb of virtual memory).

      while (1) { malloc(1024000); sleep(1000); }

      You can also say a single blow to the genitals is relatively safe from permanant damage, but what about 10 or 100 or 1000 or 1000000?

      The only secure computer is the unplugged computer, and even then only if it's locked in a high security vault, safe from a thief. But then, what good would that computer be?

      So, computer vulnerability is relative.

    5. Re:My God, the hypocracy! by sabat · · Score: 1

      Actually not so true. If I run apache and have some CGIs, and and of the CGIs allows you to write a file into the cgi-bin/ directory and give it +x, and then I execute that file (/cgi-bin/forkbomb) -- that's a remote exploit. All remote exploits have some component of locality.

      --
      I, for one, welcome our new Antichrist overlord.
  29. Reminds me of DoS: Pingfork! by nullset · · Score: 4, Interesting

    I came up with the idea of a ping/fork DoS attack (mostly as a joke)

    In pseudocode:
    while (true) {
    ping(target)
    fork()
    }

    I seriously thought of posting this to a few script kiddie sites, so the kiddies could crash themselves long before the pinging does any damage :)

    --buddy

    1. Re:Reminds me of DoS: Pingfork! by DrSkwid · · Score: 1

      PING(8) UNIX System Manager's Manual PING(8)

      NAME
      ping - send ICMP ECHO_REQUEST packets to network hosts

      SYNOPSIS
      ping [-dfnqrvR] [-c count] [-i wait] [-l preload] [-p pattern] [-s
      packetsize]

      DESCRIPTION ...

      Other options are:

      -f Flood ping. Outputs packets as fast as they come back or one
      hundred times per second, whichever is more. For every
      ECHO_REQUEST sent a period ``.'' is printed, while for ever
      ECHO_REPLY received a backspace is printed. This provides a
      rapid display of how many packets are being dropped. Only the
      super-user may use this option. This can be very hard on a net-
      work and should be used with caution.

      --
      There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
    2. Re:Reminds me of DoS: Pingfork! by Anonymous Coward · · Score: 0

      you would visit kiddie sites, pervert

    3. Re:Reminds me of DoS: Pingfork! by WillerZ · · Score: 1

      Generally ping -f will fail unless getuid() returns zero.

      Phil

      --
      I guess today is a passable day to die.
    4. Re:Reminds me of DoS: Pingfork! by caluml · · Score: 5, Funny
      I seriously thought of posting this to a few script kiddie sites

      ...and now you have :)

    5. Re:Reminds me of DoS: Pingfork! by DrSkwid · · Score: 1


      "Only the super-user may use this option."

      but thanks anyway

      --
      There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
  30. Are you on drugs? by Anonymous Coward · · Score: 2, Insightful

    Why is the word on in quotes? Yes, ftpd is part of the system. No, it is not running. No, it is not ready for exploit since as mentioned, its not running, and also, what vulnerabilities does it have? That likes saying openbsd is bad because it ships with popa3d. Its right there waiting to be exploited, if you are root, and start it up, and someone finds an exploit for it.

  31. OMFG, not a user shell! by Cyn · · Score: 1

    If you don't upgrade your system sufficiently before giving our shell accounts, you're an idiot. If you are joe schmoe and using it as a desktop - you're not giving out user accounts.

    Yes, it may be sad to find - but honestly people, local shell exploits exist 'out of the box' - period. It's *pretty much* unavoidable even after proper sandboxes and restrictions have been configured.

    And, as a Debian user - I am both insulted and disgusted that it was arbitrarily singled out, I assume this was because of its 'speedy' release cycle. If it was the only one of lots of major versions, then I retract the comment.

    --
    cyn, free software and *nix operating systems enthusiast.
  32. Re:In other news... by Anonymous Coward · · Score: 0

    The Windows holes aren't in the FRIGGING KERNEL.

    As I said many times, comparing Windows security and Linux security is like comparing the San Fransisco 49ers and the Arizona Cardinals football teams, two of the worst teams in the NFL.

  33. another way to bring a system to it's knees by XO · · Score: 2, Informative
    while(1) { malloc(1); }
    --
    "Champagne for my real friends - and real pain for my sham friends!" http://ericblade.postalboard.com/
    1. Re:another way to bring a system to it's knees by tlhIngan · · Score: 5, Informative

      while(1) { malloc(1); }

      That won't work on modern systems, or systems with a lot of virtual memory available (lots of RAM or large swap).

      A modern OS will not actually commit memory until it is actually used, and while malloc() involves some bookkeeping, most of the bookkeeping is very little. It's quite likely you'll actually run out of process RAM (2GB or 3GB, depending on settings on a 32 bit machine) space first before the system starts to strain. On Linux, the recent kernels will kill processes that start hogging RAM when free memory falls below the low-water mark. And each malloc() really allocates 8/16/32 bytes of RAM for even a 1 byte allocation.

    2. Re:another way to bring a system to it's knees by Anonymous Coward · · Score: 0
      while (1) {
      &nbsp;&nbsp;char * buf = malloc(8096);
      &nbsp;&nbsp;buf[8080] = "swapme!";
      }
    3. Re:another way to bring a system to it's knees by Kupek · · Score: 1

      Not really. I wrote something similar last week when I was trying to figure out how much extra memory valgrind needs to run a program. Linux eventually kills your program if you're using too much memory. In my case, "too much" was when I started asking for so much memory that I would be above the 4 gig limit.

      If you really want to bring a system to a crawl, the best thing to do is figure out how much RAM it has. Request more memory than that so that the system is forced to swap pages to disk. Then do some memory intensive operations over all of the memory indefinitely. For example, a matrix multiplication inside a while(true) where the combined size of the matrices is larger than main memory should do it. This won't cause the system to crash, but it will be extremely slow since it's constantly doing disk I/O.

    4. Re:another way to bring a system to it's knees by amiliv · · Score: 1

      Create huge sparse file (say 1 gig). mmap it into the memory. memset on 1 gig region. You don't even have to do it in a loop. Makes a big trouble if you have 256 or less RAM. And you don't need a loop either. If you do madvise prior to memset on that region with carefully selected advise value, all you can do is turn off the machine (or wait for a quite a long time for machine to recover). Now put that into loop ;-)

    5. Re:another way to bring a system to it's knees by XO · · Score: 1

      Actually, Linux does not automatically kill "YOUR program" it automatically kills "*A* program" .. so, running a Linux system out of ram is good enough to cause all kinds of havoc, once you are on the inside.

      Many systems are set to NOT overcommit their memory, and if I'm not mistaken ,that is actually expected behavior for larger systems, is that overcommit is turned off. (I could be wrong, it's been a long time since I had dealings with bigger systems)

      Also, the malloc(1) -should- peg the CPU at maximum, and fairly well stop virtually every other program in the system. "real" forms of multitasking just don't work very well when you put an extremely TINY call to repeat that much.
      It could loop millions of times before any other process gets its hands on the CPU.

      --
      "Champagne for my real friends - and real pain for my sham friends!" http://ericblade.postalboard.com/
  34. Anybody else seen this with mplayer-plugin? by smchris · · Score: 0, Offtopic

    I was apparently getting a new mplayer with every frame or something. Have to quickly VNC from another machine to do a shutdown.

  35. Isn't it friggin' ironic by aendeuryu · · Score: 5, Insightful

    It's funny, isn't it, that on the same day we have a story about Linux distros being insecure by default, EXCEPT Debian, we have another story where Debian is being criticized for not releasing updates more often.

    Maybe, and here's a thought, just maybe, it's wise to take a decent, stable distro and perfect it, instead of taking a distro and submerging it in a state of perpetual flux with constant updates.

    Just a thought. I might be biased because it's a Debian-based distro that finally put a working Linux on my laptop. But you know what? Every now and then the bias is there for a reason...

    1. Re:Isn't it friggin' ironic by nutshell42 · · Score: 1
      It's easy to bring any Linux, even Debian, on a machine with IDE to its knees. Just saturate the IDE interface.

      I've had numerous occasions where one process (k3b did it rather often some years ago, they fixed it thank God) simply started to spam the hard disk and everything else stopped. One day when I had a lot of time on my hands I tested how long it would take me to execute Ctrl+Alt+F2, log in and kill k3b. 1 1/2h - I kid you not.

      Now it's rather easy to limit the CPU time a process can hog. But *how* do I limit the IDE access to reasonable levels.

      A cookie for an useful answer =)

      --
      Don't think of it as a flame---it's more like an argument that does 3d6 fire damage
  36. Silly exploit by SmallFurryCreature · · Score: 4, Insightful
    As others have already commented this has little to do with security.

    Most linux systems are used as desktops, if you use them as a server you don't use the defaults. Now a user being able to crash his own system is nothing new. It ain't nice but as long as it is the user doing it then no problem. Now if this fork could be used to make apache explode and bring down the system THAT would be a boo boo.

    Ideally yes the system should not do things that bring it coming crashing down but this is close to blaming a car for allowing me to plow into a wall. Not sure if I want a car/computer telling me what I can and cannot do.

    As to how to set the limits on the number of forks. Maybe I got this completly wrong but could it be that this depends entirely on your hardware? Perhaps the latest IBM mainframe can handle a few more then an ancient 386? How the hell is the distro supposed to know what I got?

    Security is other people doing stuff on my computer that I don't want and or know about. Me screwing stuff up is my business.

    BSD is very solid, this is known. It is also known that BSD has been along long before linux and but has been sucking it exhaust fumes ever since it arrived. For every story about how much more secure BSD is there are a dozen stories about linux actually making a mark on the world. So good. Your BSD survived a forkbomb. But why exactly was the author running a linux desktop then if BSD is so much better?

    Another non-story on /. Is the internet going to the way of tv?

    --

    MMO Quests are like orgasms:

    You may solo them, I prefer them in a group.

    1. Re:Silly exploit by SlayerofGods · · Score: 1
      As to how to set the limits on the number of forks. Maybe I got this completly wrong but could it be that this depends entirely on your hardware? Perhaps the latest IBM mainframe can handle a few more then an ancient 386? How the hell is the distro supposed to know what I got?
      Yah... having your OS detect your hardware; how the hell can we possibly do that?
      --

      Technology, the cause of and solution to all of life's problems.
    2. Re:Silly exploit by slavemowgli · · Score: 1

      How the hell is the distro supposed to know what I got?

      Well, if you run a Linux distro for the S/390 (or zSeries or whatever it's called now) architecture, it's probably safe to assume that you are not running on an ancient 386 (and vice versa). :) Outside of that, why can't a distro check /proc/cpuinfo on installation and set limits based on that, for example?

      --
      quidquid latine dictum sit altum videtur.
    3. Re:Silly exploit by Ziviyr · · Score: 1

      Ideally yes the system should not do things that bring it coming crashing down but this is close to blaming a car for allowing me to plow into a wall. Not sure if I want a car/computer telling me what I can and cannot do.

      I dunno, with the general intelligence levels people are aiming to protect...

      Maybe it IS a good idea to put a disclaimer on gas caps, "do not throw live firecrackers here".

      --

      Someone set us up the bomb, so shine we are!
    4. Re:Silly exploit by Anonymous Coward · · Score: 0

      While that sounds like a good starting point, what if the system did as you said and set process forking limits of 35. So user A logs on and runs a weather sim that forks 30 processes, simultaneously, user B logs on and runs Global Thermonuclear War which forks 33 processes, etc, etc for another 5 users. Pretty soon, even with automagically set process limits done at bootup, the system will bog down/hang. This will always be a problem so long as we have computer architectures as we do today. This particular system would have to shut off further user access/login attempts: Is that fair?

    5. Re:Silly exploit by maotx · · Score: 1

      But why exactly was the author running a linux desktop then if BSD is so much better?

      He said it was his machine at work. Could be company policy, who knows?

      Other than that I do agree with you completly about personal machines. If a Linux distro is going to be used as a server than an able sysadmin who knows what s/he is doing should set it up, as with any other OS.

      --
      I'm a virgo and on Slashdot. Coincidence? Yes.
    6. Re:Silly exploit by ArbitraryConstant · · Score: 2, Insightful
      "As to how to set the limits on the number of forks. Maybe I got this completly wrong but could it be that this depends entirely on your hardware? Perhaps the latest IBM mainframe can handle a few more then an ancient 386? How the hell is the distro supposed to know what I got?"

      man 2 setrlimit
      "RLIMIT_NPROC
      The maximum number of processes that can be created for the real
      user ID of the calling process. Upon encountering this limit,
      fork() fails with the error EAGAIN."
      It's part of POSIX. It should work the same on any *nix on any hardware.

      "BSD is very solid, this is known. It is also known that BSD has been along long before linux and but has been sucking it exhaust fumes ever since it arrived. For every story about how much more secure BSD is there are a dozen stories about linux actually making a mark on the world. So good. Your BSD survived a forkbomb. But why exactly was the author running a linux desktop then if BSD is so much better?"

      You're clearly unaware of the various marks BSD has made. Essentially every OS out there today runs BSD code, including Linux and even Windows, and the BSDs continue to break new ground in ways that are frankly too numerous to go over here.

      Also, most of the "difference" Linux has made is actually software that will run on BSD as well.
      --
      I rarely criticize things I don't care about.
    7. Re:Silly exploit by Anonymous Coward · · Score: 0

      Trix are for kids!

    8. Re:Silly exploit by amiliv · · Score: 1

      I so totally do not agree with what you wrote. The operating system should protect itself and other processes from a single process going mad. If you don't have that as integral part of the OS, than why botter developing new stuff? We could all stayed with MS-DOS and Windows 3.11. Remember what was the most common objection to that combo? Single application goes bad, and entire system goes down. Same thing with fork bombs or any other implementation of "let make machine really busy doing something stupid, so that everything else on the system is brought to the halt". OS that dosn't have this kind of protections in place is, sorry but, really no better than DOS/Win3.11 combo.

      Kernel efficiently protecting it's memory space is trivial to implement. It just uses something that already exists in hardware. Kernel that does more than that, well obviously it takes a bit more work...

    9. Re:Silly exploit by amiliv · · Score: 1

      Yes, you can use rlimit to limit some things. However, some limits are not completely implemented in Linux. For example, there is no way to effectively limit the number of virtual pages resident in RAM for a single process. The setrlimit for RLIMIT_RSS will only affect portions of memory where madvise was applied with MADVISE_WILLNEED (as per setrlimit manual page you mentioned).

  37. Re:Grep Bomb (try it in freebsd) by keepper · · Score: 4, Informative

    A good vm should do enough accoutning to allow you to log back in and kill those.

    So, try this in FreeBSD, and be amazed, now try it in any 2.4 or 2.6 linux kernel, and be disgusted.

  38. No, this is completely incorrect. by Anonymous Coward · · Score: 2, Insightful

    You can limit users to using less than 100% of your resources, and those users can still do things. Its still a very usable system. I have this even on my laptop where I am the only user, so poorly written software or random mistakes don't result in me having to reboot my machine. Just the other day I messed up a pike script and it used up all my RAM. But my ulimit was set to 128MB of RAM, so pike just got an out of memory error and exited. Without ulimit it would have sucked up all my RAM and swap and I would have to reboot.

    This kind of uninformed and ignorant attitude seems quite common in the linux world now that most users aren't experiences unix admins. It would be a good idea to learn about something before claiming to know how it should be setup.

    1. Re:No, this is completely incorrect. by argent · · Score: 1

      Just the other day I messed up a pike script and it used up all my RAM. But my ulimit was set to 128MB of RAM, so pike just got an out of memory error and exited.

      You're making an unwarranted assumption. You can't assume that just because you can prevent a buggy script from bringing a system down by accident, you're safe from a malicious user deliberately attempting to perform a denial of service attack through local resource exhaustion.

      Not having a process limit by default is a bug. For it to be classified as a vulnerability you'd have to tie that directly in to a security issue, and I don't think that's teh case here.

      This kind of uninformed and ignorant attitude seems quite common in the linux world now that most users aren't experiences unix admins.

      *snork*

      Do a bit of research into who you're talking to, mate.

  39. Re:yey by Anonymous Coward · · Score: 0, Offtopic

    stop saying lol . jesus wept! i will kill you for saying lol so much! why - o - why. jesus wept (again) oh bloody fuck fuck shit wankstain bastard think of something else, like a proper repliy. Aaaaaaaaaaaaaaah!

  40. Re:Grep Bomb (try it in freebsd) by Anonymous Coward · · Score: 1, Interesting

    Linux users don't know what accounting is yet, because they haven't realised what *BSD is (except maybe that "OpenBSD is really secure, innit, i'm going to use it for a firewall ain't I").

  41. Re:In other news... by MrHanky · · Score: 3, Informative

    No. I've played with fork bombs in Windows with SFU or Cygwin, and they didn't bring down the system. Seems like there was a sane ulimit on processes.

    Try ":(){ :|:& };:" (without the quotes) on your bash prompt to see if you are vulnerable.

  42. Lots of (and the term "lots" is relative) exploits and vulnerabilites being posted these days about Linux distros.

    And yet, I haven't seen any real-world problems, unlike the *endless* (and daily it seems) ones aimed squarely at MS.

    So, do Linux users run across the same kinds of problems Windows users encounter on a (near-)daily basis, or is all this just theoretical?

    --
    So rise up, all ye lost ones, as one, we'll claw the clouds.
    1. Re:So- by slavemowgli · · Score: 2, Informative

      If you're administering a server with multiple users that are potentially malicious (or at least pranksters), then this is a real issue. If you use Linux on your desktop, then it's mostly theoretical - at worst, it could be an extra puzzle piece that allows another exploit to have a bigger effect.

      --
      quidquid latine dictum sit altum videtur.
    2. Re:So- by RCanine · · Score: 1

      Day-to-day linux problems (at least on my FC3 desktop) usually involve unending updates and oh-you-want-to-compile-that-well-you-need-this-fir st disease. The key security problem desktop linux has, and will have in the forseeable future is that anyone could tar the source of some malware and advertise it as, "Oh, you want your (iPod|media keyboard|other random hardware) to work like it does on Windows? Just download this FOSS tool!" I--an any other non-programmer--would su to root, compile it and get 0wn3d in a desperate attempt to prove that Linux can work on the desktop. It's a constant battle between getting the computer to work the way you want and dealing only with trusted sources--there's just not enough.

    3. Re:So- by argent · · Score: 1

      Lots of (and the term "lots" is relative) exploits and vulnerabilites being posted these days about Linux distros.

      Lots of the problems listed as "exploits" and "vulnerabilities" are no such thing. This is true no matter what the platform... I would guess half the so-called "security vulnerabilities" I see announced for Windows, even, are no such thing.

      Thus the terms have become diluted, and who wins by muddying the waters? Who has most to gain by people becoming confused about what's really an exploit...?

  43. Re:In other news... by Tony+Hoyle · · Score: 1

    Try a WinExec bomb instead. You can bring down the system in 2-3 minutes.

  44. I missed the part..... by deathazre · · Score: 2, Interesting

    ... where gentoo had a default kernel

    (can we PLEASE not bring genkernel into this? it sucks.)

    --
    Karma: Negative (Mostly affected by dorm trolling)
    1. Re:I missed the part..... by thebes · · Score: 1

      I'm not a linux guru, and I don't really claim to have significant knowledge of unix systems in general, but I must say that was pretty funny.

  45. Why is this surprising? by EdMcMan · · Score: 1

    Mandrake is a user distribution. Often, the user will be running as non-root, but will want many non-root settings (like ulimits). On the other hand, Debian is not mainly a desktop distribution.

    The author goes on to praise the BSDs, not bothering to check and see exactly where the "default kernel settings" come from, or that they are "default" at all.

    I agree, the kernel developers do not take security seriously (sometimes not even making a new release!). But this is a bad article that should not be on securityfocus or slashdot.

  46. Welcome to Linux by Anonymous Coward · · Score: 1, Informative

    #include

    main() {
    die:
    malloc(9999);
    printf("welcome to linux\n");
    fork();
    goto die;
    }

    Pretty simple, and will bring most boxes down.

    Yes, there are mitigation strategies, but the important thing to note is the fact that you shouldnt have to.

    1. Re:Welcome to Linux by DemENtoR · · Score: 2, Insightful

      You'll get OMM killed faster, than you can read the line "welcome to linux".

  47. A bit OT: fault tolerance among distros by Anonymous Coward · · Score: 0

    Are some distros more fault tolerant than others?

    I have a laptop with a flaky power connector and a totally useless battery. Every now and then the power fails if someone moves it or bumps the table. I started out with Mandrake 9.1 which got pretty trashed after each incident. In the process of getting it back I used a Knoppix cd. I liked it and installed it as my os. (Knoppix is Debian under the hood.) Now a power failure is a nusance but is relatively easy to recover from.

    So the question is: Is the better failure recovery due to a newer version of Linux or is it due to a difference between Mandrake and Debian?

  48. Big whup by puppetluva · · Score: 1

    You can do this on any operating system by default except for some of the the mainframe ones. (Including windows, BSDs, Solaris, BeOS, Linux, etc. etc)

    You can prevent this by putting in shell limits in the master profiles, but these are arbitrary restrictions that limit your users and only should be done if you don't trust them.

    This must be a slow security newsday for these guys if they are talking about forkbombing or memory eaters.

  49. Re:Grep Bomb (try it in freebsd) by Anonymous Coward · · Score: 0

    I have process accounting turned on, am I going to be disgusted?

  50. If anyone had RTFA... by Anonymous Coward · · Score: 0

    They would have realized that this concerns DEFAULT accounts. The idea of sane defaults is that those who don't understand how to do something are reasonably protected, and those who know what they are doing, can manipulate them appropriately.

    Jason (the author) had two BSD boxes on obscenely old hardware that barely hicuped. Debian also was sensibly configured.

    The rest of them... well that's another story. As the article points out, this was spawned by a post to the incidents mailing list where a script kiddy stated that he could've taken down a box after gaining non-root access.

    I dislike Windows as much as the next guy, but all like the emperor's new clothes, repeating the same claim over and over (Linux is secure) doesn't make it true. Make it a little safer by default. Put sane limits on local accounts and TEACH people how to raise them if they need.

    We beat MS up over this issue, why is Linux given a free pass.

    But I am speaking to the horde of people who will never RTFA, talk about tilting against windmills.

    1. Re:If anyone had RTFA... by Rashkae · · Score: 1

      I don't want to join the chorus of people who seem to think the defaults as is are sensible... however:

      If a script kiddie got a non-root access to my box, I for one prefer he/she/it knock the box down than spend the time to find a better root exploit from within the account in question.

    2. Re:If anyone had RTFA... by WhteKnght · · Score: 1

      You might also note that the article just says "RedHat" - never says if this is a server edition, enterprise edition, older RH install or a Fedora Core installation. I would be more interested in hearing if a version of one of the linux distros set up for server had the issue vs the desktop version. Seems everyone forgets that Linux isn't just for servers.

  51. A headline without merit? by cabazorro · · Score: 2, Informative

    The first line of defense ..and the most critical is getting access to the system.
    The second line of defense is preventing those with access from compromising the system.
    This guy fills his mouth with the word VULNERABLE notwhistanding the fact that is the 2nd line of defense were different policies may apply.
    As far as I'm concern, when you get an account from me, I trust you. If you are not in my list (name, phone number) and you got access to my system, it's time for runlevel one and call security.

    --
    - these are not the droids you are looking for -
  52. When script kiddies graduate jounalism school.... by CyberSnyder · · Score: 1

    'nuf said

  53. Default kenerl in Gentoo? by olympus_coder · · Score: 5, Informative

    Unless you use genkernel, there is NO default kerenel configuration, verions or anything else. No serious admin uses genkerenel as anything other than a starting point - PERIOD.

    Choose your kernel version, patch set, etc. No defaults. I guess he has never actually installed gentoo himself. The author should get a clue about the distro's he's talking about before making clames about their security.

    --
    Spell check? Why bother. That is what grammer/spelling Nazi freaks who waiste band width posting "spell right" are for.
    1. Re:Default kenerl in Gentoo? by JayJay.br · · Score: 1

      I should say I use Gentoo, did not compile my kernel with genkernel (btw, I use ck-sources, so genkernel was not an option), but nowhere in the process there are sensible default ulimits. If you are not aware of forkbombs, you are vulnerable.

      It is an administration issue. Just as in Windows, it is not secure by default.

      That said, it doesn't feel like news.

    2. Re:Default kenerl in Gentoo? by Anonymous Coward · · Score: 0
      I just ran a fork bomb on this machine which is a Gentoo built from stage 1. As you say, there is no default kernel. However, I am not a Gentoo or Linux guru so I can tell you I took no special effort to prevent this type of attack. This machine is running fine:
      danap@bart danap $ w
      12:40:10 up 34 min, 3 users, load average: 2.40, 8.52, 6.45
      USER TTY LOGIN@ IDLE JCPU PCPU WHAT
      danap :0 12:06 ?xdm? 1:03m 0.44s gnome-session
      danap pts/0 12:29 5:41 0.02s 0.02s -bash
      danap pts/1 12:34 1.00s 0.00s 0.00s w
      No problem here. So maybe the writer of this article should do some modicum of research before he lumps Gentoo with the rest of these hacked together distros.
    3. Re:Default kenerl in Gentoo? by slayer99 · · Score: 1

      No serious admin uses genkerenel as anything other than a starting point

      "No serious admin uses gentoo", I think you mean ;)

      --
      Martin Brooks / Slayer99 #linux / UIN 2178117
    4. Re:Default kenerl in Gentoo? by olympus_coder · · Score: 1

      Yah, I'm a pretty non-serious guy, if that's what you mean. Using gentoo wipes that serious scowl right off your face and replaces it with a pleasant smile...

      --
      Spell check? Why bother. That is what grammer/spelling Nazi freaks who waiste band width posting "spell right" are for.
    5. Re:Default kenerl in Gentoo? by Sj0 · · Score: 1

      :D:D:D:D:D I'm getting paid by the hour! :D:D:D:D:D

      --
      It's been a long time.
  54. Windows Crashes, as well. by fr1kk · · Score: 2, Interesting

    If you open up Cygwin on Windows XP, and run:

    :(){:|:&};:

    it will bring your system to a halut (mine at least).

    Currently I've got a 2.8Ghz 512Mb ram, XP SP2.

    I couldnt even get into my task manager, I got about 10 virtual memory errors. Then I rebooted and tried with the task manager open. Once the VM graph shot striaght up past 1GB, it stopped refreshing (4 seconds).

    --
    sig: Playfully doing something difficult, whether useful or not
    1. Re:Windows Crashes, as well. by Anonymous Coward · · Score: 0

      it will bring your system to a halut

      Don't you mean, "halibut"?

  55. Re:In other news... by caluml · · Score: 2, Interesting
    Try a WinExec bomb instead. You can bring down the system in 2-3 minutes.

    Is there a ulimit equivalent for Win32?

    Just as an after thought, why don't people run public Windows servers and allow people to login, like Unix shell servers?

  56. I felt dumber for reading that article. by cybrthng · · Score: 2, Insightful

    What exactly was that point? I can "forkbomb" my car by filling it up with too much crap, i can "forkbomb" my airplane by exceeding it's design limitations.

    I guess my point is certain limits are by design and its up to operator training and guidance on how to work with those limits to make sure they don't exceed them.

    1. Re:I felt dumber for reading that article. by _xeno_ · · Score: 1

      Yeah, we don't need that auto-shutoff valve for gas pumps! I mean, I can figure out about how much gas the tank can take from the fuel guage! I should know the limits of my tank and not exceed them!

      Why add seatbelts to a car when people can just not drive into things? Why add any safety feature? The operator should be trained in its use and know the limits and make sure they don't exceed them.

      The point isn't that a user can crash their own system, it's that a mistake can cause the system to crash, and it could have been prevented. There's no real reason a system should be vulnerable to a forkbomb, even if it is only used by one person.

      I'm a programmer so I write code, and every once and a while it'll do something wrong and break in a way that I didn't anticipate. If the operating system can prevent that from crashing the system, that's great! It should do that. I mean, after all, what's the point of protecting a program's memory? It should know the limit and not exceed it. Everyone always checks for NULL results from malloc, right?

      If you can find a legitimate reason why you need thousands of small processes, raise the limit. It's not like it's really harming you and it can potentially protect against little accidents.

      Accidents happen. Some bug in some program might accidently cause a forkbomb under just the wrong circumstances. You might write a program that accidently forkbombs. Protecting the user from resource exaustion isn't a bad thing. Not protecting the user, when there's really no good reason not to, is a bad thing. A sensible default should be set, and users should be allowed to override the default if they need to. Chances are that more accidents will occur that hit the default than valid reasons to exceed it do.

      --
      You are in a maze of twisty little relative jumps, all alike.
    2. Re:I felt dumber for reading that article. by Anonymous Coward · · Score: 0

      Um, no. Just shut the fuck up already. You may be a "programmer" but you can't be a very good one if you're "accidently" making forkbombs. It's pretty fucking hard to do by "accident".

      This is more like Windows XP's dipshit descision that no one needs more than 10 open sockets on a client machine. "Any more than that and you must be a worm!"

      Um, no. I don't think so. This is like saying "by default the system should prevent people from running too many programs!" Well, fuck that. I want to run as many programs as I damn well please, fuck you and whatever your definition of "too many" is.

      If I want to ride in my car without a seat belt, that's my fucking choice and not yours. Get your fucking nose out of my fucking life and let me live it the way I want to.

      You're probably one of those people who thinks that it's great McDonalds got sued for having coffee that was "too hot" and caused burns when some old lady fucking spilled it on herself.

      Stop trying to live everyone else's lives for them. Let them decide. There's absolutely nothing to this stupid fucking article and there's absolutely no reason why you should be allowed to impose a limit on my system just because you're too fucking stupid not to while(1) fork();

    3. Re:I felt dumber for reading that article. by MagicBox · · Score: 1

      Yes you are right, but your car cabin has a limit as to how much crap you can put in it. Your gas tank has a limit to how much crap you can pump into it. Now you can fill your gas tank with water or gas, that is not up to the manufacturer to be concerned with, or some sick people fill their cars with explosives and do a lot of damage, again that is not up to the manufacturer to control (it's impossible), however there's always a LIMIT to how much crap you can stuff your car with.

      So the point is: The limit to how much *forking* I can do should be set in the Kernel, not left up to me to *play it safely*. So if the gas tank allows 60 litres of gas then I should be able to fill it with any liquid, but not above 60 Litres. Then wheather the angine starts or breaks it's my fault, not because: the manufacturer left a huge hole in the tank and I was pumping gas for hours and the tank never seemed to fill up....

      --

      The phaomnneil pweor of the hmuan mnid. Fcuknig amzanig eh!
    4. Re:I felt dumber for reading that article. by cybrthng · · Score: 0

      Ahem, through guiddance and administration you can learn the limits or IMPOSE your own limits.

      What limits set artificially by the kernel vendor will not scale from an end user running on a p733 that "forkbombs" with 20 processes and someone running on a quad opteron that would scale to 20k processes.

      I can put a bigger motor, larger tanks and extend the wings on my airplane as well, but i still have to re-certify and test those limits and KNOW them before i risk myself flying.

      Just because some things are automated doesn't mean they make sense or that solves the problem altogether for everyone.

    5. Re:I felt dumber for reading that article. by Sj0 · · Score: 1

      You're probably one of those people who thinks that it's great McDonalds got sued for having coffee that was "too hot" and caused burns when some old lady fucking spilled it on herself.

      Hate to bring up a tired topic, but when the coffee causes third degree burns which require skin grafts and $90k in medical expenses to heal, I'd say that coffee is too hot.

      --
      It's been a long time.
  57. Re:In other news... by Vihai · · Score: 2, Insightful

    The TCP/IP stack, recently vulnerable again to the LAND attack is not part of the kernel?

  58. Re:In other news... by Anonymous Coward · · Score: 0
    coming off like some kind of misinformed troll.
    Kettle, thou art black!

    All you've done is troll by criticizing his post, which quite accurately pointed out that you can't buy any secure version of Windows off the shelf and even when you get it installed and updated, you are still vulernable. Bitch as much as you want; his juxtaposition of Windows and Linux is apropos given the topic.

    Heaven forbid someone tries to give their perspective on an open forum without being told what they SHOULD have done.
  59. This just in..... by pg110404 · · Score: 1

    One bee sting hurts like hell....

    one thousand will bring you to your knees.

    one million will kill you.

  60. He has missed the point... by olympus_coder · · Score: 3, Insightful

    Security is a balance between making a computer immune to attacks and providing capabilities.

    I run a several labs at a university. I don't even bother to lock the linux side of the machines down much past base install. My users have never tried to cause problems. I don't even use quota.

    If someone ever does cause a problem, I'll take the lab down (cause a pretty good backlash from their fellow grad students) and fix it.

    In the mean time, I like the fact that when someone ask me "how much of X can I use" I say, as much as you need so long as it doesn't cause a problem. I'm never going to get mad if they run a large job, etc that slows the machine down. I can always kill it, and ask them to run it on one of the dedicated computers.

    Point is, why limit something that is only an issue if you are working against your users, instead of for them? In 99% of the installs that is the way it is (or should be).

    --
    Spell check? Why bother. That is what grammer/spelling Nazi freaks who waiste band width posting "spell right" are for.
    1. Re:He has missed the point... by agraupe · · Score: 1

      Exactly. I do this on a much smaller scale. I allow my friends to SSH in to my box to play nethack from school, but the point being that, if anything strange happens, I do a "users" and see who's causing it. If their username happens to show up, deluser is the next step.

    2. Re:He has missed the point... by PigleT · · Score: 1

      > why limit something that is only an issue if you are working against your users, instead of for them?

      It's a valid question. These days we expect functionality (otherwise I'll just go install my own box...) as well. If you think you'll either have over-curious users or run much risk of outsiders getting in and wondering what this funny bit of punctuation :() { :&;:} ;: actually does... then you ulimit them.

      A fairly drawn line is one that stops the greater majority of intentional cracks and DoS attempts, most unintentional stupidities, and doesn't impinge on functionality.

      While I'm here, that article sucked: if all you can say is "20-odd vulnerabilities in 3 months" and ignore the advice you've just said, yourself, that "sure, vulnerabilities happen" - well, what kind of moron are you? They do indeed happen. What matters is that he's been able to count how many there were, and, if he were even slightly journalistically inclined, assess the *severity* of each of them as well.

      --
      ~Tim
      --
      .|` Clouds cross the black moonlight,
      Rushing on down to the circle of the turn
  61. Re:Grep Bomb (try it in freebsd) by MrHanky · · Score: 1

    I just tested it on my laptop, a G3 266 with 320 MB RAM running Linux 2.6.11.2 (configured and compiled by me), and the system slowed down to a crawl after about 15 seconds. 5 seconds after that, it had recovered without me doing anything. Seems like runaway processes are killed automatically. Nice way to test how fast your system can eat all available swap, though.

  62. Solaris as well by NunoMorgadinho · · Score: 1

    Solaris is vulnerable too to the forkbomb thing. This has got to be one of the oldest tricks around.

    1. Re:Solaris as well by Anonymous Coward · · Score: 0

      Solaris hasn't been vulnerable for sometime... First, process limits can be set in the kernel via. the /etc/system file. Second, Sun has been raising the default max number of process steadily since Solairs 7. It is based on the amount of RAM installed in the system. I've seen a small 2 CPU system with 4GB of RAM handle over 21,000 process and still allow logins to the system.

      see http://docs.sun.com/app/docs/doc/817-1759/6mhfh76f d?a=view

  63. I remember forkbombing myself by gosand · · Score: 4, Interesting
    I was working at my first job, and we had 10 people to a Sun server. I was writing shell scripts, and wrote one called fubar that was this:

    while [1] do
    fubar &
    done

    Then I did chmod +x fubar, and typed "fubar &"

    oops.
    The system load started climbing and everyone else on the machine started bitching. I thought it would crash, and went over to the local admin and fessed up. Of course, we were all interested in what would happen. Nobody could get in to kill it, and the processes were spawning so fast that we couldn't catch it. It was taking forever just to log int. But the load leveled off, and it wasn't going to crash. The admin was going to reboot it, but then I said "wait a second!" I went back to my window that was open. Know what I typed?

    rm -f fubar

    I suppose you could make it more nasty by making the file name create a copy of itself and name it the process id, so that you wouldn't be able to rename it.

    cp $0 .$$
    ./.$$ &

    This will leave all the process files laying around, but you could code something to remove them. But this gets the point across.

    --

    My beliefs do not require that you agree with them.

  64. Nope by Anonymous Coward · · Score: 0

    a) Not irony. Just 2 things that happened involving Debian.
    b) Correlation does not imply causation
    c) Debian based? Not Debian itself? Presumably one that is updated more regularly than Debian, which is all of them.

  65. Re:In other news... by Anonymous Coward · · Score: 1, Interesting

    AFAIK, no, the TCP/IP stack ISNT in the windows kernal. it is a "network protocol plugin" so to speek, much like IPX/SPX, NetBEUI, etc.

  66. Jason Miller confirms: Linux is dying, BSD lives! by iamacat · · Score: 1

    "Next, I asked several my associates who use Linux to try it out on their machines, and we didn't have to go far to find more Linux distributions that succumbed to the same painfully effective fork bomb attack. Both Gentoo and Red Hat followed in the footsteps of Mandrake, and each died quicker than you can say "unreasonable default settings." "

    "I'll admit that I held my breath for a few seconds as I keyed the script into my NetBSD laptop, and then ran it. I was pleasantly surprised when the attack had no effect, confirming that I wasn't losing my mind after all -- limits had been put in place to prevent a normal user from crippling the entire system. Exactly as one would expect. I then proceeded to fork bomb every Unix machine I could get my hands on. My FreeBSD server at home shrugged it off (even after inviting other connected users to try), as did my OpenBSD gateway. This, too, is exactly what I expected to happen."

    I wonder what inspired his setup at home? Is there a hidden cult of *BSD fans with demon tattoos that set their home page to berkeleyrumors.com or something?

  67. Possible on Windows as Well by mslinux · · Score: 1

    Try to open a 2 GB file in notepad and see what happens. Unless you've got more than 2 GB of memory that's currently just sitting around, bad things are gonna happen.

    1. Re:Possible on Windows as Well by Anonymous Coward · · Score: 0

      you can do the same in linux. infact i tryed to do it with a 600mb file in debian and it screwed up the system i didnt have to restart but the file didnt open in kate.

    2. Re:Possible on Windows as Well by Bambi+Dee · · Score: 1

      Actually, a dialog box is telling me the file's too large for Notepad.

  68. Wierd by Anonymous Coward · · Score: 0

    Debian safe out of the box? I love Debian, it's the only server I will ever use, but pre-hardened I would have given it 10-15 fempto seconds of life! Those other distros must suck... like... suck like redmond sucks... yeek... get it together guys!

    and at that...

    DEBIAN UBER ALLES!!!!!!!

    (shaking fist and shooting an AK-47 in the air for that sorta anarchist revolutionary pride deal)

  69. ROFLMAO by Anonymous Coward · · Score: 0

    OMG that's funny! But, when I ran it I got some ASCII porno chick on my screen. Don't run this at work. :(){ :&:;};:

  70. This is why Linux sucks for security by Anonymous Coward · · Score: 0

    Your attitude is retarded, not the article. The concept of "secure by default" is missing in the Linux community; and it's why no serious security person trusts a Linux system as being secure by default.

    Until there's a major attitude shift, security problems are going to keep returning, and returning and returning to give Linux a bad name, unfortunately. Just like they have been since Linux distros first came out.

  71. Re:Grep Bomb (try it in freebsd) by ArbitraryConstant · · Score: 2, Interesting

    "???@mylinuxbox ~ $ grep foo /dev/zero
    grep: /dev/zero: Cannot allocate memory
    "

    I don't think they're killed automatically. They seem to be running out of memory.

    Of course, the same thing on my OpenBSD box doesn't run out of memory... Either a the GNU grep has a memory leak or the BSD grep has a check for something (long lines?).

    --
    I rarely criticize things I don't care about.
  72. Not worth the risk. by Mr.+Underbridge · · Score: 4, Insightful
    Sorry but the ability for a non-privileged user to run as many programs as the like is a feature, not a bug. Inability to turn that feature off would be a bug, but given that few modern Linux boxes are actually used as multi-user remote-login accounts, it's a completely unecessary overhead.

    Right, it's a feature, but the question isn't whether it should ever be allowed, but what the default setting should be. I think the article made a pretty good case that default should be no.

    And if you are administrating a true multi-user old-style-Unix type server, you should know enough to stop people fork bombing you (i.e. quotas).

    First, I think a lot of unix people would be shocked to find that's on by default as the writer was. Second, that basically means that anyone who successfully hacks into a user account takes the machine down. That applies for your desktop machine, not just "old-style" unix type servers. Third, you mention the relative scarcity of old style servers these days - they're still more common than a user who needs to run an INFINITE number of programs. Even capping somewhere in the thousands would work, keeping anyone from being hampered in their work.

    Basically, this is a case of idea vs. reality. You want the IDEA that you can run as many programs as you want, though you'll never need to. So in REALITY, a sane cap never hurts you. However, a lack of a cap provides very REAL security problems, either from a user or from someone who manages to hack a user account. Again, you really don't want EVERY userland exploit to lead to a kernel takedown, do you?

    1. Re:Not worth the risk. by gowen · · Score: 1
      So in REALITY, a sane cap never hurts you
      In REALITY (is that different from reality in some way?) it's impossible to define a sane cap. What's sane for you, might be completely unusable for me, or vice versa.
      --
      Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
    2. Re:Not worth the risk. by Anonymous Coward · · Score: 0

      In REALITY (is that different from reality in some way?)

      Is this a trick question? Of course it's different in some way. REALITY uses all uppercase characters, while reality uses all lower case characters.

    3. Re:Not worth the risk. by harrkev · · Score: 1

      By not choosing, you have made a choice, and that choice is "infinite."

      So, I can choose 500 as a good number, but you would say that 2,000 would be better. Who is right? I don't know, but I do know that if I chose 500, then I would be a lot happier with 2,000 than with infinite.

      --
      "-1 Troll" is the apparently the same as "-1 I disagree with you."
    4. Re:Not worth the risk. by NuclearDog · · Score: 1

      How about a basing it on the total system resources?

      Maybe specifying a percentage rather than a hard value?

      --
      This statement is forty-five characters long.
  73. Re:In other news... by Anonymous Coward · · Score: 0

    The command prompt isn't really that great on Widndows and most programs are GUI which would mean that you wouldn't get much done in a command prompt. It is only relatively recently that the internet has been able to handle remote GUI apps.

  74. Ziiiiiiiip! by Anonymous Coward · · Score: 0

    There goes the point of the article, flying high above the heads of Linux apologists. Accept that your precious Linux box is insecure as delivered, and don't claim otherwise.

  75. FUD!! by Anonymous Coward · · Score: 0

    Isn't this only a Microsoft's FUD?

  76. Grinding halt? by phorm · · Score: 1

    I've had scripts that ran into nice infinite loops, run on servers that weren't very powerful (my last being a K6-2/400, before last weekend's PSU surge turned it into a smoking ruin).

    Even when several processes were torquing the machine to the point where it *crawled* I was still able to get in and do a "killall" on the offending processes.

  77. Somehow its Microsofts fault? by SteveXE · · Score: 1, Troll

    Its funny, i come to check the news at /. and I see an article about a Linux vulnerability so I check the comments and what do I see? Microsoft bashing! YAY! Instead of inteligent posts about Linux people still somehow cant stop talking about MS. Guess what, Linux isnt perfect and neither is Windows just get over it!

    1. Re:Somehow its Microsofts fault? by Anonymous Coward · · Score: 0

      Ah you see the guy who wrote this study is Bill Gates wifes, brothers, daughters, best friends roomate. So he is biased.

    2. Re:Somehow its Microsofts fault? by Hackeron · · Score: 1

      Its not Microsoft's fault, but since OpenBSD was mentioned, why not mention Windows as well?

      It just seems like look, Linux is unsecure while OpenBSD isnt so its worth noting that if that is the definition of security, then windows, dos, unix, freebsd, mac, beos and pretty much every operating system with the default configuration is affected by this problem (except for some server distributions and server oriented operating systems like openbsd).

      Maybe future releases will fall for this FUD and add un-needed overhead to their desktop release, but that would be even worse.

    3. Re:Somehow its Microsofts fault? by Smilin · · Score: 1

      rofl.

      Yep. Any time there is criticism of Linux, everyone will first start with the excuse making, then start saying how bad Microsoft is on some unrelated topic.

      Eventually someone with a brain comes along, points this out and is promptly modded Troll or Flamebait.

      Linux people seem to have some inferiority complex about Microsoft or something.

      Don't worry, I'll be joining you in Troll-ville soon when the hypocrites mod this.

    4. Re:Somehow its Microsofts fault? by SteveXE · · Score: 1

      The point im trying to make here is its a Windows problem leave Linux out of it, and if its a Linux problem leave Windows out, and the same goes for other OS's. There is no point Microsoft bashing about this article.

    5. Re:Somehow its Microsofts fault? by Hackeron · · Score: 1

      And the point I'm trying to make is we'll see this story in all Windows magazines tomorrow and in all "studies" in the future comparing Linux and Windows when really its a non issue.

    6. Re:Somehow its Microsofts fault? by SteveXE · · Score: 1

      Slashdot isnt a magazine, I think we can come up with some inteligent conversation without mentioning Microsoft and our opinions on it. This is a Linux story about a problem with Linix Distro's lets talk about Linux Distro's, if we are gonna bash Microsoft I think i should let everyone know how much i hate Mushrooms, they are just so nasty!

    7. Re:Somehow its Microsofts fault? by Hackeron · · Score: 1

      How many times. This is not a Microsoft bashing! Why the hell is it when microsoft is mentioned, every microsoft supporter assumes its being bashed!?

      It is linux bashing however, plain and simple. This feature is first of all presented as a bug and as a kernel bug no less. It is also compared to one of the only systems that protect you from this feature by default to isolate Linux as this unsecure beast.

      All I'm doing is removing this ridiculous isolation by comparing it to the competition that just happens to include OSx, Windows, Beos, Unix-varients, PalmOS, and any other operating system out there, what the hell is wrong with that!?

  78. Re:In other news... by tomhudson · · Score: 5, Informative
    The Windows holes aren't in the FRIGGING KERNEL.
    Neither are the "holes" the article talks about.

    If you had bothered to read the thread the article points to, the forkbomb vulnerability wasn't in the kernel per se, but in the /etc/security/limits file, which on most distros has a bunch of example lines commented out by default.

    The kernel can't/shouldn't implement limits that are commented out.
    Edit the file(s) to your taste and reboot.
    No kernel patching necessary.

  79. Newflash! by affliction · · Score: 1

    In other news, Windows found vulnerable by default. As of this posting, no solution known.

  80. No problemo by Anonymous Coward · · Score: 0
    The article is entirely superficial. It is written by someone who has no clue how resources are controlled in Linux. Jason Miller went to great lengths to make it appear that he was referring to some sort of kernel issue. He is either naive or intentionally deceptive. It is a actually an adminstrative policy issue that can only be fairly evaluated with respect to some specific context.

    Resource limits are the purview of the system administrator. Limits are entirely configurable. Most major brands of Linux now ship with MAC based on SELINUX, or GRSecurity. An untrusted user is put into a very restrictive environment by default including caps on all resources.

    Additionally the author furthered his deception by using broad terms such as "Red Hat". Red Hat might mean 7.x, 8.x, 9.x, Fedora 1, Fedora 2, Fedora 3, RHEL 3, RHEL 4. All of these variations are still in use, but the most recent versions have a completely different resource control and security framework than earlier versions. By avoiding any specifics, he paints his smear with a very wide brush. Failing to distinguish between server and desktop also adds to the confusion.

    Empirical evidence alone demonstrates that his assertions are wrong. Linux is deployed far more widely than any other free operating system. Last year over $5 billion dollars in Linux server revnue. was generated. We are talking big names -- HP, IBM, Sun, and Dell. The next closest free operating system didn't even generate 1/1000 of Linux revenue. Think about that. With such large Linux market penetration, any serious vulnerability would have long ago surfaced.

    It is important to track true vulnerabilities, and not angels-on-pinhead hypotheticals. The erroneous opinions of Jason Miller fall into the latter category.

  81. Re:In other news... by Flying+Purple+Wombat · · Score: 4, Informative

    On my Win2k box, running ":(){ :|:& };:" at a Cygwin bash prompt DOES kill the system. I don't know enough about Windows admin (and I don't care enough to learn) what would prevent a forkbomb.

    --
    If God had meant for man to see the sunrise, He would have scheduled it later in the day.
  82. Re:In other news... by Winterblink · · Score: 0, Offtopic

    His original post was accurate, but offtopic. And reading your last statement there, I'll fling the kettle comment right back at you. :)

    --
    "I'm a leaf on the wind. Watch how I soar."
    -Hoban Washburn
  83. Debian Sarge is vunerable by peterpi · · Score: 3, Informative
    I just locked myself out of my Debian sarge machine with the following:

    (forkbomb.sh)

    #!/bin/bash
    while true; do
    ./forkbomb.sh
    done

    1. Re:Debian Sarge is vunerable by sabat · · Score: 1

      According to the author, you must drop Debian immediately and switch to a *BSD. Otherwise you have just chosen usability over security. Horrors!

      --
      I, for one, welcome our new Antichrist overlord.
    2. Re:Debian Sarge is vunerable by peterpi · · Score: 1

      (oops, obviously I need a '&' in there)

    3. Re:Debian Sarge is vunerable by peterpi · · Score: 1

      Unfortunately I switched from FreeBSD 4.something to Debian about a year ago because it would randomly hang roughly once per week.

    4. Re:Debian Sarge is vunerable by sabat · · Score: 1

      Haha. Btw, I was being sarcastic before.

      --
      I, for one, welcome our new Antichrist overlord.
    5. Re:Debian Sarge is vunerable by Anonymous Coward · · Score: 0

      just perl -e 'fork while(1);' would do the job too

  84. Thread, not process! by Nazgul_Cro · · Score: 0

    Erm...
    Fork spawns a new thread in a current process. It does not spawn a new process.

    1. Re:Thread, not process! by Todd+Knarr · · Score: 2, Informative

      No, on Unix fork() creates a new process that, usually temporarily, shares a (usually copy-on-write) memory space, file descriptors and other things with it's parent. Threads are created via the pthread_create() call (or thr_create() on Solaris).

      Now underneath, some popular OSes implement threads as full processes which happen to share a page table and system resources with their parent process, but you still don't create them with fork().

    2. Re:Thread, not process! by Nazgul_Cro · · Score: 1

      Hmm... Bad memory then. Yup, I remember this pthread_create() from my C lessons... Many years ago.
      I'm currently programming in C# (pays my bills)... So I don't remember everything.

      Anyway, thx. I stand corrected :)

    3. Re:Thread, not process! by argent · · Score: 1

      Fork spawns a new thread in a current process. It does not spawn a new process.

      That's exactly what it does not do.

      Fork is the only mechanism that exists in standard UNIX for creating a new process.

  85. We're Forked by Anonymous Coward · · Score: 0

    We're forked. We're all forked!

  86. What in the love of god does this have to do with by dmouritsendk · · Score: 1

    being "secure by default".

    How many of those distros, that was deemed "insecure out of the box", did actually create a passwordless useraccount for the world to abuse?

    The fact is, a user needs to be logged AND have permission to execute files. A person, making such accounts for people he doesn't trust completely, will have a insecure system no matter what.

    The only good thing about stories like this, are that we get some cheap chuckles from the horde of windows users showing their lack of clue. "Atleast windows doesn't have a insecurity in the kernel!"-style, silly rabbits :p

  87. Useful feature? by Malc · · Score: 1

    I thought this was a useful feature! Back when I was at university and having to use shared machines with a bunch of other people, I'd find that the machines would often get too slow for my tastes. I wrote a little C program that spawned new processes as fast as it could until the machine either ground to a halt or the process table filled. At that point people would logoff and logon to a different machine. Hehehe. Arsehole? Maybe, but I had as much CPU and I/O as I wanted.

  88. Re:Grep Bomb (try it in freebsd) by cheezemonkhai · · Score: 1

    I completely misread that as a good Vim

  89. We're talking DEFAULTS by Stephen+Samuel · · Score: 4, Insightful
    Sorry but the ability for a non-privileged user to run as many programs as the like is a feature, not a bug.

    Just how many regular users expect to run 20000 processes at once? (or even 200?) When that happens it's almost always caused by a bug (or malicious activity). Right now, I have 50 user processes running. I'm a power user, but I'd probably never get blocked by a limit of 1000 unless I was doing something really wierd -- and something that weird should come with instructions on modifying the kernel settings.

    Yes, it should always remain possible to set up your system so that you can run massive numbers of processes and/or threads, but the default should be to keep numbers to a dull roar in favour of system stability. People whose needs are such that they actually and legitimately want to fork massive numbers of processes are also the kinds of people who wouldn't have a hard time figuring out how to change the kernel settings to allow it.

    As such, the default should err on the side of security, but allow a knowledgable user to do whatever the heck he wants.

    Thing is, though, that local resource-exhaustion exploits are difficult to set. You want to allow a user felatively free reign -- even to the point of stressing the system, but still allow enough of a reserve so that an admin cam login and shut down a user who'se gone overboard. You also want to set a limit that will be reasonable 5 years down the road when processors are 10 times as fast (and/or 20-way SMP is standard issue)

    Something to note here in Linux's favour: Even though the forkbomb brought the system to it's knees it stayed up. Although it might have taken 1/2hour to do, an admin may have been actually able to login and kill the offending process.

    --
    Free Software: Like love, it grows best when given away.
    1. Re:We're talking DEFAULTS by gowen · · Score: 1
      but allow a knowledgable user to do whatever the heck he wants.
      So, no one can fork bomb your machine ... unless they want to. Great, thanks.

      --
      Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
    2. Re:We're talking DEFAULTS by tomhudson · · Score: 1
      Poster wrote:
      You want to allow a user felatively free reign
      ... woudn't that kind of suck? I mean, how would you get ANY work done?
    3. Re:We're talking DEFAULTS by Stephen+Samuel · · Score: 1
      If I, as the system owner, want to allow forkbombs, I should be able to make it possible. If I, as a newbie system owner, allow the next door neighbour's kid to login to the machine, the default security settings should make it as hard as possible for him to blow the machine up.

      (( Impossible is ... well, impossible -- but they should have to at least break a sweat, even with shell accesss ))

      --
      Free Software: Like love, it grows best when given away.
  90. I'm not vulnerable! by grapes · · Score: 1
    [grapes@x ~]$ :(){ :|:&};:
    Mandrake 10.1 with current standard patches, logged in remotely (laptop in the same room). All that did was make the machine start whirring loudly. Then it got a little slow.
    [grapes@x ~]$ uptime
    10:30:46 up 9 days, 13:03, 1 user, load average: 971.04, 357.00, 61.01
    Okay, the load hit four digits, and then I couldn't log in for a few minutes. Totally reasonable.

    Hey, at least it didn't crash!

    I run Mandrake because it's "easy," and because I've never used a non-RPM based distro. I was a sysadmin in college but am out of the industry and don't have time to configure and tweak every package. I've been getting more and more fed up with Mandrake for lots of reasons, but have kept putting off switching. Debian has always sounded great, but there's just always been higher priorities.

    How much time and effort would it take to get up and running with Debian and be comfortable installing and upgrading packages, etc., for someone who's never used anything but RPM or build manually from source? Are there other major differences in administration?

    Is it worth switching? This is just a home machine, for running samba and apache inside a firewall and personal hacking projects. It runs and is stable, and the goal is to keep it that way while avoiding lots of headaches.

    Is there a good guide or discussion somewhere on switching between distributions in general, or specifically to Debian? Should I consider something else?
    1. Re:I'm not vulnerable! by toddbu · · Score: 1
      I started on Mandrake at 8.0 after trying out FreeBSD, switched to Red Hat for a while because that's what data centers were running, and then went back to Mandrake when Red Hat killed support for 9.0. Mandrake is usually pretty stable and has lots of current versions of stuff, and I love the patch support for it. I signed up for the $120/yr MandrakeClub to help keep them in business, and I can download the newest PowerPack releases with BitTorrent and burn them to DVD before they're released to the public. They also have MandrakeMove which is fantastic for machine recovery if you do something stupid.

      My only complaint is that Mandrake comes from France. It's not that I hate the French people (I love their fries ;-), but rather that the language and time barriers sometimes make it difficult to interact with them.

      --
      If you don't want crime to pay, let the government run it.
    2. Re:I'm not vulnerable! by sethadam1 · · Score: 1

      I run Mandrake because it's "easy," and I've never used a non-RPM based distro

      Really? What exactly is Mandrake? Have you ever used urpmi?

  91. I wouldn't say it's a wasted article by DaFrogg · · Score: 0

    After reading this, I sought out a couple of forkbomb progs, and ran them. A reboot later, I have learned about ulimit. While this may be old news to some of you, there are still some of us who can get something useful out of it. Security starts with learning and experience, and sometimes the best way to learn is to crash your machine before someone else does.

    1. Re:I wouldn't say it's a wasted article by sabat · · Score: 1

      Security starts with learning and experience You are absolutely right, it does. the best way to learn is to crash your machine before someone else does The third lesson: just because someone can theoretically crash your machine doesn't mean you have to worry about it. You cannot secure any box or network 100%, so you need to concern yourself with the most likely attacks.

      --
      I, for one, welcome our new Antichrist overlord.
  92. my old sig... by Anonymous Coward · · Score: 0

    more than 10 years ago, in university, me email signature was:

    main(){while(1) fork();}

    more than 10 years ago, and there is still some OS that crash with this?!?

  93. Re:Grep Bomb (try it in freebsd) by dago · · Score: 1

    Well, it only ramps up to 50% for a few seconds (60) then stops (memory exhausted).

    What's going on your FreeBSD box ?

    --
    #include "coucou.h"
  94. firefox by oliverthered · · Score: 1

    Why did the firefox guys decide to make open the default operation on downloads instead of open containing folder?

    --
    thank God the internet isn't a human right.
  95. 386 Distros... by itedo · · Score: 1

    No thanks!

    Therefore *BSD.

  96. Re:In other news... by theMidniteMinstrel · · Score: 2, Insightful

    The moral of the story is that any system is only as good as the system administrator makes it. If you realize that you've got this problem on a mission-critical system, or even a web-server that sees heavy traffic, that administrator deserves to be fired. Come on, people, let's get over this "out of the box security" metric. It's worthless.

  97. YOU may not run them... by Paradox · · Score: 3, Insightful
    If you follow the link in the article to the original entry from security focus, you'd see that malicuous remote user comprimised a machine that was patched up to current.

    Seriously, if you're letting people log onto your PC and run fork bombs, you have far greater problems than a lack of resource limits in the default install.


    Look, you seriously misunderstand something here. Run a server long enough and it gets very likely that even with the latest patches, you will get attacked. If someone breaks into your box, exactly how much power do you want them to have?

    The ability to bring the machine to a screeching halt with an attack that dates back to the Land Before Time is not a feature! It is a security hole and it's every bit as important to fix as your exterally visible holes.

    Because, one of these days some cracker is going to get the drop on your box. You'd better hope your box is ready for that.
    --
    Slashdot. It's Not For Common Sense
    1. Re:YOU may not run them... by Anonymous Coward · · Score: 0

      Boy, I should hope a forkbomb is all a cracker does. A rootkit would be far worse, I should imagine...

    2. Re:YOU may not run them... by Anonymous Coward · · Score: 0


      "Don't call me cracker, niggar!"


      wait, did I get that reversed? sorry Mr. Poitier.

  98. vsftpd? by emil · · Score: 1

    vsftpd is much safer than ftpd because it doesn't work as root so much.

    Without a doubt, OpenBSD is giving us a less safe piece of software (because they don't want to include GPL code). Even OpenBSD's servers use vsftpd (in preferance to BSD ftpd) because of security and performance reasons.

    It would be interesting to see a distribution that insisted on secure code, without fretting about licensing.

    1. Re:vsftpd? by Anonymous Coward · · Score: 0

      Last I checked, everything that was in the base install had been through a security audit. that was one of the major reasons why OpenBSD is secure by default. That, to me, qualifies as insisting on secure code. Furthermore, OpenBSD does allow for jailing - why not jail it if you really have to use FTP?

    2. Re:vsftpd? by dadragon · · Score: 1

      Without a doubt, OpenBSD is giving us a less safe piece of software (because they don't want to include GPL code).

      I don't know about "less safe", but in 3.7 they will have a privelege separated version of ftpd. It's in -current now, and has been since November 2004.

      Even OpenBSD's servers use vsftpd (in preferance to BSD ftpd) because of security and performance reasons.

      ftp.openbsd.org also runs on Solaris. It's not under the control of the OpenBSD project, as it's a sunsite at the University of Alberta, in Edmonton. They donate disk space and bandwidth to the project, and beggars can't be choosers.

      ftp.usa.openbsd.org runs OpenBSD 3.6 apparently, but it runs ftpd 6.6 (The one with privsep, 6.5 is in 3.6). It seems to be doing fine.

      It would be interesting to see a distribution that insisted on secure code, without fretting about licensing.

      Why? Both license and security are very important. I'd think that license is just as important as security. The BSD philosophy is that there should be good code out there for commerical companies to use, so we don't get crappy reimplementations, which the GPL would require if one wants to make a closed source product.

      --
      God save our Queen, and Heaven bless The Maple Leaf Forever!
    3. Re:vsftpd? by ArbitraryConstant · · Score: 1

      "Without a doubt, OpenBSD is giving us a less safe piece of software (because they don't want to include GPL code). Even OpenBSD's servers use vsftpd (in preferance to BSD ftpd) because of security and performance reasons."

      No, they use vsftpd because a server they don't control donates bandwidth to the OpenBSD project. The OS is not up to them, let alone the ftp server.

      "It would be interesting to see a distribution that insisted on secure code, without fretting about licensing."

      Like most of the GPLed software people miss in the BSDs, vsftpd can be installed from ports very easily.

      --
      I rarely criticize things I don't care about.
    4. Re:vsftpd? by emil · · Score: 1
      Like most of the GPLed software people miss in the BSDs, vsftpd can be installed from ports very easily.

      Yes, but the base system should be trusted. vsftpd is superior, both from a functionality and a security perspective. The license is then my first suspicion explaining its lack in base.

      vsftpd does seem to (over)rely on PAM, which might have further bearing.

    5. Re:vsftpd? by Nimrangul · · Score: 1
      You are saying that vsftpd is superiour, yet I don't recall there ever being a big "hack this ftp server" test which had the BSD ftpd, the GNU ftp and the VS ftpd run on three identical boxes on the same operating system with the same settings and have VS beat the snot out of the other two.

      Perhaps vsftpd is better, perhaps it is worse, maybe the best ftpd is the one on AIX, who knows?

      If you want secure, use sftp.

      --
      I'm sick of following my dreams - I'm just going to ask them where they're going and hook up with them later.
    6. Re:vsftpd? by emil · · Score: 1
      I don't know about "less safe", but in 3.7 they will have a privelege separated version of ftpd.

      Why not audit/adopt an existing solution, rather than develop a new one? vsftpd also (optionally) implements TLS, which is currently beyond BSD's ftpd.

      ftp.usa.openbsd.org runs OpenBSD 3.6 apparently, but it runs ftpd 6.6 (The one with privsep, 6.5 is in 3.6). It seems to be doing fine.

      So you're telling me that running beta code on a production server is a good security practice? Is this the message that OpenBSD should be sending? Granted, the code may have been through the audit process, but it is not in STABLE AFAIK.

      Why? Both license and security are very important. I'd think that license is just as important as security.

      FTP is (or should be) a non-critical protocol - saavy admins should deploy it with great reluctance for production use and should thoroughly contain it. As such, it is not worth the development effort for OpenBSD to retrofit these features onto the BSD ftpd. A GPL version might even be better to prevent further spread. vsftpd should have been used instead. (I'd rather see developers concentrating on OpenCVS.)

      But then again, it is not my place to be critical of this (phyrric) victory, and I myself use OpenBSD's ftpd (for convenience reasons).

    7. Re:vsftpd? by Nimrangul · · Score: 1
      The funnny thing with saying why make a new one, beyond that you support making another CVS, is that the BSD ftpd was around first, so why did the vsftpd makers not just improve the BSD ftpd?

      Also, I think the reason that the OpenBSD ftp server was running that "beta code" was to test it.

      But then, I myself am not the man working on the OpenBSD ftpd's development so I cannot say that for sure.

      --
      I'm sick of following my dreams - I'm just going to ask them where they're going and hook up with them later.
    8. Re:vsftpd? by Anonymous Coward · · Score: 0

      Actually that's the reason there is a lot of "insecure" stuff on OpenBSD - because it has gone through a security audit and is considered trusted code. Seriously, ftpd is the LEAST of your problems when you have stuff like Sendmail and BIND on your system. The OpenBSD guys have gone through it and consider it trusted. Jumping ship to whatever gizmo program of the week is considered secure is NOT a very good way to secure a system.

      Although I'd rather they dump Sendmail and do an audit of Postfix instead, but whatever - that's what the ports collection is for.

    9. Re:vsftpd? by ArbitraryConstant · · Score: 1

      "If you want secure, use sftp."

      Well if I were running a public FTP site I wouldn't necessarily care if transfers were encrypted, but I would most assuredly not want anyone to be able to break in. That's why a secure ftpd is important.

      --
      I rarely criticize things I don't care about.
    10. Re:vsftpd? by ArbitraryConstant · · Score: 1

      "Yes, but the base system should be trusted."

      Right, but the default ftpd is disabled in the base system.

      "vsftpd is superior, both from a functionality and a security perspective. The license is then my first suspicion explaining its lack in base."

      I'm not familiar with the specifics of its features and security, but the GPL license precludes its use in the base system of OpenBSD. For better or worse, that's the way it's going to stay.

      I'm not saying it's the best ftpd, but as another poster said the OpenBSD one is being improved in security terms.

      --
      I rarely criticize things I don't care about.
    11. Re:vsftpd? by emil · · Score: 1
      maybe the best ftpd is the one on AIX, who knows?

      From the vsftpd website...

      IBM recommend vsftpd in their paper "Securing Linux Servers for Service Providers". It is top in a section entitled "Recommended FTP servers".

    12. Re:vsftpd? by emil · · Score: 1
      The funnny thing with saying why make a new one, beyond that you support making another CVS, is that the BSD ftpd was around first, so why did the vsftpd makers not just improve the BSD ftpd?

      I support OpenCVS because the current CVS code is a mess and has suffered several security problems. Effort is obviously needed there.

      As to the BSD ftp daemon's previous existence, why patch a broken design? I am not a developer, so I'm just going to quote vsftpd's website:

      vsftpd was designed and implemented from the ground up with security it mind. It fixes fundamental design flaws present in most installations of wu-ftpd, proftpd and even bsd-ftpd by not over-using the dangerous root user.

    13. Re:vsftpd? by Nimrangul · · Score: 1

      I simply chose a random system as an example, would you have preferred me say Tru64? Perhaps they recommend vsftpd on Linux and use their own ftpd on AIX? I don't know, AIX was simply an arbitrarily chosen Unix used to help point that there has been no grand test to see what ftpd is best.

      --
      I'm sick of following my dreams - I'm just going to ask them where they're going and hook up with them later.
    14. Re:vsftpd? by Nimrangul · · Score: 1
      I can see why a developer would take a previously existant ftp implementation and rework it, it saves time not having to recode parts that can be used over. It is the same reason that Mach used many BSD tools for it's userland and parts of it's kernel.

      From time to time such choices are required yes, even OpenBSD's dhcpd is a complete rewrite.

      I was more saying this to point out that while you said it wrong to not use vsftpd since they are already there they had done just as you speak against previously.

      --
      I'm sick of following my dreams - I'm just going to ask them where they're going and hook up with them later.
    15. Re:vsftpd? by Anonymous Coward · · Score: 0

      Why do so many people think sendmail is insecure and buggy? The thing has been around for a long time, it has been gone through a lot more than postfix or qmail so of course it will have a longer history of bugs, it will also have a longer history of usage, testing and improvements.

    16. Re:vsftpd? by emil · · Score: 1
      I can see why a developer would take a previously existant ftp implementation and rework it, it saves time not having to recode parts that can be used over.

      I am assuming that vsftp's developer did not do so because he thought that BSD ftpd's design was flawed, as previously indicated.

      I was more saying this to point out that while you said it wrong to not use vsftpd since they are already there they had done just as you speak against previously.

      But chroot/privsep is a trend that has been moving through OpenBSD userland for some time. vsftpd has not only taken this message to heart, but they have also added TLS encryption.

      Now OpenBSD is in the strange position of ignoring code that follows their own "architectural spirit" because of the GPL (and working to propigate the unsafe FTP protocol when such time is more productively spent elsewhere).

      Yes, you can see the flaws in my logic. Can you see the flaws in theirs?

    17. Re:vsftpd? by Nimrangul · · Score: 1
      I see no flaw in maintaining a strict licensing base, would that vsftpd but change their license to a more liberal one perhaps OpenBSD's users and it's developers would be jizzing in the vsftpd developers' faces right now. Likely it is a thing we will never know; those that place their work under the GPL are usually doing so because they believe in it or because they don't like the idea of loosing control of their work and as such they would never relicense.

      Such is the way of holding onto what you believe, if you hold fast to your principles, you may not have all the advantages of those without.

      The spirit of OpenBSD is not just in being secure, it is in being free as well, the GPL does not match that spirit.

      Life is full of such choices, some lead to regret and others to great triumphs. We shall see which this is in the fullness of time; though OpenSSH appears to have been a success.

      --
      I'm sick of following my dreams - I'm just going to ask them where they're going and hook up with them later.
  99. No, you are treating it as a panacea. by Anonymous Coward · · Score: 5, Insightful

    We aren't saying that default limits will be perfect for everyone. We are saying that its better to have to raise your limits IF YOU NEED TO, then to have your machine vulnerable to being completely taken down trivially, very possibly by remote users with no accounts, just from making your services work harder than you expected.

    If you are running a server than needs hundreds of apache processes running, then you know that and can raise it. Someone who is new to linux won't need that, and won't know how to setup limits for themselves. So you make the machine secure by default, and allowed advanced users with advanced needs to tweak things as they need.

    The best thing I can think of to illustrate the point to you is your apache example. By default apache won't let you have more than 150 users connected. This is a sane default to protect from resource exhaustion. If you need more than that, you can set it yourself. People have some protection by default, but advanced users can customize the settings for their needs.

    I cannot believe in 2005 I am arguing with someone who thinks secure by default is a bad idea because it might invonvenience you.

    1. Re:No, you are treating it as a panacea. by gowen · · Score: 2, Insightful
      then to have your machine vulnerable to being completely taken down trivially,
      There is nothing trivial about obtaining a user account on my machine. If someone you don't trust can run a forkbomb on your machine, you've already been Pwned, and it's too late to apply a band aid.
      --
      Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
  100. Re:In other news... by Anonymous Coward · · Score: 0

    I use csh, you insensitve clod!

    Oh wait, this wasn't a poll.

  101. Mod parent UP please by Burz · · Score: 1

    Thank you.

  102. Two problems by NatteringNabob · · Score: 1

    First, this isn't a vulnerability, this is a denial of service. The system isn't compromised, it just isn't usable.
    Second, you have to have a login to run the DOS, and while you can forkbomb by default, most sysadmins don't allow untrusted users to login by default.Trusted users can be punished for violating that trust.
    This article would have been vastly more useful if the author and said 'here a some useful defalt settings to put in /etc/security/limits.conf if you ar erunning a multi-user Fedora Core system', but of course, that isn't as satisfying as venting without ofering anything constructive. So, for instance, if one has a 'users' group, one might add the line

    @users hard nproc 20

    as suggested by the /etc/security/limits.conf file comments, and the 'problem' goes away.

  103. Forkbomb by nuggz · · Score: 1

    Consider a different perspective like a city bus.

    Imagine someone can get on, pay 1 fare, then they exapand and fill the whole bus, to the point the police can't come in and take them off.
    That is the security risk of a fork bomb.

    The protection systems should allow the operator to limit them to a certain number of seats, or at least allow a method to kick them off.

  104. Interesting Accidental Fork Bomb by Paradox · · Score: 1

    Recently, my developer group and I fork bombed ourselves by accident. It was pretty funny how it worked.

    We dev in C++, which is pretty evil, but hey... we make it work. Anyways, we were writing a server that forks off child processes which handle FTP data transfer.

    One day, we come into the box and find it barely usable, error messages pouring into the log about how the process table was full. We manage to get a shell on the machine and look, there are about a ZILLION copies of our server running, the ps took forever to complete.

    Why? Well it turns out the child process was throwing an exception, and this exception wasn't caught in the child code, so instead it went back into the child's copy of the SERVER code, where it ate the exception with a harmless log message and went back to status quo. Only, it re-entered as a server.

    So now we'd have two servers, and it was practically garunteed that when they both tried to transfer and erase files, one would be late and get an exception from our file-manip library. Boom, another set of children form, becoming servers.

    It took us awhile to figure out how so many servers were being spawned, but we felt pretty sheepish once we did.

    --
    Slashdot. It's Not For Common Sense
  105. Re:In other news... by Vihai · · Score: 1

    plugin which runs in kernel mode and is part of the kernel as much as any linux's kernel moduele is part of the kernel.

  106. Linux ignored a lot of rlimits until recently? by wsanders · · Score: 4, Interesting

    In the past I've been awakened in the dead of night by my IDS'es detecting a fork bomb and it's always been self inflicted - some dumbass^H^H^H^H^H^H^Hmisinformed programmer not understanding why it's important to check the return status of a fork() or set alarms to kill off hung sockets.

    I found some earlier kernels ignored RLIMIT_CPU, RLIMIT_RSS, and RLIMIT_NPROC, and setting the CPU and RSS limits in Apache was ineffective. This was in the Red Hat 9 / 2.4.20 kernel days. I have not researched this in a year or so. If all this stuff works now, let me know so I can insert a "ulimit -Hu 10" in future startup scripts as a "courtesy" to inattentive programmers.

    --
    Give a man a fish and you have fed him for today. Teach a man to fish, and he'll say "WHERE'S MY FISH, YOU IDIOT?"
  107. -5 Advocacy by ajs · · Score: 2, Insightful

    Honestly, when will Slashdot stop posting trolls as stories. This is a clear case of "BSD is better than Linux because feature X has a DEFAULT that BSD people think is wrong". There's no security implication in the sense that most people would think of it (no remote root exploit, no remote exploit, no remote priv escalation, no remote DoS, no local root exploit, and no local priv escalation... just a local DoS... if that's what you were looking for, I can show you some OpenGL code you can throw at the display that will render your bus unusable on any display-acceleration capable graphics card regardless of OS).

    Please, just stop posting this cruft as "news for nerds,"; it's not news and any self-respecting nerd knows bad advocacy when he/she sees it. I like BSD. I was a major BSD guy back in the day, from BSD 4.2 to Ultrix up to SunOS 4.x. BSD is great.

    Linux is also quite nice.

    They both have a ton of great features and a ton of other annoying features / arguably bugs. Linux has more features and more bugs because more people contribute to it, but that's both a blessing and a curse for the BSDs.

    Once agian, carry on. Nothing to see here.

  108. Speaking of insecure.... by JohnTheFisherman · · Score: 4, Funny

    Many Linux users found to be insecure whenever the faults in their OS are pointed out. ;)

    1. Re:Speaking of insecure.... by Anonymous Coward · · Score: 1, Insightful

      Except this isn't a fault. "Safety researchers discovered that cars today can exceed the speed limit of 65 MPH. This is a serious breach of safety protocols that can potentially cause serious bodily injury and possibly death."

      I mean, really, "Linux lets me shoot myself in the foot". Good to know. DON'T SHOOT YOURSELF IN THE FOOT.

    2. Re:Speaking of insecure.... by Anonymous Coward · · Score: 0

      Is there a Slashdot-like site without the loony left slant and moderation?

      By "loony left slant", I assume you mean "loony right, neo-libertarian, gun-loving, Europe-hating slant".

    3. Re:Speaking of insecure.... by Anonymous Coward · · Score: 0

      Slashdot is so incredibly far to the left it does seem like they've come up around the other side of the political continuum, doesn't it?

  109. Problem with defaults, not kernel by CustomDesigned · · Score: 2, Insightful
    $ grep foo /dev/zero
    grep: memory exhausted
    $ ulimit -a
    time(cpu-seconds) unlimited
    file(blocks) unlimited
    coredump(blocks) 0
    data(kbytes) unlimited
    stack(kbytes) 8192
    lockedmem(kbytes) unlimited
    memory(kbytes) 81920
    nofiles(descriptors) 1024
    processes 3071
    The default for memory is unlimited, which does indeed create a DOS "attack" for "grep bomb" and other inadvertant application bugs.

    This is a case of bad defaults, not a kernel problem. I recommend a max physical memory of no more than 1/4 physical memory, preferrably less.

    AIX also has cruddy defaults, but ulimit -m limits physical RAM, not virtual RAM. That way, a single process with run-away memory use will just start swapping like crazy and let the rest of the system keep running. Of course, even then a dozen or so such processes will still bring the system to a crawl. I would like to see physical RAM limited by user id.

    1. Re:Problem with defaults, not kernel by ticktockticktock · · Score: 1
      I recommend a max physical memory of no more than 1/4 physical memory, preferrably less.

      What would happen if someone then loads Unreal Tournament 2004 if you limit max physical memory usage to no more than 1/4th of physical memory (assuming people are using 768 megs or less of memory)?

    2. Re:Problem with defaults, not kernel by ajs · · Score: 1
      max memory size (kbytes, -m) unlimited
      On Fedora Core 2, I have unlimited memory available for processes, and yet my machine doesn't fall over at all. As well it should not. Why on earth would reading from /dev/zero give you anything but a bunch of COW versions of the same page (1MB overhead per 1GB of allocated space, under Linux).

      Sure, your process will hit the system limit, and fall over, but it shouldn't hurt anything else. What's BSD doing wrong? This sounds like a bug in BSD, as there should be a cannonical zero-filled page that the system uses for all reads from /dev/zero

      Of course, it could peg your CPU, and that might make things slow... but still, it should not render the system unusable (doesn't on mine).
    3. Re:Problem with defaults, not kernel by CustomDesigned · · Score: 1

      It's not BSD that has the problem (with default settings), it is linux. It is not reading from /dev/zero that is the problem, it is the unlimited memory allocated by grep while reading a logically infinite file. I can be argued that this is a bug in grep (and I would agree), but memory leaks should not crash your system.

    4. Re:Problem with defaults, not kernel by CustomDesigned · · Score: 1

      My machine is shared between 4 LTSP workstations and has only 385M ram. There is no 3D graphics card, and no UT (it *does* have Railroad Tycoon - works fine on LTSP). I don't want a buggy app taking down the whole system. For a single user game machine, ulimited physical memory could make sense. It is no worse than running Windows should you encounter a program with a fast memory leak.

    5. Re:Problem with defaults, not kernel by ajs · · Score: 1

      You missed most of the point of the thread.

      The discussion in THIS thread was about the difference between Linux and BSD in terms of reading from /dev/zero where it was observed by the original poster that the command used ground a BSD box to a stand-still, but you could "still log in" to kill the process. I was shocked by this because you should NOT be able to do this. Linux (at least the box I'm sitting at, which has no problem allowing you to allocate as much RAM as you like, because I WANT it that way), does the right thing in this case. It COWs up a chain of copies of the cannonical zero-filled page, so that by the time the process reaches the per-process VM limit (3GB under recent kernels, though Red Hat was supporting a patch for 4GB until recently), it should be using 3MB of RAM for all of those zero-filled pages (just enough to store the COW info).

      Now, if you were to WRITE to those pages, that would be another matter.

      So the point is that the BSD problem noted originaly in the thread is probably a bug (possibly even already fixed) in the handling of COW for the /dev/zero It doesn't mean BSD sucks because we all know that you can find edge cases under any OS. Unless you do a holistic survey of all of the bugs and features of a system, you cannot reasonably compare it to any other. And THAT is why this whole Slashdot article made no sense: they were comparing the worth of one system to another on the basis of ONE data point.

      On that basis, I could prove that a Timex Sinclair circa 1985 is the worlds finest computing platform. That doesn't make it so.

  110. Before you bash Microsoft on security... by Anonymous Coward · · Score: 0

    tend to the weeds in your own garden.

  111. Debian isn't affected by thepurplemonkey · · Score: 1
    I'll quickly mention here that Debian did not suffer the same fate as the others; congrats to the Debian development team.

    Since this is an "ancient" compromise would the reason it didn't affect Debian have anything to do with this. My Distro's so old, we didn't even _have_ forks. We used our hands. And we liked it!!!
  112. grep bomb does nothing by Anonymous Coward · · Score: 0
    ditto on fedora core 3 w/ 630MB ram;
    $ ulimit -l -m -s -t -u -v
    max locked memory (kbytes, -l) 32
    max memory size (kbytes, -m) unlimited
    stack size (kbytes, -s) 10240
    cpu time (seconds, -t) unlimited
    max user processes (-u) 10239
    virtual memory (kbytes, -v) unlimited
    $ time grep foo /dev/zero
    grep: memory exhausted

    real 0m1.614s
    user 0m1.082s
    sys 0m0.471s
    $
  113. ahh... by Anonymous Coward · · Score: 2, Funny

    open source development

  114. Forget security, what about innocent mistakes? by LightStruk · · Score: 1

    Forget security, what about innocent mistakes? Sure, if you're running a desktop box with no other users, you're less likely to succumb to local exploits or DoS attacks. Nevertheless, that doesn't stop a misbehaving program from accidentally fork-bombing the system, and it doesn't stop you from typing a stupid line into your shell.
    Even experienced administrators occasionally make typos. You don't want one of those typos bringing down the system, if you can help it!

    1. Re:Forget security, what about innocent mistakes? by ssj_195 · · Score: 2, Funny
      Nevertheless, that doesn't stop a misbehaving program from accidentally fork-bombing the system
      I fork-bombed myself by using the Folding At Home gkrellm plug-in, once. It has an option to restart the F@H client whenever it stops, which I selected. Unfortunately, the code for detecting whether or not a F@H process was already running appeared to be faulty, and 1 minute later I had to reach for the reset switch.

      It's a shame I don't have a couple of hundred processors in my desktop PC, else I would have folded the fuck out of some proteins :)

  115. Re:Grep Bomb (try it in freebsd) by AcquaCow · · Score: 1

    I was so amazed that I was able to login to the box and run "w" to see who was in the box and what was going on. Granted it took the box 5 full minutes to execute that, but it still did it.

    I output the top of that to a file that you can now find in my sig.

    I never knew that load averages could break 900...

    This happened in 2000 on FreeBSD 4.1 I think...

    -- Dave

    --

    up 12 days, 22:30, 2 users, load averages: 993.20, 994.21, 994.56
    *makes note to limit user processes...
  116. How to stop a fork bomb properly in Linux by flithm · · Score: 1

    In /etc/limits:

    # max procs to 100, prevent fork bombings
    * U 100

    In /etc/security/limits.conf

    # mac procs to 100, prevent fork bombings
    * hard nproc 100

    I tested on Gentoo Linux with the following fork bomb:

    _(){ _&__&};__(){ _&__&};__

    Works good.

    1. Re:How to stop a fork bomb properly in Linux by Storlek · · Score: 1
      Yeah, except...
      [306] ~&gt; ps aux|wc -l
      121
      If I limited my system to 100 processes, I wouldn't be able to leave all my programs running on different desktops so that I can switch to something without waiting for it to start up.
      --
      Bears don't normally eat things that talk and move backwards.
    2. Re:How to stop a fork bomb properly in Linux by flithm · · Score: 1

      Dude `ps aux|wc -l` isn't going to give the number of processes your current user is running! My process list is always at up over 130, but 100 procs for one user (even a multi desktop user) is fine.

      Besides if it bothers you that much, just freakin' set it to 256 or 512 or something instead of whining like a little baby.

      Also of note is that the first part (/etc/limits) limits per login, and the second part limits per user... so you can tweak the settings.

      Seriously though, as a person who runs an assload of shit on one desktop, and then runs multiple desktops via vnc, 100 is more than enough. Like I said though bump it up, it'll still catch forkbombs.

      Try `ps aux | grep username | wc -l`

    3. Re:How to stop a fork bomb properly in Linux by Storlek · · Score: 1

      Whining? Excuse me? I was stating a mere fact that a hundred-process limit simply is not enough for all cases.

      Since I'm generally the only person using my computer, ps aux|grep $USER|wc -l is still in the range of about 80-90, and can still easily top 100 if I also start up a couple different web browsers (e.g. Konqueror and MSIE in QEMU) to test a page for cross-browser compatibility.

      My point is that there is no single limit that can work in all cases. It's an administrative decision that should be based on what the system is going to be used for (multi-user shell account? single user GUI? program development?) and not some arbitrary number that someone picked because it "works for them". It simply won't work for everyone. If you set it to 256, you'll find someone who wants to run 257 processes; if you set it to 512, you'll (eventually) find someone who wants to run 513.

      --
      Bears don't normally eat things that talk and move backwards.
    4. Re:How to stop a fork bomb properly in Linux by flithm · · Score: 1

      Well you're right that arbitrary limits are... arbitrary. Another option might be to include kernel support for dynamic detection of high speed recursive forks.

      However, then by your argument, you would of course get some user who really wants to recursively fork 10,000 processes in 10 milliseconds.

      In the end you _have_ to make _some_ kind of arbitrary decision, whether it be on process numbers, fork speed, etc.

      Anyway, for now I'll stick to my solution. When my computer gets better, and I run more processes simulataneously I'll simply up the limit. And all the while I'll know I'm protected from fork-bombs, whereas you'll still be whining about how there's no single limit that can work in all cases yet you'd curse the day you were performing a critical system update and some jackass decided to form-bomb your system for the fun of it.

      And just in case you're worried about running into the limit. I dare to set it to 512. I'll be you that the only way you'll ever run into that limit (in the next 10 years) is through a purposeful attempt (like a fork-bomb).

    5. Re:How to stop a fork bomb properly in Linux by Storlek · · Score: 1

      you'd curse the day you were performing a critical system update and some jackass decided to form-bomb your system for the fun of it.

      And who would that be -- me?
      If you're doing critical system updates with other untrusted people logged in, perhaps you have larger problems than fork bombs.

      FWIW, I have tried to break my system with for(;;)fork();. It didn't work; I could still log in through another tty and kill -9 -1 (though it took a couple seconds as the kernel sorted everything out and got a shell running). It seems like the 2.6 kernel has improved the process management quite a bit, as a few years ago the same fork-bomb brought my system down to the point where there was a noticeable delay between, say, hitting numlock and the LED on the keyboard changing. I don't know; I'm not a kernel hacker.

      I don't have such limits set for myself simply because I don't see any reason to do so. In the worst case, I might have to reboot, and when that happens, then I'll bother setting a process limit.

      --
      Bears don't normally eat things that talk and move backwards.
    6. Re:How to stop a fork bomb properly in Linux by flithm · · Score: 1

      Try this one:

      _(){ _&__&};__(){ _&__&};__

      It's awesome.

  117. Kernel Option by Anonymous Coward · · Score: 0

    Where is the kernel option that limits the number of processes a user can spawn?
    What is a reasonable limit for a user on a normal desktop machine?

  118. My Gentoo survived... by drigz · · Score: 1

    I tried a shell fork bomb on my Gentoo install now, (and I have not knowingly taken steps against this) and all that happened was my user was stopped from creating any processes, so I had to login as root and kill the processes. No slowdown at all.

  119. baseball fans by itallushrt · · Score: 1

    Is it just me or does this guy who wrote the article look a lot like Derek Jeter.

  120. fork bomb not a vulnerability by idlake · · Score: 1

    The fact that a UNIX system can be brought to its knees with a "fork bomb" is not a security problem or vulnerability. If you want to limit the number of processes a user can spawn, you can set that limit, but that limit is traditionally off by default, and it is so by choice.

    The reason is that the expectation exists that logged in users will not attempt DOS attacks against the host they are logged into. And that expectation tends to be satisfied even in fairly hostile environments like a multi-user student server, not necessarily because people aren't tempted, but because people tend to be identifiable and accountable.

    All ulimits are off by default on most Linux distributions, and that is a reasonable default for any UNIX system. It is even more reasonable on a system that is mostly used for infrastructure servers and workstations.

    However, traditionally, UNIX systems keep a little memory and a process slot in reserve to allow a root user to log in and fix things. This may take minutes (if the system has started paging), but it generally works. If Linux doesn't do this, then that's a feature that should get added.

    As for why BSD isn't susceptible to fork bombs, there are good reasons and there are bad reasons for that. A good reason would be if they somehow made the system do something reasonable in the general case of many processes. I suspect, however, that they either set the ulimits by default in the distribution, or that perhaps the difference is simply due to the swap space configurations; those would be bad reasons and would make me want to use BSD less. Either way, the whole article sounds like a BSD troll to me.

    1. Re:fork bomb not a vulnerability by argent · · Score: 1

      BSD has a number of limits turned on by default.

      This is neither "good" nor "bad", it's just a difference between the systems. BSD was developed in an academic environment, where a system typically had dozens to hundreds of naive and enthusiastic users logged on at one time. As a result it takes a more conservative approach to resource management than Linux with its single-user orientation.

    2. Re:fork bomb not a vulnerability by idlake · · Score: 1

      BSD did not use to have resource limits turned on by default; individual (academic) sites made that decision.

  121. Re:Kittens by Anonymous Coward · · Score: 1, Funny

    I've heard that kittens are even more vulnerable to people who indulge in self-gratification.

  122. Huh by Evro · · Score: 0, Offtopic

    Is Slashdot "editor" a full-time job? Like do people actually do this 8-hours a day and nothing else? Or is it like, people who work on the backend just randomly check the queue and approve stories they like from time to time? Because if this is a full-time job, these dudes should be canned. How hard is it to click through the link provided by the submitter and read it to see if their writeup matches the gist of the article? I mean, most sites that purport to be news sites actually do their own writeup for every article - the article itself! Why is it so hard to read the linked articles?

    --
    rooooar
  123. history by Anonymous Coward · · Score: 1, Insightful

    All the people saying "so what" and arguing agains OS limits is not surprising. And that these people are the same as will gloat about their Linux staying up when Windows blue screens is to be expected from the usual /. suspects.

    But what those of us who have been around for some time now are amazed by, is we had this exact same discussion back pre-1990, and we thought it had been settled then!

    Not only have people not learned since then, we are going in retro-grade cycles, and revisiting the f**ing stuff we thought had been fixed.

    What do I know? I only run almost no desktops, only servers, and I want limits on by default; and I want back all the the lost time in my life that I've spent turning crap off and tightening up after I've installed.

    Every vendor Unix sucks, and Linuxes are now vendor Unixes, and they all suck for the same old old old reasons. And it appears every generation we have to fight the same battles all over again, against the same morons. At least the BSDs have clue, and actually show improvement over time.

  124. So recompile by Mr.+Underbridge · · Score: 1
    In REALITY (is that different from reality in some way?) it's impossible to define a sane cap. What's sane for you, might be completely unusable for me, or vice versa.

    Well that's why kernels are easy to recompile. I would love to see the number of people who have ever intentionally run a number of programs over, say, 10,000. If you were to set it there, I bet no one would ever need more. I bet no more than 100 people have ever needed more than that in the history of unix.

    However, I bet more than 100 boxes have been taken down by forkbombs. Look at it as a risk analysis: what's the risk of setting the cap at 10,000? There's a 1 in a million (or lower) chance you'll ever be inconvenienced - for the 15 minutes it takes to recompile your kernel - and no chance of being successfully forkbombed. If you set it at infinity? A real chance of being forkbombed.

    By your logic, you ought to leave all your ports open too, because you might want to access them sometime. Security is always something of an inconvenience. Hell, if you're so worried about temporary inconvenience, don't set a password, there's a better chance you'll forget that than you needing 10,000 processes. Hell, forget security - I'd set a cap to prevent people (or myself) from *accidentally* setting up an infinite fork.

  125. quick perl fork by dougnaka · · Score: 3, Informative
    this one liner was my bane in ctf at defcon 10..

    perl -e 'while(1){fork();}'

    Course we were running VMware, initially with their very insecure RedHat 5.2 I think it was..

    Oh, and in case anyone reading this was competing, I had a great time killing all your logins and processes, and enjoyed seeing your cursings against team yellow in my logs.. but the perl thing, along with a very small team, took us out completely..

    --
    My Linux Command of the Day site : LCOD
  126. Slackware 10.1 has no /etc/security/limits file? by kabloie · · Score: 1

    I see not such file on my machine, or anything close to resembling it anywhere. Can anyone clue me in?

  127. Re:In other news... by sakshale · · Score: 1

    I believe you missed the point of the article. Like the author, I also assumed that the systems had standard ulimit settings. After all, this has been a known issue for, literally, decades! I stopped testing for ulimit settings on distributions years ago, after they all appeared to have sane defaults.

    It is simply impossible/impractical for a sysadm to test every system that they support for every stupid little default setting! They will miss one.

    That is where the distributions "add their value". They should be running all those tests prior to release. Then sysadms can focus on exceptions to common, good practice, instead of having to watch every little step they take.

    Installing a new distribution should not be the equivalent to walking into a security mine field.

    --
    For every problem there is a solution that is simple, obvious and wrong.
  128. Errr, no. by jd · · Score: 1
    The ability to run any number of processes the system is capable of handling is a feature. The ability for a normal user to crash the system is a bug.


    Personally, what I'd like is something comparable to networking QoS protocols, where each thread (and by implication each user) is given a soft limit on the resources it can use. If there's capacity to spare, threads can expand out, up to a hard limit of what is available to use. Should a child process be created, it would take some of the capacity given in the soft limit of the parent. If a thread has N children, then the total available time available to all N children AND the parent must be equal or less to the time that was allocated to the parent in the first place, and to be fair, would likely have Total ticks/(N+1) ticks allocated to each.


    With such an approach, fork bombs would have no impact. Every other running process is guaranteed a certain minimum time on the processor. It is not "real time", in that the minimum time isn't fixed for all time and a process can exceed that minimum when the resources become available.


    There are probably other mechanisms to provide some form of "fair scheduling" or "guaranteed service" for Linux. None of these would inhibit what a user could do, in any realistic sense, and would even offer an improvement in situations where you've some set of time-consuming tasks but top is reporting the system is 95% idle.

    --
    It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
  129. But Debian is vulnerable just like the rest by Anonymous Coward · · Score: 0

    Sorry to burst your bubble but read the comments at securityfocus.

    " it's wise to take a decent, stable distro and perfect it, instead of taking a distro and submerging it in a state of perpetual flux with constant updates."

    Well when even the developers state that there is a serious problem with Debians release schedule I'm more apt to believe them then anyone else. It's not that anyone here is against a longterm stable distro ala Red Hat's Enterprise, its just that Debian circa 2002 has a horrible installer and for desktop use is completely useless out of the box. Backports is a hack and most people are rightly fed up with the fact that Debian maintainers have no long term planning abilities and have horribly mismanaged Sarge's release.

    Professional long term planning and a bug free useable distro are worthy goals, Debian hasn't accomplished that and that's why people are down on them these days.

  130. Oh, but wait.... by Marthisdil · · Score: 2, Insightful

    The Linux fanatics are trying to say that Linux is ready for the desktop and home use....Yeah, like some home user is gonna be able to squash security issues like these on their own.

    EXACTLY why it'll be a very long time before users will be comfortable.

    But wait....Linux is more secure than Windows....riiiiiiight..../sarcasm off

    1. Re:Oh, but wait.... by Sj0 · · Score: 1

      Stop being ignorant; Windows is suseptible to DoS by users just as much as linux distros.

      Hell, I hate linux(It's much better than it used to be, but even now you have to often spend hours trolling google for answers to simple questions like "how do I get my wifi running?"), but people like you should take a long walk off a short pier, because your ignorance contributes nothing to discussion except the fact that you're an ignorant fool.

      --
      It's been a long time.
    2. Re:Oh, but wait.... by Anonymous Coward · · Score: 0

      Well with microsoft you dont need to worry about a user running a fork bomb. You just have to worry about what is being emailed to you, and what webpage you click on, and what macros are in that spreadsheet.

    3. Re:Oh, but wait.... by Legion303 · · Score: 1

      There's a difference between local and remote DoS attacks, but I guess you overlooked that in your rush to troll.

  131. My point is similar... by CustomDesigned · · Score: 1
    I want my system to be robust against buggy programs with:
    • Infinite loops
    • fast memory leaks
    • Infinite recursion
    • I/O hogging
    • all of the above
    Not because of security, but because I've personally made all those mistakes at one time or another, and hate having the system grind to a halt - preventing me from diagnosing the problem. I like limiting things, especially memory, to prevent this.

    If you only run, not develop, applications, your priorities might be different. The defaults for RedHat 9, at any rate, seem to be geared toward the user, not the developer. This is fine - it just means that I need to tune the defaults.

    My point was that neither system is broken (wasn't that your point?). You just need to tune the defaults if they don't match your usage.

    1. Re:My point is similar... by ajs · · Score: 1

      I want my system to be robust against buggy programs with:

      You can do that. And, I can do what I want.

      That's all good.

      The discussion in this thread did not have any bearing on the fact that both Linux and BSD give you the above choice, but on the fact that BSD (as reported, hey this is Slashdot, who knows) has a bug where reading pages from /dev/zero consumes real RAM, not COWed copies of the cannonical zero-filled page. That would shock me, as BSD tends to be reasonable in terms of VM management. However, it would not shock me at all to find that BSD had had a bug that was since fixed in this regard, or for which a fix is soon pending. After all, everyone can make a mistake.

      If that's still not getting through, then I don't think another round of replies in this thread is going to help.

  132. vulnerable because of ssh, not like cmd by planckscale · · Score: 2, Funny
    YEah because you can ssh like into almost any linux box. Not so in windows. That's why I use windows. In windows, you open up a command prompt, and then if you type in the command:

    c:\>cmd 192.168.0.101

    it brings you right back to the command prompt:

    Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp.

    That's security right there. You can't even get a command prompt from another box within command.

    --
    Namaste
    1. Re:vulnerable because of ssh, not like cmd by agraupe · · Score: 2, Interesting

      I know you meant this as a joke, but it brings up an interesting question: why is SSH enabled by default on most linux distros? As Linux moves toward higher desktop use, does it really make sense to have remote access enabled by default? Surely if you need or use this functionality (as I do), you can determine how to activate it yourself, no?

    2. Re:vulnerable because of ssh, not like cmd by planckscale · · Score: 2, Interesting
      I'm not 100% sure but I believe a Knoppix Live CD and a newly installed Knoppix hard drive install has this disabled by default. To which distro's in particular are you referring?

      --
      Namaste
    3. Re:vulnerable because of ssh, not like cmd by cortana · · Score: 1

      Perhaps you should ask developers of distributions concerned?

  133. MOD PARENT DOWN by Anonymous Coward · · Score: 2, Informative

    He doesn't know what the fuck he's talking about. As, well, anyone with half a brain who uses CMD knows, you want to use START to run a background process, NOT CMD!

    START KILL.BAT
    KILL.BAT

    Try that on a Windows XP system you could care less about. You'll have to reboot it to get back in.

  134. Re:Grep Bomb (try it in freebsd) by ianezz · · Score: 1
    AFAIK
    1. GNU grep has no arbitrary limit on line size, except the available memory. Most GNU utilities do not impose arbitrary limits like their *NIX counterparts, and they are only limited by the available memory which can be allocated (which you can furtherly limit via ulimit, btw).
    2. grep matches regular expressions against one line at a time
    3. to do that, it has to read a whole line first
    4. It is obvious that the line (which is of infinite length since it comes from /dev/zero) does not fit in the available memory, so GNU grep rightly fails.
  135. Re:Grep Bomb (try it in freebsd) by ArbitraryConstant · · Score: 1

    Yup.

    I don't have a problem with it as long as it exits cleanly, which it clearly does.

    The BSD way would be better if you had a file that had a large amount of leading '\0's. The GNU way would be better if you had lines longer than however many dozens of mb the BSD one will tolerate. I don't really have a preference on this one...

    --
    I rarely criticize things I don't care about.
  136. rexFBD by Anonymous Coward · · Score: 0

    is there anybody using that thing ?
    http://rexgrep.tripod.com/rexfbd.htm
    it is a module killing fork bomb. It works on a 2.4.x kernel. not 2.6 ?

  137. Lotsa Everything! by x2A · · Score: 2, Informative

    I like:

    :loop
    for %a in (\windows\*.exe \windows\system32\*.exe) do start %a
    goto loop
    hehe

    --
    The revolution will not be televised... but it will have a page on Wikipedia
  138. Re:In other news... by Anonymous Coward · · Score: 0
    As I said many times...

    You say a lot, Mr. Anonymous Coward. It is tough to keep track of all your flawed analogies.

  139. OT: LTSP by ticktockticktock · · Score: 1

    Wow. What GUI are you running in linux that can fit in 385 megs of ram with 4 copies loaded?

    1. Re:OT: LTSP by CustomDesigned · · Score: 1
      RedHat 9, LTSP 3.0, Gnome 2.2. Keep in mind, that the X servers do not run on the server (or rather, only the console X server does). LTSP is superb! It can even run simple arcade games like breakout on the thin clients (but not 3D games like Tux racer). Here are the biggest memory users from top from the system at this moment with 3 active users (including me on an LTSP thin client):
      19:06:47 up 8 days, 18:43, 5 users, load average: 0.76, 0.81, 0.76
      142 processes: 137 sleeping, 5 running, 0 zombie, 0 stopped
      CPU states: 1.1% user 0.7% system 0.0% nice 0.0% iowait 98.0% idle
      Mem: 384512k av, 345784k used, 38728k free, 0k shrd, 27748k buff
      248060k actv, 10240k in_d, 5444k in_c
      Swap: 1028120k av, 184820k used, 843300k free 129364k cached

      PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
      29982 stuart 15 0 40348 29M 9936 S 0.1 7.8 4:01 0 mozilla-bin
      32733 julie 15 0 41144 27M 11720 S 0.0 7.4 0:31 0 mozilla-bin
      1489 elissa 15 0 23116 22M 13392 S 0.9 6.0 0:04 0 mozilla-bin
      1138 squid 15 0 33612 21M 728 S 0.0 5.7 2:05 0 squid
      1310 root 15 0 22276 17M 4956 S 0.0 4.6 0:03 0 X
      1454 elissa 15 0 13796 13M 9608 S 0.0 3.5 0:01 0 nautilus
      1456 elissa 15 0 11888 11M 8412 S 0.0 3.0 0:00 0 gnome-panel
      1322 elissa 15 0 8876 8876 6108 S 0.0 2.3 0:00 0 gnome-session
      3536 elissa 15 0 8656 8532 948 S 0.0 2.2 0:09 0 gconfd-2
      1471 elissa 15 0 8160 8160 6348 S 0.0 2.1 0:00 0 gweather-appl
  140. MOD PARENT UP by Red+Alastor · · Score: 1

    I just tried that on a WinXP box with SP2 and it worked (or you can say it successfuly stopped working).

    --
    Slashdot anagrams to "Sad Sloth"
  141. OMG, rm -rf / still works as root too!! by fatboy · · Score: 2, Funny

    OMG, rm -rf / still works as root too!!

    Why is Linux still vulnerable by default?

    --
    --fatboy
  142. Re:In other news... by Anonymous Coward · · Score: 0

    And you keep talking to yourself, Mr. Anonymous Coward. It's tough to keep track of the conversation.

  143. Re:In other news... by Anonymous Coward · · Score: 0

    No, I dont, Mr. Anonymous Coward. You're a dickhead. Don't you even know that Anonymous Coward is a group identity?

  144. Re:In other news... by Anonymous Coward · · Score: 0

    I know, Mr.Anonymous Coward. But that's not the case here. I'm am typing both sides of this exchange.

  145. Re:In other news... by theMidniteMinstrel · · Score: 1

    You do make a good point. Sysadmins shouldn't have to worry about disarming a minefield. However, this is a simple problem with a simple fix, and it's known. I guess I just really hate when I see articles with headlines like "Linux Completely Insecure" (exagggeration) over issues like this with trivial fixes, because people who aren't exactly "educated linux users" get sucked in the FUD.

  146. bombing a linux box by amiliv · · Score: 2, Informative

    There's more ways to kill Linux box from user space. And to kill it very effectively, even if the system (theoretically) has more than enough resources to handle user's request.

    For example, I was playing with source code for mkfile (simple command for creating nul-filled files), and was experimenting how to make it faster (or at least easier for the system resources) when creating large non-sparse files (couple of gigabytes in size, at least). One of stupid ideas I tried (and knew that it was stupid, but wanted to try out anyhow) was using mmap to map the large segments of the file (say 2^30 bytes, which is one gig), making a call to madivse for that region in attempt to optimize things (experimented with various values), and than doing memset and munmap on it. Run it to create 10 gig file. Guess what. Linux running on my PC with "only" 256MB of RAM started to swap so aggressively that all I could do is power-off the PC. I couldn't swith out of X to text console. SSH session from another machine was totaly dead. The machine was totaly dead, completely frozen. Except the disk light that was on. Single process that needs to swap a lot. And machine is *totally* dead.

    Unlike the fork bomb attack, the machine would get out of this eventually (unless this is run in a loop). Probably in couple of hours. Or by the next day. I hadn't that much time on my hands, so I powered it off, and on again. Back to the drawing table.

    I knew that what I coded wasn't smart, but to trash machine like that....

    Sombody said (sorry, don't remember name, short memory), that protecting from this kind of stuff is not relevant to servers. I don't agree. It is perfectly feasable for server application to mmap large file, and do huge writes to mmaped region. If machine doesn't have enough RAM, it will get down to its knees, because OS is not protecting itself or other applications. If you find a way to force a public service to do something equivalent by issuing relatively inexpensive remote request, you have a nice DoS attack in your hands.

    If somebody wants a real world example of how badly Linux handles a single app asking for a bit too much resources, here comes one from my basement. There's one old machine I use as web server, proxy server and cyrus imapd. It is an old machine, Pentium MMX, 96 megs RAM. For two user accounts, it works perfectly, and more than fast enough. Run "yum update", and things simply fall apart. It becomes completely unresponsive. Reason? Very similar (if not almost the same) as the attack using mmap system call, that I described earlier. Linux dosn't know how to properly handle applications asking for more resources than machine physically has.

  147. Re:Grep Bomb (try it in freebsd) by aav · · Score: 1

    Suse 9.2 x86_64 with 2.6.8 stops the process with the message "grep: memory exhausted" after a couple of seconds.

    top shows the processor used at 6% during this time, which is not surprising, since it doesn't have much to do (foo is not that much of a regexp).

    The machine has 1GB of RAM, so I assume that's how long it takes to do the malloc and the reading from /dev/zero

    As I don't have a FreeBSD readily available, I cannot be amazed. I'll just be pleased that my machine behaved normally.

  148. MOD PARENT AND GRANDPARENT UP by toiletmonster · · Score: 1

    asdf

  149. Re:Grep Bomb (try it in freebsd) by aav · · Score: 1

    And for what it's worth: the parent post wasn't anywhere near informative. He made unsupported claims, based mostly on a smug sense of superiority because he's using FreeBSD.

    Shouldn't that be closer to trolling ? If he had said "Windows" instead of "FreeBSD" he would have been labelled as a troll, and the thread would have been swamped with replies, ranging from sarcastic to offended.

  150. vsftpd is a huge ; and sftp is anyway better. by Anonymous Coward · · Score: 0

    > vsftpd is much safer than ftpd because it doesn't work as root so much.

    Plain bullshit !
    OpenBSD's ftpd is now frivsep'ed.

    OpenBSD as always claimed security through simplicity (less code means less bugs, and better audit).so:
    164K /usr/src/libexec/ftpd/
    726K vsftpd-2.0.2/

    I had never seen a security problem in our ftp daemon for the last 5 years I used OpenBSD.

    Beside that, for real secure thing OpenBSD promote his own file transfert implementation: OpenSSH (scp, sftp ...). ftp is still supported by convenience, but this proto is a nightware for firewall administrators (beside the lack of encryption in rfc/standards), and as usual OpenBSD adress this problem with a concrete, effective solution.

    To conclude: yes, licencing is important there. Making those secure software freely usable by anyone, even close source (as the BSD licence permits) help them to spread (see cisco, mac os x, solaris, ... all using OpenSSH). This important, not for ethical/philosophical reasons, but because having peers (others machines on your networks, on your neighbours nets) using your rock solid ultra secure software improves also your security. Without this, you would still log to your routers through telnet.

  151. MOD PARENT AND NEIGHBOR'S DOG UP by Anonymous Coward · · Score: 0

    Yeah.

  152. forkbomb variation: pipebomb by David+Gould · · Score: 1


    A few years ago I was playing around with a Perl forkbomb. I wanted to make one that would actually do something useful. Well, for a sufficiently lax value of "useful" -- let's say "interesting" instead. Anyway, I set it up to use the child processes like function calls, using the exit status as a return value, and had it compute Fibbonacci numbers (the tree-recursive way).

    Then I came up with the variation that I call a "pipebomb" -- does the same thing but using pipes instead of fork calls to start the child processes and read their output. Something like:

    $n = shift(@ARGV);
    if($n < 2) {print "1\n"; exit}
    $n--;
    open(CHILD1, "pipebomb.pl $n |");
    $n--;
    open(CHILD2, "pipebomb.pl $n |");
    $f = <CHILD1>;
    $f += <CHILD2>;
    close(CHILD1);
    close(CHILD2);
    print "$f\n";


    The interesting thing was experimenting with re-ordering the statements to make the children more or less parallel and seeing how the effects changed. The above code is the naughty version, because it tries to create both children together, and can kill an OS that's not smart enough to handle it. But this version is much better behaved:

    $n = shift(@ARGV);
    if($n < 2) {print "1\n"; exit}
    $n--;
    open(CHILD1, "pipebomb.pl $n |");
    $f = <CHILD1>;
    close(CHILD1);
    $n--;
    open(CHILD2, "pipebomb.pl $n |");
    $f += <CHILD2>;
    close(CHILD2);
    print "$f\n";


    because it doesn't start the second child until the first completes. As I recall, it was actually able to run successfully with n up in the high teens, or even low twenties, without even impacting the performance of the machine very much. It just took a really long time -- it was still creating a ridiculous number of processes, just doing it serially so it didn't overload the system.

    --
    David Gould
    main(i){putchar(340056100>>(i-1)*5&31|!!(i<6)<< 6)&&main(++i);}
  153. Install media + physical access + clue = ownership by dbIII · · Score: 2, Insightful
    I do not trust everyone with access to a win2000 boot CD.
    You can even get into a headless solaris box with an install CD and a serial terminal. You can then blank the root password and boot the system normally - you then have full access. Any machine that people have full physical access to is vunerable to those people - the most locked down box is still vunerable to someone pulling out the drive with its root partition, mounting it, and editing password files.

    Technology is no substitute for physical security, as Kevin Kline's character in "Fish Called Wanda" showed by getting a gun past a metal detector in the common airport security situation of watching the luggage and not the person.

    If you can boot a machine with your own media or pull it apart and no-one notices, then you can have full control - whether it is win2k or whatever.

    As for network security, virtual machines with quotas have to be the way to go so long as there are loonies with root passwords that enable telnet, install a compiler and use "coffee" as a password.

  154. Re:Distilling This Article and Its Author by Anonymous Coward · · Score: 0

    (Score:1, Troll) You IDIOT moderators! I am not an animal! And just because I believe *BSD is dying and happen to mention that doesn't make me a Troll. What assmunches.

  155. For the love of god... by Anonymous Coward · · Score: 0

    You run your distro as your desktop, I run mine as servers. So what if the default is no limiting. That's great for me as I don't need to change my servers. And if something goes bad I have the OOM killer.

    It doesn't bloody matter what the defaults are! The mechanism is there to change it to do whatever you want.

    In any case, this is not a bug, it's not a security problem, it's certainly not a kernal problem, it's a bloody stupid article.

    The writer sounds like one of those 15 year old kids that thinks he knows something about computers because he runs some some linux / bsd boxes.

    Get a clue and stop bothering me!

    1. Re:For the love of god... by Anonymous Coward · · Score: 0

      I happen to agree with this ... but you could have phrased it better.

  156. sandbox software? by SanityInAnarchy · · Score: 1

    Not all forkbombs are intentional. Suppose I want to try some questionable software (Half-Life 2 under Cedega). I don't want a dedicated HL2 box, nor do I want it to work, which is why it's on Cedega in the first place. If I can give Cedega its own user, I can kill it (ctrl+alt+f1 or ssh from laptop) if it gets unruly.

    If you believe local accounts should all be trusted, what's the point in a user other than root? Why not just go back to Win2k and a default user who's an admin?

    --
    Don't thank God, thank a doctor!
  157. So, what default ulimit that distros need to set? by sehari24jam · · Score: 1

    Talk about ulimit..
    Nobody mention yet ulimit-setting that shall be default for those distros..
    Any reasonable values?

    My FC3 max-user-process ulimit (default) is set to 8170. This will bring my machine down by forkbomb.
    So I set 50 for soft, 100 for hard.. Well it not work, since my KDE running lots of eye-candy, OOffice, tens of konsole tab.. And 1000 for soft 1500 for hard seem still too much.
    End of test, 400 for soft, 500 for hard seem OK.

    But, I can see that setting (400 user-process) running well, becoz the /bin/sh occupy considered small amount of memory.. What if the process occupy huge memory.. Then another story of "Some Linux Distros Found Vulnerable by Default".

    Well.. at the end I can't decide what default value that I should propose to FC team..

    Anybody found those values?

    --
    cogito ergo sum
  158. Re:Slackware 10.1 has no /etc/security/limits file by Anonymous Coward · · Score: 0

    Check /etc/login.defs and the output of ulimit -a

  159. He/she meant somebody that was..."somebody". by ulatekh · · Score: 1

    You don't count -- you're "anybody". Everybody is waiting for "somebody".

    --
    "Once we've identified and embraced our sickness, we'll have strength...and that's when we get dangerous." - John Waters
  160. Non-root user. by spaceturtle · · Score: 1

    As I understand, the article was about a hacker who got access to a non-root account, and was able to shoot everybody on the same machine in the foot by use of a fork-bomb.

  161. C:\aux == dead explorer by zooblethorpe · · Score: 1
    Also, just opening c:\aux used to crash M$IE.

    Nice to know it still does -- just tried on Win XP with all the latest patches and had to kill explorer.exe.

    Well, at least MS is consistent. I know a lot of people complain that Linuxland is too much of a hodge-podge, with different this and that. But hey, WIndows can consistently offer us the same platform, and for how long now? Bugs and all...

    --
    "What in the name of Fats Waller is that?"
    "A four-foot prune."