Vulnerability Development mailing list archives
Controlling a program's resource usage on Unix
From: bernie () FANTASYFARM COM (Bernie Cosell)
Date: Sun, 16 Apr 2000 11:37:12 -0400
The recent thread on history logging reminded me of a little project I've been working on for a while and I'm at a bit of an impasse: What I'd like to do is be able to run an _arbitrary_ program and limit what it can do. The overall superstructure is fairly straightforward: it'll be run in a 'no privileges' account, chrooted to a hierarchy that doesn't include any block/char special inodes [except maybe /dev/tty] and no setuid programs at all. Within that environment, it is fairly easy to 'watch' that the program doesn't eat a lot of disk space and without any root access there's no real way the program can 'break out' of its little hierarchy or mess with the rest of the system .. if the 'launching' process sees that the launched-program is misbehaving, it'll just killpg -9 the whole mess.... so that's great... BUT: I don't know how [or even if it is possible!] to limit the _execution_ profile of the program. /proc does give me some metrics on processor/memory use by a proc and its children, but it looks like a simple double-fork will defeat that [with the double-forked-children inherited by init when the middle-proc exits and [AFAICT] untraceable]. Now, for my actual real-world application this is probably good enough [I'm not trying to keep mailicious hackers from tanking our system, but just trying to provide a "testbed" in which intended-to-be-well-behaved programs can be run in a way that won't impact other stuff the server is doing], but I've been wondering just how well I can *do*. /Bernie\ -- Bernie Cosell Fantasy Farm Fibers mailto:bernie () fantasyfarm com Pearisburg, VA --> Too many people, too few sheep <--
Current thread:
- Re: History Files, (continued)
- Re: History Files Crispin Cowan (Apr 15)
- Re: History Files Rodrick Brown <System Administrator> (Apr 15)
- Re: History Files Tomas Westin (Apr 15)
- Re: History Files Blue Boar (Apr 15)
- Re: History Files audit (Apr 15)
- Re: History Files Blue Boar (Apr 15)
- Re: History Files Carson Gaspar (Apr 15)
- limited functionality accounts (was: Re: History Files) Marc Slemko (Apr 16)
- Re: limited functionality accounts (was: Re: History Files) Seth R Arnold (Apr 16)
- Re: limited functionality accounts (was: Re: History Files) Einar Indridason (Apr 26)
- Controlling a program's resource usage on Unix Bernie Cosell (Apr 16)
- Re: Controlling a program's resource usage on Unix Seth R Arnold (Apr 16)
- Re: Controlling a program's resource usage on Unix Isaac (Apr 21)
- Re: History Files Rodrick Brown <System Administrator> (Apr 15)
- Re: Controlling a program's resource usage on Unix Crispin Cowan (Apr 16)
- Re: Controlling a program's resource usage on Unix Matej Kovac (Apr 17)
- Re: Controlling a program's resource usage on Unix Pavel Kankovsky (Apr 18)
- Re: History Files Crispin Cowan (Apr 15)
- Re: History Files David Taylor (Apr 16)
- Re: History Files Boris Sagadin (Apr 17)
- Fwd: RAZOR Analysis of dvwssr.dll Blue Boar (Apr 17)
- Re: History Files iconoclast (Apr 18)
- Re: History Files Bluefish (Apr 19)