![]() |
|
Linux destroyer |
enric
Member #4,016
November 2003
![]() |
Hi, int main(){ while(1) {fork()} } I thought it would be fun. At first it was: I ran it as a normal user, tryed to start a program, and it said "out of pids", then somehow the gterm which ran it crashed, and I wasn't able to do a killall or a shutdown or a "su" because I was out of pids
So my question: a simple user can render a computer unusable? with such a simple prog? Why is so. Shouldn't users have a limited number of pids? I admit I was a bit disappointed by this "security hole" SUSE 9.0 btw. ______________________________________________________ |
BAF
Member #2,981
December 2002
![]() |
you can use PAM or even just simple security file (someplace in /etc) to limit the amount of pids one user can run. Most production servers do this. |
Rash
Member #2,374
May 2002
![]() |
Have you tried ReiserFS or XFS as file system instead? And this doesn't belong in this forum. |
ReyBrujo
Moderator
January 2001
![]() |
Indeed. -- |
BAF
Member #2,981
December 2002
![]() |
XFS sucks, that is even less tolerant to abrupt shutdowns. |
ReyBrujo
Moderator
January 2001
![]() |
Quote: The ext3 system partition was broken and unreparable Sure? I remember when I once ran a recursive program that created directories inside directories and the hard disk went mad. I had to reboot, enter as single user (the system forced me into single user mode, rather), and run fcdsk (I think, Redhat 7). That fixed all the lost inodes and after rebooting I could delete the bunch of directories and continue working. -- |
Evert
Member #794
November 2000
![]() |
Quote: and I wasn't able to do a killall or a shutdown or a "su" because I was out of pids
Switch to a different vterm, login as root and kill the user processes? |
Chris Katko
Member #1,881
January 2002
![]() |
Quote:
I thought it would be fun. At first it was: I ran it as a normal user, tryed to start a program, and it said "out of pids", then somehow the gterm which ran it crashed, and I wasn't able to do a killall or a shutdown or a "su" because I was out of pids How'd a user-level program destroy the computer? What happened to this "linux security" thing? Quote: The ext3 system partition was broken and unreparable => Reinstall. Luckyly I have a separate partition for /home so I am up and running now (didn't loose data). o_O How did a program destroy your partition? It shouldn't be able to harm it. -----sig: |
BAF
Member #2,981
December 2002
![]() |
ctrl+alt+del killed it. It can happen any place. It is journaled, a bad jorunal or corruption caused by an abrupt shutdown, or shutdown with data still in the HD cache can cause that stuff. |
Chris Katko
Member #1,881
January 2002
![]() |
But... wasn't that the point of having a journalling (sp?) file system? I guess it's no NTFS, eh? -----sig: |
Billybob
Member #3,136
January 2003
|
enric: I agree it's odd that there is no default PID limits. As said you can put one in, and you should. It's listed in the Gentoo security guide, BTW. Which is a semi-good read even if you don't use Gentoo.
|
Thomas Fjellstrom
Member #476
June 2000
![]() |
Odd, I've had some nasty crashes in linux, and not once was it not able to boot (since I started using ext3). And untill just recently it was set to not run a check on startup (stupid mistake, it caused some odd errors, as if you dont run the check, the journal isn't applied.) -- |
HoHo
Member #4,534
April 2004
![]() |
I've user ReiserFS and had some crashes(couple tests with a bit too unstable machine and some driver problems) but I've never destroyed or harmed the file system. __________ |
Avenger
Member #4,550
April 2004
|
razor
Member #2,256
April 2002
![]() |
Is ext3 that unstable? I've killed mine using the power switch a number of times without a problem (of course it has to run it's nice check at the beginning). This is both on gentoo and mandrake. Whoooo Oregon State University |
Evert
Member #794
November 2000
![]() |
Ext3 should be fine, normally. I've had some severe crashes and never had a problem with the filesystem. Then again, I barely have ever had problems with FAT in DOS and Windows either. |
Crazy Photon
Member #2,588
July 2002
![]() |
Sometimes I experienced lost files on ext3 when my system crashed, actually I once lost some init script, so I had to reinstall... With ReiserFS things were much better in that sense, altough performance goes down... I am trying XFS now to see how it is, altough I had no crashes yet... ----- |
razor
Member #2,256
April 2002
![]() |
Quote: Ext3 should be fine, normally. I've had some severe crashes and never had a problem with the filesystem. Then again, I barely have ever had problems with FAT in DOS and Windows either. The only problem I've ever had with windows (NTFS) was when my ram went bad and some seriously screwed files were copied back to the drive from ram. Then scandisk tried to fix everything and froze. Needless to say everthing was screwed from there. Whoooo Oregon State University |
Arthur Kalliokoski
Second in Command
February 2005
![]() |
I've been running linux on ext2 through reiserfs since '97 and never had the filesystem mess up (although that's partly because it never crashes unless I do something truly stupid like a fork bomb "just to see what happens". OTOH, Windows messes up so often (dual boot) that I have the procedure to save & restore windows partitions to a linux dir down cold. BSOD as per usual, hardware reset necessary They all watch too much MSNBC... they get ideas. |
Archon
Member #4,195
January 2004
![]() |
Quote: implies it's MY fault, stick more pins in the bill troll. Troll? If you said doll, it'd make more sense... How many people have a voodoo dool of Bill Gates and stabs the doll when Windows messes up? |
Arthur Kalliokoski
Second in Command
February 2005
![]() |
to me, "doll" implies something attractive... (Hey doll!) They all watch too much MSNBC... they get ideas. |
BAF
Member #2,981
December 2002
![]() |
you are using win98? eeeew |
Arthur Kalliokoski
Second in Command
February 2005
![]() |
I like real live DOS! I still have a "I (heart) DOS" bumper sticker which nobody understands anymore.:D They all watch too much MSNBC... they get ideas. |
Archon
Member #4,195
January 2004
![]() |
Quote: "I (heart) DOS" bumper sticker which nobody understands anymore.:D Isn't the acronym for DOS being converted to the common term for Denial of Service? |
jhuuskon
Member #302
April 2000
![]() |
No, that's DoS. You don't deserve my sig. |
|