login
Header Space

 
 

Re: OBSD's perspective on SELinux

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ihar Hrachyshka <ihar.hrachyshka@...>
Cc: OpenBSD general usage list <misc@...>
Date: Sunday, September 23, 2007 - 3:25 pm

On Sat, Sep 22, 2007 at 08:38:17PM +0300, Ihar Hrachyshka wrote:

I think the nearest equivalent is "TrustedBSD".

The main trouble with SELinux is that it's so horrendously complex [1] and
fraught with traps for the unwary [2]. The chance that the policy you've
written is correct (i.e. without unwanted holes), unless you happen to have
a PhD in SELinux, is pretty much zero. On the other hand, the basic Unix
permissions model is so simple it's easy to audit.

The other problem with SELinux is that there seems to be some smoke and
mirrors going on.

SELinux: "We don't have a superuser account!"

Me: "So how do you configure SELinux policies?"

SELinux: "You need to have a special role, sysadm_r" [3]

Me: "So someone logged with sysadm_r can change any SELinux policy they
like? Or even disable SELinux entirely?"

SELinux: "Yes"

Me: "So how is that different from having a root account?"

SELinux: "Well, only the trusted administrator needs to have this privilege.
You don't give it to any of your service daemons, for example, and they
can't recover it"

Me: "But I don't run any of my daemons as root anyway; they all run as their
own separate unprivileged uids."

SELinux: "Hmm. Good point. But on a non-SELinux system, you could attempt to
break a setuid-root binary to get root again."

Me: "But with SELinux, don't you have rules so that privileged applications
transition the domain? So for example, when you run tcpdump, it transitions
into another domain which has privileges to capture network packets?"

SELinux: "Yes. But it's much more granular and configurable than setuid."

Me: "I think I've heard enough. Just let me audit my few setuid programs
properly, and then I won't need to learn SELinux at all, thank you."

[1] http://www.lurking-grue.org/writingselinuxpolicyHOWTO.html
[2] http://fedoraproject.org/wiki/SELinux/EnforcePolicy

[3] http://docs.fedoraproject.org/selinux-faq-fc3/index.html#id2826056
"How do I temporarily turn off enforcing mode without having to reboot?
...
You must issue the setenforce command with the sysadm_r role; to do so, use
the newrole command. Alternately, if you switch to root using su -, you gain
the sysadm_r role automatically."

[4] http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/selinux-guide/selg-section...
"Should an attacker gain root control, they could rebuild the policy to
weaken or neutralize SELinux"
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
OBSD's perspective on SELinux, Douglas A. Tutty, (Sat Sep 22, 11:34 am)
Re: OBSD's perspective on SELinux, Damien Miller, (Mon Sep 24, 11:09 pm)
Re: OBSD's perspective on SELinux, Chris Kuethe, (Mon Sep 24, 10:52 am)
Re: OBSD's perspective on SELinux, Marco Peereboom, (Sat Sep 22, 11:27 pm)
Re: OBSD's perspective on SELinux, L. V. Lammert, (Sat Sep 22, 7:47 pm)
Re: OBSD's perspective on SELinux, Rui Miguel Silva Seabra, (Sun Sep 23, 5:54 pm)
Re: OBSD's perspective on SELinux, Ted Unangst, (Mon Sep 24, 1:29 pm)
Re: OBSD's perspective on SELinux, Jacob Yocom-Piatt, (Mon Sep 24, 2:17 pm)
Re: OBSD's perspective on SELinux, Ted Unangst, (Mon Sep 24, 3:14 pm)
Re: OBSD's perspective on SELinux, Brian Candler, (Mon Sep 24, 11:31 am)
Re: OBSD's perspective on SELinux, Rui Miguel Silva Seabra, (Mon Sep 24, 11:59 am)
Re: OBSD's perspective on SELinux, Marc Espie, (Tue Sep 25, 6:06 am)
Re: OBSD's perspective on SELinux, Marc Espie, (Tue Sep 25, 8:34 am)
Re: digitally signed distribution (was: OBSD's perspective o..., Martin Schröder, (Mon Sep 24, 11:18 am)
Re: digitally signed distribution (was: OBSD's perspective o..., Martin Schröder, (Mon Sep 24, 12:02 pm)
Re: digitally signed distribution (was: OBSD's perspective o..., Rui Miguel Silva Seabra, (Sun Sep 23, 6:38 pm)
Re: OBSD's perspective on SELinux, Ted Unangst, (Sat Sep 22, 2:50 pm)
Re: OBSD's perspective on SELinux, Douglas A. Tutty, (Sat Sep 22, 4:21 pm)
Re: OBSD's perspective on SELinux, , (Sat Sep 22, 7:20 pm)
Re: OBSD's perspective on SELinux, Stuart Henderson, (Sat Sep 22, 4:00 pm)
Re: OBSD's perspective on SELinux, Joachim Schipper, (Sat Sep 22, 12:29 pm)
Re: OBSD's perspective on SELinux, Ihar Hrachyshka, (Sat Sep 22, 12:45 pm)
Re: OBSD's perspective on SELinux, Joachim Schipper, (Sat Sep 22, 4:39 pm)
Re: OBSD's perspective on SELinux, Darrin Chandler, (Sat Sep 22, 12:00 pm)
Re: OBSD's perspective on SELinux, Eduardo Tongson, (Sat Sep 22, 12:52 pm)
Re: OBSD's perspective on SELinux, Jason Dixon, (Sat Sep 22, 12:20 pm)
Re: OBSD's perspective on SELinux, Douglas A. Tutty, (Sat Sep 22, 1:21 pm)
Re: OBSD's perspective on SELinux, Ihar Hrachyshka, (Sat Sep 22, 1:38 pm)
Re: OBSD's perspective on SELinux, David Gwynne, (Mon Sep 24, 10:08 am)
Re: OBSD's perspective on SELinux, Jason Dixon, (Mon Sep 24, 10:25 am)
Re: OBSD's perspective on SELinux, , (Mon Sep 24, 2:28 pm)
Re: OBSD's perspective on SELinux, Brian Candler, (Sun Sep 23, 3:25 pm)
Re: OBSD's perspective on SELinux, Eduardo Tongson, (Sat Sep 22, 2:00 pm)
Re: OBSD's perspective on SELinux, Jeffrey 'jf' Lim, (Sat Sep 22, 12:26 pm)
speck-geostationary