LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 03-27-2005, 07:14 PM   #16
win32sux
Moderator
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 367Reputation: 367Reputation: 367Reputation: 367

Quote:
Originally posted by keefaz
Win32sux, did you try:
ulimit -u 256
before execute your forkbomb.sh script ?
okay, when setting the ulimit like that before executing the script it helps a lot... the system still gets slow, but it doesn't get SO slow and doesn't hang... also, the swap doesn't get touched... i am able to open a terminal, become root, and issue a "killall forkbomb.sh" and make everything come back to normal...


Code:
bash-3.00$ ulimit -a
core file size        (blocks, -c) 0
data seg size         (kbytes, -d) unlimited
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) unlimited
cpu time             (seconds, -t) unlimited
max user processes            (-u) 2048
virtual memory        (kbytes, -v) unlimited
Code:
bash-3.00$ ulimit -u 256
bash-3.00$ 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) unlimited
cpu time             (seconds, -t) unlimited
max user processes            (-u) 256
virtual memory        (kbytes, -v) unlimited
by doing a "ulimit -u 128" the performance hit of the forkbomb was even lighter...

the problem is that this is all done by the non-root user... and obviously someone with bad intentions wouldn't ulimit themselves... so my question now is:

how can *root* set the max ulimit for all the non-root users on slackware??

i'm thinking that maybe adding a ulimit command to the /etc/X11/xinit/xinitrc file might limit the amount of processs spawned in the X session?? what do you think??

what about remote ssh logins and local runlevel 3 logins??


Last edited by win32sux; 03-27-2005 at 07:19 PM.
 
Old 03-27-2005, 07:22 PM   #17
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,718

Rep: Reputation: 48
mayby you can put it in /etc/profile ?

egag
 
Old 03-27-2005, 07:24 PM   #18
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,718

Rep: Reputation: 48
yes , you can....

egag
 
Old 03-27-2005, 07:31 PM   #19
win32sux
Moderator
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 367Reputation: 367Reputation: 367Reputation: 367
Quote:
Originally posted by egag
mayby you can put it in /etc/profile ?
would putting it there apply the ulimit to all X sessions, remote ssh logins, and all shells (bash, ksh93, ash, zsh, tcsh, etc.)???

Last edited by win32sux; 03-27-2005 at 07:35 PM.
 
Old 03-27-2005, 07:35 PM   #20
win32sux
Moderator
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 367Reputation: 367Reputation: 367Reputation: 367
the guy that wrote the article said:
Quote:
I'll quickly mention here that Debian did not suffer the same fate as the others; congrats to the Debian development team.
what ulimit method does debian use??
 
Old 03-27-2005, 07:39 PM   #21
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,718

Rep: Reputation: 48

well...anyone who logs in get's bash.
if there's a way around that, you can remove the other shells.

but i wonder if the x-session would be limited.

maybe try to run the " evil-script" from the menu and see what happens. ?
( i don't have that script here..... )

egag

Last edited by egag; 03-27-2005 at 07:43 PM.
 
Old 03-27-2005, 07:42 PM   #22
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,718

Rep: Reputation: 48
oh...i managed to burn debian on 7 cd's once.
didn't come any further than that.

egag
 
Old 03-27-2005, 07:50 PM   #23
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,718

Rep: Reputation: 48
.......don't worry about X, as any script needs bash to be executed ..

so i think it's fine to put " ulimit -u 128 " ( or so ) in /etc/profile.


....and the article in the firs post,......just making a lot of fuzz about nothing.
probably written by a M$-developer.

egag
 
Old 03-27-2005, 08:11 PM   #24
win32sux
Moderator
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 367Reputation: 367Reputation: 367Reputation: 367
cool... i'm gonna try it and see...

meanwhile, i've opened a thread in the debian forum asking what ulimit configuration debian uses:

http://www.linuxquestions.org/questi...hreadid=306802
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
slackware security... marsques Slackware 5 02-26-2005 10:57 PM
What to do About Slackware Security Patches? sh1ft Linux - Security 4 11-30-2004 01:54 PM
slackware security e1000 Slackware 3 11-15-2003 02:33 PM
Slackware Security Update: GDM security update phoeniXflame Slackware 2 08-26-2003 04:21 PM
slackware java and security mr_mandrill Slackware 4 06-05-2003 04:30 PM


All times are GMT -5. The time now is 09:59 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration