Linked by Eugenia Loli-Queru on Sun 11th May 2008 23:48 UTC
Linux Linux has been described as one of the most secure operating systems available, but the National Security Agency (NSA) has taken Linux to the next level with the introduction of Security-Enhanced Linux (SELinux). SELinux takes the existing GNU/Linux operating system and extends it with kernel and user-space modifications to make it bullet-proof. If you're running a 2.6 kernel today, you might be surprised to know that you're using SELinux right now! This article explores the ideas behind SELinux and how it's implemented.
Order by: Score:
Bulletproof
by Anonymo (1) on Mon 12th May 2008 03:37 UTC
Anonymo
Member since:
2005-07-06
Fans: 0

I am going to wear linux!

Cross platform security framework
by chekr (3.68) on Mon 12th May 2008 04:38 UTC
chekr
Member since:
2005-11-05
Fans: 0

The most value i see in flask is the fact that it is being implemented on multiple platforms (SELinux, OpenSolaris FMAC, SEDarwin, SEBSD), being able to deliver security policies across multiple platforms.

using it in production?
by xaeropower (1) on Mon 12th May 2008 05:18 UTC
xaeropower
Member since:
2005-12-16
Fans: 0

I haven't seen it enabled on too many servers. Redhat and Fedora enables SElinux by default (what quickly gets turned off by the admins), pbly the problem not just that the average admins don't have enough experience in RBAC/DAC but applying it in production environment is hard (qaing a mirror of the system then applying it on the main server, and still can something go wrong) to accomplish especially if you want to install new packages on the servers from time to time, not just configuring a box for dns server, then using the basic selinux configuration and leave it that way.

I think moving forward to virtualization is much more popular. I even doubt the nsa use selinux on their own servers.

RE: using it in production?
by superman (3.88) on Mon 12th May 2008 10:28 UTC in reply to "using it in production?"
superman Member since:
2006-08-01
Fans: 0

> I think moving forward to virtualization is much more popular.

You can do both.
And you can use SeLinux with virtualisation.
EC2 ( http://aws.amazon.com/ec2 ) permit SeLinux :
$ ssh root@ec2-xx-xxx-xxx-xxx.compute-1.amazonaws.com getenforce
Enforcing


Btw, my personnal system :
$ /usr/sbin/getenforce
Enforcing


A log of RHEL / Fedora have SeLinux in Enforcing mode.

Irrelevant
by J.R. (3.68) on Mon 12th May 2008 06:06 UTC
J.R.
Member since:
2007-07-25
Fans: 0

In my opinion SELinux is irrelevant for most users, and for the rest it is waaaay too hard to use. I am more interested in that new access control feature in the linux kernel (Smack or something?) as this seems to be similar to only the easiest part of SELinux.

Personally I think MAC is the way to go for long-lived background services that the user will not interfere with, but for foreground applications should not be such restrictions yet before they have found a proper way to implement it that does not interfere with the users workflow...(I am talking about enduser systems ofc).

RE: Irrelevant
by superman (3.88) on Mon 12th May 2008 13:06 UTC in reply to "Irrelevant"
superman Member since:
2006-08-01
Fans: 0

> In my opinion SELinux is irrelevant for most users

In my opinion Unix/Linux/BSD is irrelevant for most users.
That was true.

RE: Irrelevant
by sbergman27 (4.64) on Mon 12th May 2008 13:20 UTC in reply to "Irrelevant"
sbergman27 Member since:
2005-07-24
Fans: 33

It is disturbing that SELinux is being presented essential and a panacea. To read the popular propaganda, you'd think that it was impossible achieve anything better than a security sieve without it. SELinux is an effective, if somewhat complex, tool which provides very fine-grained security. It comes at a cost of some (perhaps unnecessary[1]) complexity, and a bit of performance. There are other solutions which hit a different balance of fine-grainedness vs complexity, including the traditional unix permissions which have served us pretty well over the last few decades before SELinux showed up. I am far from a RedHat basher (I have huge respect for them), but RedHat has been pushing SELinux very hard for their own business reasons, and this has created a vortex which has sucked in many bystanders. Distros and savvy individuals should make their own choices, which make the most sense for their situation.

[1] "The more they over-think the plumbing, the easier it is to stop up the drain."
- Montgomery Scott, Star Trek III: The Search for Spock

Edited 2008-05-12 13:22 UTC

RE: Irrelevant
by Znark (1.62) on Mon 12th May 2008 17:59 UTC in reply to "Irrelevant"
Znark Member since:
2006-01-09
Fans: 0

Redhat mainly uses SELinux for confining system daemons. They have done a pretty good job of making the default configuration work out of the box. One big problem area are services like Apache where users need to label files and there aren't good simple docs on how to do this. The other problem is with third-party software, like VMware, that doesn't know about SELinux.

There has been some work done on confining Firefox. My guess is that it will be an option for people who want the extra security and are willing to put up with limitations on downloading files and loading plugins.

SELinux is good, but...
by obsidian (2.68) on Mon 12th May 2008 06:36 UTC
obsidian
Member since:
2007-05-12
Fans: 0

... what I'd really like to see is pf ported to Linux.

Looks unlikely to happen because (as I understand it - I'm not a network guru) Linux handles networking quite differently to how the BSDs do.

I use pf with FreeBSD (I dual-boot that with Linux)
and I'm sold on pf's *great* rule syntax, elegance and
effectiveness!

Edited 2008-05-12 06:37 UTC

RE: SELinux is good, but...
by Sophotect (1.4) on Mon 12th May 2008 09:47 UTC in reply to "SELinux is good, but... "
Sophotect Member since:
2006-04-26
Fans: 0

What do you mean by "Guru"? If you mean what i mean, then this could be for you :-)

http://www.fwbuilder.org/

Or this

http://firehol.sourceforge.net/

RE[2]: SELinux is good, but...
by renhoek (1.92) on Mon 12th May 2008 12:07 UTC in reply to "RE: SELinux is good, but... "
renhoek Member since:
2007-04-29
Fans: 0

not every problem can be solved with adding another layer of complexity.
(and this is also true for SEL)

RE[3]: SELinux is good, but...
by sbergman27 (4.64) on Mon 12th May 2008 13:03 UTC in reply to "RE[2]: SELinux is good, but... "
sbergman27 Member since:
2005-07-24
Fans: 33

not every problem can be solved with adding another layer of complexity.
(and this is also true for SEL)

And complexity is antagonistic to security.

We like
by handy (3.64) on Mon 12th May 2008 07:39 UTC
handy
Member since:
2005-07-06
Fans: 0

I like SElinux and it features. But I can understand people are overwhelmed by it's way of working. It requires to think in an other way and has a rather high learning curve.

People like Dan Walsh publish a lot simple and daily usage examples.

RE: We like
by sgibofh (1.68) on Mon 12th May 2008 08:43 UTC in reply to "We like"
sgibofh Member since:
2007-03-31
Fans: 0

we curently see a shift in our daiywork towards the apparmor stuff as it lowers the curve quite a bit.

problem with selinux indeed is the steep curve and unix people are hard to find, especialy when thy are not a consultant. So, keeping the stuff working and safe is better, so it seems.

Both products use the same system calls afaik. apparmor can do less at some points but so much easier to administer. Things management like.

it will take time
by karl (3.24) on Mon 12th May 2008 09:27 UTC
karl
Member since:
2005-07-06
Fans: 2

I have never used selinux, but according to what I have read from others who know it well-one must understand the code of the application to really grok how to get it to work well with selinux. If this is true most admins are basically screwed, because few admins are programmers at heart. Having a deeper understanding of how the code works of the many thousands of apps which compose a system is simply not in the domain of knowledge or skills for a good admin-and shouldn't be: this is why there are programmers and admin-two seperate skillsets with only a degree of overlapping.

I may of course be wrong-but I have read this kind of thing one too many times. I suspect selinux will really start to make a difference when the applications themselves have been modified to properly support selinux. This is what Redhat/Fedora are doing now-working with upstream to make applications play properly with selinux. I suspect that in a couple of years most of the basic applications which compose a system will be patched to play nicely-at which point we won't have to understand how the code works to be able to easily manage selinux.

On another note:

I love reading planet gnome and watching the poor programmers struggling to do simple admin stuff-so much they know, so much they don't understand.



And related to this:

/rant

a lot of system applications are being written now by programmers who have basically no experience administering system and this is really painful-traditionally system apps were written *for* admins- not against them-NetworkMangler(TM) is a wonderful example of this. Most of the anti-admin system software seems to be comming from Redhat unfortunately. Basically any software that configure the system which is exposed directly to users is anti-admin- the needs of users are at direct odds with admins- admins need control, users need few options and minimal control-to keep them from messing things up. Of course admins are users too- and in Linux land, lots of users are admins by default.

NetworkMangler/Policykit/Pulseaudio/Hal are each plagued by these problems- they are so tightly coupled with the particular distribution that they only work if they are properly implemented by the distributors themselves-and thus the admin role-being between distributors and users is totally shortchanged-this all in an effort to make things easier for end users. The documentation of this class of software is basically non-existant, only those working for the distribution which is producing this software has any real insight into how this stuff works-yet admins need to be able to work with and around such software for they are the ones responsible for the users. As wonderful as NetworkMangler(TM) is for modern laptop wireless users, it remains an abomination for admins who simply want to implement static ip addresses. It's voodoo is wrapped up in binaries which cannot be changed and has effectively 0 user-editable configuration files, which basically screws admins. Hell if the damned program would simply produce gconf entries which could be programmaticaly changed(gconftool-2) that in itself would be a wonderful improvement.

rant/

RE: it will take time
by Doc Pain (2.8) on Mon 12th May 2008 13:33 UTC in reply to "it will take time"
Doc Pain Member since:
2006-10-08
Fans: 6

I may comment on a few of your statements:

Basically any software that configure the system which is exposed directly to users is anti-admin- the needs of users are at direct odds with admins- admins need control, users need few options and minimal control-to keep them from messing things up.


Well, it's not that easy. Too few options: "I can't setup anything!", but too much option: "That's all silly stuff I don't need." In opposite to "average users", admins usually know what they want and what they need.

Of course admins are users too- and in Linux land, lots of users are admins by default.


You're right, but feel free to extend this statement: On most home PCs, the user is the admin - admin and user in one and the same person. "I don't need to administer my system, it does it by itself!" is, as you surely know, nonsense. Making computers accessible to everyone makes system designers abandon well intended means of security, just to increase the comfortability of the user. On the other hand, this may cause more trouble for "real admins" who have to repair the holes in the security concept afterwards.

The documentation of this class of software is basically non-existant, only those working for the distribution which is producing this software has any real insight into how this stuff works-yet admins need to be able to work with and around such software for they are the ones responsible for the users.


Here, a look to the BSDs is very welcome. The security software, belonging to the base OS and being maintained by the OS crew, offers excellent documentation which is available right after install via the "man" command. Corresponding sections in the handbook illustrate and explain the more complex topics. I do agree with you: Documentation is very important, especially if an incorrect setup security software makes your system vulnerable to attackers.

(I can't make very accurate statements about SELinux - so I won't even try - because I'm mostly using pf on BSD, but still the article was very interesting.)

RE[2]: it will take time
by ozonehole (2) on Wed 14th May 2008 22:25 UTC in reply to "RE: it will take time"
ozonehole Member since:
2006-01-07
Fans: 0

(I can't make very accurate statements about SELinux - so I won't even try - because I'm mostly using pf on BSD, but still the article was very interesting.)


I could be wrong, but my understanding of pf on BSD is that it's basically for building firewalls. It's Linux equivalent would be iptables. In terms of syntax, may say that pf is superior to iptables, and I won't argue with that - they are probably correct. However, I don't think that pf is equivalent to SELinux. SELinux is a MAC (mandatory access controls), and the article states that BSD has it's equivalent is TrustedBSD.

I have no criticisms of pf, I just don't think it's equivalent to MACs. But then, I'm no expert (wish I were).

Edited 2008-05-14 22:33 UTC

RE[3]: it will take time
by Doc Pain (2.8) on Thu 15th May 2008 00:43 UTC in reply to "RE[2]: it will take time"
Doc Pain Member since:
2006-10-08
Fans: 6

I could be wrong, but my understanding of pf on BSD is that it's basically for building firewalls. It's Linux equivalent would be iptables. In terms of syntax, may say that pf is superior to iptables, and I won't argue with that - they are probably correct.


This illustration is correct. Another firewall mechanism on BSD is the IP firewall, ipfw2. Is is more port oriented and doesn't seem to take packet content much into concern. As far as I know, ipfw is available on Mac OS X, too.

However, I don't think that pf is equivalent to SELinux. SELinux is a MAC (mandatory access controls), and the article states that BSD has it's equivalent is TrustedBSD.


On FreeBSD, "man 3 mac" gives you the section 3 manpage for the kernel interfaces of the mandatory access control which can be enabled by putting "options MAC" into your kernel configuration file. Different mac_*.ko loadable modules are available, too. According to TrustedBSD you mentioned, the manpage states: "Support for Mandatory Access Control was introduced in FreeBSD 5.0 as part of the TrustedBSD Project." The file /etc/mac.conf controls the MAC framework (see "man 5 mac.conf"; sebsd is mentioned there, too). The system developer's manual adds further information (see "man 9 mac").

I have no criticisms of pf, I just don't think it's equivalent to MACs. But then, I'm no expert (wish I were).


I think you're right. The machanisms of ipfw and pf provide excellent means of security, and the TrustedBSD MAC framework complements to this concept.

RE: Japanese Craftsmanship
by irbis (2.8) on Mon 12th May 2008 10:03 UTC in reply to "Japanese Craftsmanship"
irbis Member since:
2005-07-08
Fans: 0

(You could have written a short introduction to Tomoyo too besides of just providing the links. Anyway: ) on that site there's a nice "Secure OS Comparison At a Glance", including SELinux, Tomoyo, AppArmor and Smack:
http://tomoyo.sourceforge.jp/wiki-e/?WhatIs#comparison

SELinux seems to be too daunting
by melkor (2) on Tue 13th May 2008 12:18 UTC
melkor
Member since:
2006-12-16
Fans: 3

I haven't used SELinux, but it simply seems too difficult to set up, and too difficult to maintain. Plus, mainstream adoption has been either non existent, or very slow. Lack of documentation doesn't help, lack of mainstream applications fully supporting or integrating with SELinux doesn't help either.

I really do honestly think that a lot of basic security comes down to commonsense stuff like making hard to guess passwords, not opening emails from people you don't know, running Linux as a normal, not root user (obvious I know, but some people do run it as root), and avoiding dubious websites. Basics like avoiding using html in emails don't hurt either.

The sad thing is most people using computers (and not just Linux, mostly Windows) should NEVER be allowed near a computer. They are not interested in learning how to securely use their computer in the slightest, they have no interest in learning how to effectively maintain their computer, they are plain lazy and stupid. Sorry, I might sound like an elitist, but as someone who has worked in support for a good number of years, I KNOW that I am 100% accurate in this comment. I have long championered the idea of every computer user MUST be licensed to use it if it is connected to the Internet, or shares files with others in any way, shape or form.

Microsoft Windows is mostly to blame for this phenomena, as it has long sacrificed security for ease of use with exceptionally bad design points in relation to security and reliability. 15 years ago and only the computer literate used a computer, and you *had* to learn how to use the computer. These days, every Tom, Dick & Harry uses it and usually cocks things up on a regular basis. Herein lies the problem - why should the network bandwidth of the Internet be reduced to allow for idiots who get viruses, worms, trojans, diallers and act as SPAM bots etc? Why should I have a slower Internet connection because of congestion due to other users who simply do not secure their system and act in a responsible way?

Dave