Re: jail & security

From: Shannon Johnson (shannon@designcurve.net)
Date: 08/23/01


From: "Shannon Johnson" <shannon@designcurve.net>
To: <freebsd-security@freebsd.org>
Date: Thu, 23 Aug 2001 12:00:05 -0700


> On Thu, 23 Aug 2001, Alexey Zakirov wrote:
>
> > > yourself from destroying a system (e.g. read only file system, setting
the
> > > system immutable flag, etc.)
> > >
> > > Remind me to never give you a shell account.
> >
> > Alexey is wrong in stating 'You CAN'T limit whole jail limits.' you
> > actually can given the right patches to the jail subsystem. :)
>
> Am I wrong? Can you setup jail that limits his CPU/MEM for particular
> jail?

Yes, infact you are incorrect. I have set up literally dozens of jails both
at home and work. Through this I have experimented with allot of
configurations, including login classes.

One way that I tested this out was to write a simple c program to test that
the cpu/memory limits were being properly limited by login.conf. Here tis...

int main(void) {
  while(1) malloc(100);
}

This is obviously required allot of memory/CPU. But it proved my point.

By the way, where are the patches that you referred to earlier.

---
Shannon
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-security" in the body of the message


Relevant Pages

  • [SoC] Jail Resource Limits
    ... folks: I've completed the Summer of Code work on the jail resource limits; jails can now have soft-ish limits placed on their memory and CPU usage. ... Briefly, when a jail uses more memory than its limit, pages are clawed back by a new kernel process, jpager. ... When a jail uses more CPU time in proportion to total CPU time used than the number of its CPU usage shares to the total CPU usage shares, its processes are dropped in priority until it's had its fair share of the total CPU time; if there are no other processes that want to run, they'll use up as much CPU time as they otherwise would. ...
    (freebsd-hackers)
  • jail process limits
    ... I've got a jail server which runs a bunch of web site development environments. ... If I try to start an application server as user httpd in one of the jails, it exits immediately with "Cannot fork: Resource temporarily unavailable". ... Why am I getting the resource unavailable when I barely have 230 processes, not even close to the limits. ...
    (freebsd-stable)
  • Re: limit jail disk space
    ... > I mean jail disk limit ... The tools may control all limits such as cpu time, ... > hooks for inode/blocks control of jail in FreeBSD. ...
    (freebsd-hackers)
  • Re: CA death penalty
    ... That's the jail in AZ where the sheriff thinks he's ...
    (sci.med.transcription)