LSM/SELinux 2.4.x on a production machine
Hey folks :)
At Russell's request, I've included below Russell's replies to a couple of questions, and my replies to his replies. I'm subscribed to this as of a few minutes ago, so please don't Cc: me on replies; I get way too much non-filterable mail as it is.
Just a bit of background, I'm the primary systems administrator for
http://www.oftc.net/. We've recently received some dedicated hardware, and I'm going to be implementing the framework to provide FOSS projects/communities with hosting facilities (ie: web, CVS, mail, that sort of thing).
Ideally, I would like to lock down the systems to a reasonable degree, while still maintaining a free flow of information and files to and from all the various users. This type of shared system is a ways off yet, we don't quite have the hardware and bandwidth to support heavy usage yet. So in the meantime, we'll just be doing CVS/mail/web, managed by the users through CVS or similar. I've enough experience to do this reasonably safely in a non-LSM/SELinux system.
However, given the obviously large amount of time it'll take for me to audit the distributed policies, and adjust them to our needs, I'm getting started now :)
Quoted 2 lines · On Sat, 7 Jun 2003 16:29:44 +1000 Russell Coker <[email protected]> wrote:
I find it very difficult to match up names and faces. If you send me a jpg of yourself I'll probably recognise you.
Oh, it's not really relevant. I grilled you for a few minutes on the general concepts behind SELinux, but didn't really get into the detailed, implementation-specific stuff.
Quoted 5 lines
Quoted 5 lines
Right now, I'm pretty much just going to give members restricted (CVS-only) access to our hardware, no shell login or anything. They'll manage their web stuff, mailing list stuff, etc., via CVS. This is doable with stock Linux, and reasonably safe.
Quoted 7 lines
Quoted 3 lines
One of these days, however (perhaps after we get some more dedicated hardware), I'd like to set up a true multiuser system. Real community thing, you know?
Sounds like a good use for SE Linux. SourceForge use OpenWall (or used it last time I checked) for such things. SE Linux is much more powerful than OW and gives you detailed control over what to allow and what to deny.
Yeah, I've come to (more or less) the same conclusion. Though preliminary. It may turn out that something a la OpenWall or grsecurity is "good enough". We'll see, anyways, when I'm done prototyping systems :)
Quoted 8 lines
Quoted 6 lines
Given how complex LSM/SELinux is, I want to start working on it now. However, given the amount of time and effort it's going to take auditing the distributed policy and adjusting it for our needs, I wanted to know
- do you consider it production-ready? I asked if anybody in #selinux on irc.freenode.net was using it for production machines, and it was generally used on single-purpose/simplistic installations.I'm running two ISPs on SE Linux. I think it's production ready.
Thanks, a vote of confidence from somebody who uses it full-time means a fair bit.
Quoted 5 lines
The only problem with SE Linux at the moment for serious installations is the lack of support for backup of security contexts of files. This will be fully addresses in Linux 2.6.0, and in the mean time there are hacks you can use, but nothing satisfactory.
Probably won't be moving to 2.6.x in the forseeable future, for the machine(s) in question. That being said, I'll back them up manually if need be. (ie: by hand, writing down on a piece of paper what's being done where ;)
Quoted 5 lines
As you won't want people using your server for running Netscape then the most you will have to worry about is some small difficulty with UML, which could easily be fixed by changing the policy. Also as your typical user probably won't be interested in great security they will probably run UML kernels under their own user domain, in which case the issue is moot.
I'll be running UMLs myself (as system administrator), but I also have the ability to modify policy and whatnot, so that's not a big deal :)
I won't support users running UMLs, at least not currently. They're too resource-intensive; any UMLs running will be shared resources.
Quoted 4 lines
I have considered the possibility of patching a mail server to run procmail for delivery in a special user context. Then procmail can safely access the .procmailrc file and deliver mail to the user's home directory, but it can't access the home directory of a user in another role.
Yeah, this is my question; Exim will presumably be able to drop its Unix privileges as normal, but it will remain in the same domain, correct? (So should that procmail process elevate its privileges in a mundane manner via buffer overflow or setuid root shell or somesuch, they will actually have elevated privileges? Compared to say, a patched SSH, where even if the user's process gets "root", they can't do root-y stuff? They're not "real" root?)
Quoted 6 lines
However will you even be using multiple roles? For a system such as you describe it's likely that you will have three roles,
staff_r(for minor administration tasks),sysadm_r(for serious administration - mkfs, fdisk, etc), anduser_r(for the users). Now if you demand that all people instaff_ralso have an account inuser_rfor their email, then you can just restrict procmail to only accessinguser_r.
I'm afraid my inexperience with SELinux and MAC in general will show a bit here, I'm unsure of the subtle differences between a domain and a role, in this case.
Specifically, all I'm really aiming for is a somewhat hardened box (ie:
those three basic roles you mentioned), and the ability to segregate users should they desire it. For instance, should one of our users be a bit paranoid about others sniffing around /proc to see what they're doing and whatnot, we'd like to be able to support their request (within reason).
Personally, I look forward to seeing how well I can get this stuff done while still retaining the community part of it :) SourceForge really segregates projects from one another, ditto for users.
Quoted 3 lines
Please take this discussion to the SE Linux list if possible, so others can also join in. I will post a message to the list containing parts of my text that don't directly refer to your message for the benefit of others.
Sure. I'm about to head off to bed, but I'll subscribe to it in the morning and carbon copy this email to it. If you haven't fired off your own email yet, can you hold off until tommorow so I can participate? Thanks :)
Er, yeah, thanks again too :)
You can filter duplicate messages by rejecting duplicate message ids.
There is a reason that mailers include the original sender on the cc-list:
It is so that you get the mail faster, and can think about composing a response. Sometimes lists are very slow.
Quoted 2 lines · David B Harris
so please don't Cc: me on replies; I get way too
much non-filterable mail as it is.
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.