LinuxQuestions.org
Visit Jeremy's Blog.
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 03-06-2007, 07:45 PM   #1
cyberfishee
Member
 
Registered: Mar 2005
Distribution: Debian Testing
Posts: 133

Rep: Reputation: 15
Is there something like memory and CPU quota?


Hi,
I was wondering, is there any way to stop untrusted local users from running something like:

Code:
while(1) {
     malloc(1);
}
to bring down the whole system? (eg. some sort of memory quota?)

I tried it on my Debian box with a Core 2 Duo E6300 and 1GB ram from an unprivileged user, and it completely crashed my system within seconds if not shorter.

Is there something conceptual that I am missing here? (eg. should untrusted users not be allowed to run any binary? That doesn't seem practical in eg, a school setting)

Thank you very much
Matthew Lai
 
Old 03-06-2007, 11:10 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
The 'ulimit' command (part of the bash shell; man ulimit) or /etc/security/limits.conf (part of pam, man limits.conf) will do the job.
 
Old 03-06-2007, 11:28 PM   #3
cyberfishee
Member
 
Registered: Mar 2005
Distribution: Debian Testing
Posts: 133

Original Poster
Rep: Reputation: 15
wow!
I just looked it up.
It is amazing.

Strange that I have never heard of it, being an alomst 4 years Linux user.

Thank you =)
 
  


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
Memory Quota for Each Process rpatwal Linux - Enterprise 1 07-21-2006 12:05 AM
Help Configuring the Memory Used by a Process in RedHat? (Cache Memory on CPU) geogecko Linux - General 3 02-23-2005 03:32 PM
CPU and memory usage suguname Linux - Newbie 3 02-01-2005 01:45 PM
rh 9 - old box - new memory - new cpu iamjustauser Linux - Hardware 4 07-26-2004 01:04 PM
linux memory problem & mail quota Ammad Linux - Newbie 1 06-10-2004 06:01 AM

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

All times are GMT -5. The time now is 07:10 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