LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-05-2005, 11:15 AM   #1
namit
Member
 
Registered: Aug 2005
Distribution: Debian
Posts: 355

Rep: Reputation: 30
fork bomb


How do i stop fork bomb from happening
 
Old 12-05-2005, 12:16 PM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
The easiest way is to not let users run executables from there home directory or write files to any other directory. This way they can never create or provide executables above what you've provided.
 
Old 12-05-2005, 12:27 PM   #3
namit
Member
 
Registered: Aug 2005
Distribution: Debian
Posts: 355

Original Poster
Rep: Reputation: 30
but how do i do this?
 
Old 12-05-2005, 11:13 PM   #4
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
You can also use ulimit and the limits.conf file to define set limits. There are a number of "stupid command line tricks" that can be used to forkbomb a system, so you might want to use them as well. Take a look at this thread on the subject also:

http://www.linuxquestions.org/questi...d.php?t=338560
 
Old 12-06-2005, 04:48 PM   #5
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
Example limits.conf file:
Code:
*                hard    as             1000000 #each user limited to 1,000,000kb total memory usage
*                hard    stack            32000 #each user's stack limited to ~32mb
%                hard    as             1300000 #total memory usage for all users cannot exceed 1,300,000kb
*                hard    nproc           300 #each user limited to 300 processes
#Mandriva2006 defaults:
*               -       rt_priority     0
*               -       nice            0
@audio          -       rt_priority     50
@audio          -       nice            -10
This is from my AthlonXP 2000 (1664mhz) machine with 750MB RAM, adjust to your hardware specs if necessary. You can verify that its working by logging out and loggining back in and running
Code:
ulimit -a
. You need to logout and log back in to your X session as well for these limits to take effect.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Debian's Fork Bomb Prevention / ULIMIT win32sux Debian 2 03-27-2005 10:57 PM
No sound(Someone bomb IBM) jakob_g Linux - Newbie 7 02-26-2005 06:06 PM
LINUX is the BOMB 69RocketGC LinuxQuestions.org Member Success Stories 1 01-12-2005 06:28 AM
GeForce 4 mx420 bomb twodogsfunking Linux - Newbie 3 05-08-2003 04:50 PM
Mail Bomb(s) Arcane Kidd Linux - Software 6 04-29-2003 12:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 10:52 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration