Skip to contentSkip to conversation

(u|r)bacsep: initial testing

DISCUSSION Christopher J. PeBenito 3 participants 7 messages Jul 16, 2008 – Nov 14, 2008 SELinux security module

lore
Share & tools
lore
#0 lore raw

For those that are interested, the SELinux user-based separation policy is ready for some initial testing. It can be checked out from the rbacsep branch of the refpolicy SVN repo. Not all of the type aliases are in place for compatibility yet, so switching from an existing policy should be done in permissive.

A question that comes up is how exactly to to determine which types should be constrained by ubac. The obvious answer would seem to be that if the user isn't system_u, then there should be ubac constraints on the access check. But the problem is that creating new files gets your selinux user on files. So if you look in /etc, you're likely to see non system_u files, such as ld.so.cache. The problem is that we don't want ubac constraints on these files. In addition, since there is no run_init on redhat (and possibly other distros) machines, restarted services would get non system_u users, which would also cause problems.

My current implementation is actually more of an allow by default setup, where types are explicitly marked as being ubac constrained. Obviously deny by default would be preferred, but that would require all exempted types to be marked instead. The problem is the number of exempted types far outnumbers the constrained types. I'm open to suggestions on tweaking this design, especially if it gets us a deny by default without the pain of marking most types in the policy as exempted.

Signature · 9 lines
Chris PeBenito
Tresys Technology, LLC
(410) 290-1411 x150


--
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.
#1 lore raw
Quoted 16 lines · Christopher J. PeBenito

For those that are interested, the SELinux user-based separation policy is ready for some initial testing. It can be checked out from the rbacsep branch of the refpolicy SVN repo. Not all of the type aliases are in place for compatibility yet, so switching from an existing policy should be done in permissive.

A question that comes up is how exactly to to determine which types should be constrained by ubac. The obvious answer would seem to be that if the user isn't system_u, then there should be ubac constraints on the access check. But the problem is that creating new files gets your selinux user on files. So if you look in /etc, you're likely to see non system_u files, such as ld.so.cache. The problem is that we don't want ubac constraints on these files. In addition, since there is no run_init on redhat (and possibly other distros) machines, restarted services would get non system_u users, which would also cause problems.

Quoted 7 lines

My current implementation is actually more of an allow by default setup, where types are explicitly marked as being ubac constrained. Obviously deny by default would be preferred, but that would require all exempted types to be marked instead. The problem is the number of exempted types far outnumbers the constrained types. I'm open to suggestions on tweaking this design, especially if it gets us a deny by default without the pain of marking most types in the policy as exempted.

ping

Signature · 9 lines
Chris PeBenito
Tresys Technology, LLC
(410) 290-1411 x150


--
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.
#2 lore raw
In reply to Christopher J. PeBenito
Quoted 16 lines · Christopher J. PeBenito

For those that are interested, the SELinux user-based separation policy is ready for some initial testing. It can be checked out from the rbacsep branch of the refpolicy SVN repo. Not all of the type aliases are in place for compatibility yet, so switching from an existing policy should be done in permissive.

A question that comes up is how exactly to to determine which types should be constrained by ubac. The obvious answer would seem to be that if the user isn't system_u, then there should be ubac constraints on the access check. But the problem is that creating new files gets your selinux user on files. So if you look in /etc, you're likely to see non system_u files, such as ld.so.cache. The problem is that we don't want ubac constraints on these files. In addition, since there is no run_init on redhat (and possibly other distros) machines, restarted services would get non system_u users, which would also cause problems.

Quoted 7 lines

My current implementation is actually more of an allow by default setup, where types are explicitly marked as being ubac constrained. Obviously deny by default would be preferred, but that would require all exempted types to be marked instead. The problem is the number of exempted types far outnumbers the constrained types. I'm open to suggestions on tweaking this design, especially if it gets us a deny by default without the pain of marking most types in the policy as exempted.

ping

This really needs to be tested by people whose projects depend on proper role separations.

Signature · 3 lines
Chris PeBenito
Tresys Technology, LLC
(410) 290-1411 x150
#3 lore raw
In reply to Christopher J. PeBenito
Quoted 16 lines · Christopher J. PeBenito

For those that are interested, the SELinux user-based separation policy is ready for some initial testing. It can be checked out from the rbacsep branch of the refpolicy SVN repo. Not all of the type aliases are in place for compatibility yet, so switching from an existing policy should be done in permissive.

A question that comes up is how exactly to to determine which types should be constrained by ubac. The obvious answer would seem to be that if the user isn't system_u, then there should be ubac constraints on the access check. But the problem is that creating new files gets your selinux user on files. So if you look in /etc, you're likely to see non system_u files, such as ld.so.cache. The problem is that we don't want ubac constraints on these files. In addition, since there is no run_init on redhat (and possibly other distros) machines, restarted services would get non system_u users, which would also cause problems.

Quoted 7 lines

My current implementation is actually more of an allow by default setup, where types are explicitly marked as being ubac constrained. Obviously deny by default would be preferred, but that would require all exempted types to be marked instead. The problem is the number of exempted types far outnumbers the constrained types. I'm open to suggestions on tweaking this design, especially if it gets us a deny by default without the pain of marking most types in the policy as exempted.

ping

This is the last call. I have not heard any comments from the community. User-based separations have finished going through vetting interally at Tresys; I plan to finalize this and then merge it into trunk in the next week or so unless there are any objections raised.

This really needs to be tested by people whose projects depend on proper role separations.

Signature · 3 lines
Chris PeBenito
Tresys Technology, LLC
(410) 290-1411 x150
#4 lore raw
Quoted 2 lines · Christopher J. PeBenito

This really needs to be tested by people whose projects depend on proper role separations.

This is something that interests me, but I will have no time to look at it until after Lenny is released.

Signature · 4 lines
russell at coker.com.au
http://etbe.coker.com.au/          My Blog

http://www.coker.com.au/sponsorship.html Sponsoring Free Software development
#5 lore raw
In reply to Christopher J. PeBenito
Quoted 12 lines · Christopher J. PeBenito

ping

This is the last call. I have not heard any comments from the community. User-based separations have finished going through vetting interally at Tresys; I plan to finalize this and then merge it into trunk in the next week or so unless there are any objections raised.

This really needs to be tested by people whose projects depend on proper role separations.

I had to apply this patch to policy/constraints to get around a build error:

constraints +5 -2
Index: constraints
===================================================================
@@ -81,8 +81,11 @@
 
 constrain process { sigchld sigkill sigstop signull signal ptrace getsched setsched getsession getpgid setpgid getcap setcap share getattr setrlimit }
 (
-	basic_ubac_conditions
-	or t1 == ubacproc
+	ifdef(`enable_ubac',`
+		basic_ubac_conditions
+		or
+	')
+	t1 == ubacproc
 );
 
 constrain process { transition noatsecure siginh rlimitinh }
Signature · 2 lines
Eamon Walsh <[email protected]>
National Security Agency
#6 lore raw
Quoted 22 lines · Eamon Walsh
Quoted 10 lines · Christopher J. PeBenito

ping

This is the last call. I have not heard any comments from the community. User-based separations have finished going through vetting interally at Tresys; I plan to finalize this and then merge it into trunk in the next week or so unless there are any objections raised.

This really needs to be tested by people whose projects depend on proper role separations.

I had to apply this patch to policy/constraints to get around a build error:

Index: constraints
===================================================================

constraints +0 -0
@@ -81,8 +81,11 @@
 
 constrain process { sigchld sigkill sigstop signull signal ptrace getsched setsched getsession getpgid setpgid getcap setcap share getattr setrlimit }
 (

constraints line 91

Quoted 10 lines
constraints +5 -2
-	basic_ubac_conditions
-	or t1 == ubacproc
+	ifdef(`enable_ubac',`
+		basic_ubac_conditions
+		or
+	')
+	t1 == ubacproc
 );
 
 constrain process { transition noatsecure siginh rlimitinh }

I put the whole constraint in the enable_ubac. If UBAC is disabled, we don't want the t1 == ubacproc to still be a constraint.

Signature · 3 lines
Chris PeBenito
Tresys Technology, LLC
(410) 290-1411 x150