Skip to contentSkip to conversation

Latest diffs

DISCUSSION Daniel J Walsh 10 participants 22 messages Sep 20, 2006 – Sep 26, 2006 SELinux security module

lore
Share & tools
lore
#0 lore raw

http://people.redhat.com/dwalsh/SELinux/policy.diff

Changed to allow 1024 categories.

serefpolicy-2.3.14/policy/flask/mkaccess_vector.sh Changes to not output blank lines. Kernel folks don't like blank lines.

I have a request for a boolean to allow all domains to talk to the ttys in targeted policy. This would allow a domain to output errors if their is a failure. Currenly if I screw up my httpd.conf file apache has no easy way of telling me, via the init script.

More changes to amanda paths

Don't transition on grubby. Some one needs to write grubby policy, but it should not be the same as bootloader

+ #https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=202410
+ allow bootloader_t boot_runtime_t:file { rw_file_perms unlink };

+corecmd_etc_runtime_alias(firstboot_rw_t)
Adding a new alias is a pain in reference policy. We need a better way of doing this.

logwatch scans the / directory

new rpm_exec_t executables

su needs to deal with kernel keys

mono needs to be able to be started by initrc, Will need to confine domains we know about in the future.

gnome-pty-helper on 64 bit platforms

Fix files.if interfaces

Add a files_manage_non_secure_dirs for autofs

nfs now uses rpc_pipefs_t:fifo_file

Stop using bluetooth_helper_t

Lots of fixes to make ppp work from network manager with bluetooth

dhcpd speaks dbus

New version of kerberos library checks access to /lib/kerberos/krb5kdc directory

add file_context for /usr/bin/lp

new networkmanager file

ntp needs to talk to unconfined_t for setting date from gnome.

oddjob policy should be added

sendmail should create pid with correct context in targeted policy

small changes to setroubleshootd to eliminate avc messages

xfs needs dac_override

need policy for pcscd any one up for it?

don't transition to su domain in targeted policy

libGL and libfame are moving around

xen has a new log directory

xen needs ptrace

xen needs to read from removable devices

--
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

On Wed, 2006-09-20 at 12:12 -0400, Daniel J Walsh wrote:

I haven't looked at the patch but I have some initial reactions from your description:

Quoted 3 lines

http://people.redhat.com/dwalsh/SELinux/policy.diff

Changed to allow 1024 categories.

Why do we need this many? This isn't even an incremental change up to something like 384 or 512.

Quoted 2 lines

+corecmd_etc_runtime_alias(firstboot_rw_t)
Adding a new alias is a pain in reference policy. We need a better way of doing this.

No. We don't want aliases that cross module boundaries. Otherwise it turns into a way to access other module's types directly instead of through an interface. The ones that cross modules in the policy right now are for compatibility in targeted policy.

Quoted 1 line

ntp needs to talk to unconfined_t for setting date from gnome.

Thats weird, it seems like it would be the other way around.

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
Quoted 6 lines · Christopher J. PeBenito

On Wed, 2006-09-20 at 12:12 -0400, Daniel J Walsh wrote:

I haven't looked at the patch but I have some initial reactions from your description:

Quoted 9 lines
Quoted 4 lines

http://people.redhat.com/dwalsh/SELinux/policy.diff

Changed to allow 1024 categories.

Why do we need this many? This isn't even an incremental change up to something like 384 or 512.

MLS People have past 256 and wanted a big jump to prevent hitting this problem again. I put it in for both to prevent confusion between MCS/MLS

Quoted 9 lines
Quoted 3 lines

+corecmd_etc_runtime_alias(firstboot_rw_t)
Adding a new alias is a pain in reference policy. We need a better way of doing this.

No. We don't want aliases that cross module boundaries. Otherwise it turns into a way to access other module's types directly instead of through an interface. The ones that cross modules in the policy right now are for compatibility in targeted policy.

So how do I get rid of firstboot_rw_t which should be etc_runtime_t?

Quoted 7 lines
Quoted 3 lines

ntp needs to talk to unconfined_t for setting date from gnome.

Thats weird, it seems like it would be the other way around.

I think it is, it is just a chat. The Date GUI code is requesting that the ntp code change the date of the machine.

--
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.

#3 lore raw
Quoted 12 lines · Daniel J Walsh
Quoted 11 lines · Christopher J. PeBenito

On Wed, 2006-09-20 at 12:12 -0400, Daniel J Walsh wrote:

I haven't looked at the patch but I have some initial reactions from your description:

Quoted 4 lines

http://people.redhat.com/dwalsh/SELinux/policy.diff

Changed to allow 1024 categories.

Quoted 6 lines
Quoted 4 lines

Why do we need this many? This isn't even an incremental change up to something like 384 or 512.

MLS People have past 256 and wanted a big jump to prevent hitting this problem again. I put it in for both to prevent confusion between MCS/MLS

Ok, we'll go with 1024, but that's where I draw the line; I consider any higher to be a corner case. Anyone that needs more than that will have to build their own custom policy.

Quoted 10 lines
Quoted 9 lines
Quoted 3 lines

+corecmd_etc_runtime_alias(firstboot_rw_t)
Adding a new alias is a pain in reference policy. We need a better way of doing this.

No. We don't want aliases that cross module boundaries. Otherwise it turns into a way to access other module's types directly instead of through an interface. The ones that cross modules in the policy right now are for compatibility in targeted policy.

So how do I get rid of firstboot_rw_t which should be etc_runtime_t?

Since this is a compat thing due to a type removal, and will eventually be dropped, just put it in files.te.

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.
#4 lore raw
Quoted 17 lines · Christopher J. PeBenito
Quoted 16 lines · Daniel J Walsh
Quoted 15 lines · Christopher J. PeBenito

On Wed, 2006-09-20 at 12:12 -0400, Daniel J Walsh wrote:

I haven't looked at the patch but I have some initial reactions from your description:

Quoted 4 lines

http://people.redhat.com/dwalsh/SELinux/policy.diff

Changed to allow 1024 categories.

Why do we need this many? This isn't even an incremental change up to something like 384 or 512.

Quoted 7 lines
Quoted 2 lines

MLS People have past 256 and wanted a big jump to prevent hitting this problem again. I put it in for both to prevent confusion between MCS/MLS

Ok, we'll go with 1024, but that's where I draw the line; I consider any higher to be a corner case. Anyone that needs more than that will have to build their own custom policy.

We have also discussed reserving category ranges for different purposes
- e.g., categories local to a machine and categories managed across a network. With that usage model higher numbers start looking more reasonable quickly.

What is the objection to the higher numbers of categories? It shouldn't have a large impact on policy size I wouldn't think.

If you are trying to prevent misuse I think that is a losing battle. We should provide tools that can be used reasonably not prevent potentially legitimate uses because some people are clueless.

Karl

--
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.

#5 lore raw
Quoted 31 lines · Karl MacMillan
Quoted 17 lines · Christopher J. PeBenito
Quoted 16 lines · Daniel J Walsh
Quoted 15 lines · Christopher J. PeBenito

On Wed, 2006-09-20 at 12:12 -0400, Daniel J Walsh wrote:

I haven't looked at the patch but I have some initial reactions from your description:

Quoted 4 lines

http://people.redhat.com/dwalsh/SELinux/policy.diff

Changed to allow 1024 categories.

Why do we need this many? This isn't even an incremental change up to something like 384 or 512.

Quoted 7 lines
Quoted 2 lines

MLS People have past 256 and wanted a big jump to prevent hitting this problem again. I put it in for both to prevent confusion between MCS/MLS

Ok, we'll go with 1024, but that's where I draw the line; I consider any higher to be a corner case. Anyone that needs more than that will have to build their own custom policy.

We have also discussed reserving category ranges for different purposes
- e.g., categories local to a machine and categories managed across a network. With that usage model higher numbers start looking more reasonable quickly.

Quoted 6 lines

What is the objection to the higher numbers of categories? It shouldn't have a large impact on policy size I wouldn't think.

If you are trying to prevent misuse I think that is a losing battle. We should provide tools that can be used reasonably not prevent potentially legitimate uses because some people are clueless.

The line has to be drawn somewhere. If you want to argue another number that's fine. I'd prefer setting a max now, rather than bumping categories every few months for every new use of categories.

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

On Wed, 2006-09-20 at 12:12 -0400, Daniel J Walsh wrote:

I haven't looked at the patch but I have some initial reactions from your description:

Quoted 3 lines

http://people.redhat.com/dwalsh/SELinux/policy.diff

Changed to allow 1024 categories.

Why do we need this many? This isn't even an incremental change up to something like 384 or 512.

We have customers that use all of our 1024 categories and want more. They have requested 10,000 categories.

<snip>

Signature · 16 lines
Thanks,
Mike

Mikel L. Matthews
Chief Technology Officer
Innovative Security Systems, Inc.
(dba Argus Systems Group)
1809 Woodfield Dr.
Savoy IL 61874
+1-217-355-6308
www.argus-systems.com

--
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.
#7 lore raw
Quoted 9 lines · Mikel L. Matthews
Quoted 7 lines · Christopher J. PeBenito

On Wed, 2006-09-20 at 12:12 -0400, Daniel J Walsh wrote:

I haven't looked at the patch but I have some initial reactions from your description:

Quoted 2 lines

http://people.redhat.com/dwalsh/SELinux/policy.diff

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Changed to allow 1024 categories.

Why do we need this many? This isn't even an incremental change up to something like 384 or 512.

We have customers that use all of our 1024 categories and want more. They have requested 10,000 categories.

That is because they are probably using categories as an integrity mechanism which is entirely inappropriate for SELinux since TE should be used for integrity and mls should only be used for confidentiality. I seriously doubt that a reasonable system could have 10000 useful categories.

I don't think this change should be made to the refpolicy policy without a good justification, saying "MLS people want it" isn't good, its possible that they are also misusing categories.

--
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.

#8 lore raw

Once it is in the customers hands, they use it as they feel they need to. It is not always the way we, as developers/designers, intended.

Quoted 31 lines · Joshua Brindle
Quoted 6 lines · Mikel L. Matthews
Quoted 5 lines · Christopher J. PeBenito

On Wed, 2006-09-20 at 12:12 -0400, Daniel J Walsh wrote:

I haven't looked at the patch but I have some initial reactions from your description:

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

http://people.redhat.com/dwalsh/SELinux/policy.diff

Changed to allow 1024 categories.

Why do we need this many? This isn't even an incremental change up to something like 384 or 512.

We have customers that use all of our 1024 categories and want more. They have requested 10,000 categories.

That is because they are probably using categories as an integrity mechanism which is entirely inappropriate for SELinux since TE should be used for integrity and mls should only be used for confidentiality. I seriously doubt that a reasonable system could have 10000 useful categories.

I don't think this change should be made to the refpolicy policy without a good justification, saying "MLS people want it" isn't good, its possible that they are also misusing categories.

--
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.

Signature · 16 lines
Thanks,
Mike

Mikel L. Matthews
Chief Technology Officer
Innovative Security Systems, Inc.
(dba Argus Systems Group)
1809 Woodfield Dr.
Savoy IL 61874
+1-217-355-6308
www.argus-systems.com

--
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.
#9 lore raw
In reply to Joshua Brindle
Quoted 19 lines · Joshua Brindle
Quoted 9 lines · Mikel L. Matthews
Quoted 7 lines · Christopher J. PeBenito

On Wed, 2006-09-20 at 12:12 -0400, Daniel J Walsh wrote:

I haven't looked at the patch but I have some initial reactions from your description:

Quoted 2 lines

http://people.redhat.com/dwalsh/SELinux/policy.diff

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Changed to allow 1024 categories.

Why do we need this many? This isn't even an incremental change up to something like 384 or 512.

We have customers that use all of our 1024 categories and want more. They have requested 10,000 categories.

Quoted 5 lines

That is because they are probably using categories as an integrity mechanism which is entirely inappropriate for SELinux since TE should be used for integrity and mls should only be used for confidentiality. I seriously doubt that a reasonable system could have 10000 useful categories.

More like "one category assigned per project, never to be re-used". For confidentiality, not integrity.

Signature · 8 lines
Stephen Smalley
National Security Agency


--
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.
#10 lore raw
In reply to Joshua Brindle
Quoted 4 lines · Joshua Brindle
Quoted 3 lines · Mikel L. Matthews

We have customers that use all of our 1024 categories and want more. They have requested 10,000 categories.

Wow, and I though I was out on the fringes :) Admin must be ugly.

Quoted 5 lines

That is because they are probably using categories as an integrity mechanism which is entirely inappropriate for SELinux since TE should be used for integrity and mls should only be used for confidentiality. I seriously doubt that a reasonable system could have 10000 useful categories.

I can't comment on 10K, but 256 is not enough. Imagine a system that exchanges data with countries, alliances and has dissemination controls and compartments local to the country the system is in. There are ~243 countries in ISO 3166, there are between 10 and 20 alliances you might want to exchange data with, there are another dozen common dissemination controls (eg NOFORN) and there are quite a few compartments. You can get over 300 bits pretty easily just using bits for confidentiality.

I'm happy with 1024 because it means we will not have to maintain policy diffs (for this) and explain them to our accreditors.

joe

http://en.wikipedia.org/wiki/ISO_3166-1_alpha-3
http://www.afei.org/news/ddms.pdf (Table C4.T1)
http://metadata.dod.mil/mdr/irs/DDMS/

--
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.

#11 lore raw
In reply to Joshua Brindle
Quoted 3 lines · Joshua Brindle

I don't think this change should be made to the refpolicy policy without a good justification, saying "MLS people want it" isn't good, its possible that they are also misusing categories.

A fairly typical usage scenario in government use seems to be to have one category per country plus several for treaty groups or other groups of countries (NATO, AXIS_OF_EVIL, or whatever). This alone can exceed the current 256 categories. Since categories generally aren't reusable (old data should keep its original category set), you want to have a significant margin for expansion.

The main reason why this would be painful to do as a local site modifications is that many users who want a MLS system also want to be running a Common Criteria LSPP evaluated system, and the evaluated configuration restrictions generally require running the shipped policy and not a modified one. Since the change requires completely rebuilding the policy (as opposed to just adding a module) such a change is unlikely to be acceptable to them.

-Klaus

--
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.

#12 lore raw
In reply to Joshua Brindle
Quoted 5 lines · --- Joshua Brindle
Quoted 1 line

We have customers that use all of our 1024

categories and want more.

Quoted 2 lines

They have requested 10,000 categories.

Quoted 9 lines

That is because they are probably using categories as an integrity
mechanism which is entirely inappropriate for SELinux since TE should be
used for integrity and mls should only be used for confidentiality. I
seriously doubt that a reasonable system could have 10000 useful
categories.

If y'all don't support on the order of 10,000
categories I know of potential users (they may
be the same ones refered to initially) who
use a category for each "project", which is
perfectly reasonable, never reuse categories
because many "projects" have extended lifetimes
(sometimes decades), and have many projects
start every month. This is correct usage of
MLS categories. These people have been MLS
users since the Reagan administration because
it gives them what they want.

Casey Schaufler
[email protected]

--
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.

#13 lore raw
In reply to Daniel J Walsh
Quoted 3 lines · Daniel J Walsh

http://people.redhat.com/dwalsh/SELinux/policy.diff

Changed to allow 1024 categories.

Not adding this yet. Waiting for concensus on how high we should go.

Quoted 3 lines

I have a request for a boolean to allow all domains to talk to the ttys in targeted policy. This would allow a domain to output errors if their is a failure. Currenly if I screw up my httpd.conf file apache has no easy way of telling me, via the init script.

This sounds like it should be for daemons rather than all domains.

Quoted 1 line

Don't transition on grubby. Some one needs to write grubby policy, but it should not be the same as bootloader

Dropping the types for now, until someone writes the policy.

Review

Quoted 2 lines
(quoted diff) +2 -0
+	#https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=202410
+	allow bootloader_t boot_runtime_t:file { rw_file_perms unlink };

This bug information is lacking. Since it doesn't make sense for grub itself to write its own stage files, I did some deeper looking. My guess is that grub-install is being run, and that it is inappropriately being labeled as bootloader_exec_t. I'm not very familiar with grubby, but I suspect that grub-install should also be bootloader_helper_t.

Quoted 1 line

Add a files_manage_non_secure_dirs for autofs

This seems suspect.

Quoted 1 line

nfs now uses rpc_pipefs_t:fifo_file

Moved this interface up in filesystem. Moved the call into the rpc template.

Quoted 1 line

Stop using bluetooth_helper_t

Why?

Quoted 1 line

dhcpd speaks dbus

Moved this hunk up.

Quoted 1 line

oddjob policy should be added

Why are there two modules? It seems like they should be merged.

Quoted 1 line

sendmail should create pid with correct context in targeted policy

Moved this block up.

Quoted 5 lines

xen has a new log directory

xen needs ptrace

xen needs to read from removable devices

* There is a removal in corenetwork.te.m4 that you reversed.

* What is the /opt/fortitude stuff in apache?

* xserver_create_ice_tmp_sockets() does not have any callers.

* I don't agree with the selinuxutil change to allow strict semanage_t to read user files. This is an insecure source for policy packages.

* The unconfined.te change confuses me; unconfined should already have these perms.

* I fixed up a change in amanda.fc, since it had a m4 internal function call (index(/.*)), which made the match not what you thought it was.

On a side note, I looked at the bug noted in the fstools change, and the user pasted this bit:

*** An error occurred during the file system check. *** Dropping you to a shell; the system will reboot *** when you leave the shell.
*** Warning -- SELinux is active
*** Disabling security enforcement for system recovery. *** Run 'setenforce 1' to reenable.
Give root password for maintenance
(or type Control-D to continue):

SELinux being in enforcing shouldn't be a warning, if anything it should be a notice. "Warning" has a negative spin (at least it does to me).

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.
#14 lore raw
Quoted 10 lines · Christopher J. PeBenito
Quoted 4 lines · Daniel J Walsh

http://people.redhat.com/dwalsh/SELinux/policy.diff

Changed to allow 1024 categories.

Not adding this yet. Waiting for concensus on how high we should go.

Ok, any way we could make this a constant defined in the Makefile?

TOTAL_CATS=1024, MAX_CAT=c1023

Quoted 6 lines
Quoted 2 lines

I have a request for a boolean to allow all domains to talk to the ttys in targeted policy. This would allow a domain to output errors if their is a failure. Currenly if I screw up my httpd.conf file apache has no easy way of telling me, via the init script.

This sounds like it should be for daemons rather than all domains.

Changed to use daemon

Quoted 6 lines
Quoted 2 lines

Don't transition on grubby. Some one needs to write grubby policy, but it should not be the same as bootloader

Dropping the types for now, until someone writes the policy.

Changed spec to be only /sbin/grub, eliminate /sbin/grub-install

Quoted 5 lines

Review

Quoted 3 lines
(quoted diff) +2 -0
+	#https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=202410
+	allow bootloader_t boot_runtime_t:file { rw_file_perms unlink };

Removed

Quoted 7 lines

This bug information is lacking. Since it doesn't make sense for grub itself to write its own stage files, I did some deeper looking. My guess is that grub-install is being run, and that it is inappropriately being labeled as bootloader_exec_t. I'm not very familiar with grubby, but I suspect that grub-install should also be bootloader_helper_t.

Quoted 6 lines
Quoted 2 lines

Add a files_manage_non_secure_dirs for autofs

This seems suspect.

Autofs creates a file/directory in every directory it mounts over.

Quoted 6 lines
Quoted 2 lines

nfs now uses rpc_pipefs_t:fifo_file

Moved this interface up in filesystem. Moved the call into the rpc template.

Good

Quoted 7 lines
Quoted 3 lines

Stop using bluetooth_helper_t

Why?

Two many bugs and it is confining userspace with X-Windows.

Quoted 12 lines
Quoted 2 lines

dhcpd speaks dbus

Moved this hunk up.

Quoted 2 lines

oddjob policy should be added

Why are there two modules? It seems like they should be merged.

Ok

Quoted 9 lines
Quoted 2 lines

sendmail should create pid with correct context in targeted policy

Moved this block up.

Quoted 2 lines

xen has a new log directory

Quoted 9 lines
Quoted 4 lines

xen needs ptrace

xen needs to read from removable devices

* There is a removal in corenetwork.te.m4 that you reversed.

Sorry looks ok now

Quoted 3 lines

* What is the /opt/fortitude stuff in apache?

It is a new Red Hat product for government use, I believe.

Quoted 5 lines

* xserver_create_ice_tmp_sockets() does not have any callers.

* I don't agree with the selinuxutil change to allow strict semanage_t to read user files. This is an insecure source for policy packages.

semanage has to be able to read sysadm_home_t and sysadm_tmp_t for strict policy and
for MLS you would need secadm_tmp_t, The question is where would the admin likely put his
loadable policy modules.

Quoted 4 lines

* The unconfined.te change confuses me; unconfined should already have these perms.

Removed

Quoted 15 lines

* I fixed up a change in amanda.fc, since it had a m4 internal function call (index(/.*)), which made the match not what you thought it was.

On a side note, I looked at the bug noted in the fstools change, and the user pasted this bit:

*** An error occurred during the file system check. *** Dropping you to a shell; the system will reboot *** when you leave the shell.
*** Warning -- SELinux is active
*** Disabling security enforcement for system recovery. *** Run 'setenforce 1' to reenable.
Give root password for maintenance
(or type Control-D to continue):

Quoted 4 lines

SELinux being in enforcing shouldn't be a warning, if anything it should be a notice. "Warning" has a negative spin (at least it does to me).

The warning is that SELinux is being disabled. So maybe the warning should drop down one line.

Additional Changes in this updated patch

http://people.redhat.com/dwalsh/SELinux/policy.diff

Added staff_u to

readahead needs mls_read_up priv, donaudit looking at nvram

http has a new port 8443 for use with mod_nss

fsdaemon_exec_t needs to run at SystemHigh to be able to look at fixed disks

/dev/rawctl is labeled as a fixed_disk_device_t even though it is a chr_file. Not sure if this is correct.

automount uses rawip_socket

ndc has to read named_conf_t lnk_file in chroot environment

hal needs to touch unallocated ttys in order to see if anydevice is on the serial port, I don't think this is just a targeted policy issue.

nscd needs to be accessable from sysadm_r.

nscd needs to read etc_runtime_t, for files created in firstboot

These are the same files (Hard Links)
/usr/lib/postfix/smtp -- gen_context(system_u:object_r:postfix_smtp_exec_t,s0)
+/usr/lib/postfix/lmtp -- gen_context(system_u:object_r:postfix_smtp_exec_t,s0)

make smartmon work on mls machines

sshd needs to deal with kernel keyring

udev generates avc when it pidof all processes

need a userdom_use_unpriv_users_ttys so sysadm_t can write to all users terminals when system is going down.

auditadm and secadm need to be able to messages to syslog

secadm terminals are not admin_terminals.

--
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.

#15 lore raw
Quoted 5 lines · Daniel J Walsh
Quoted 4 lines · Christopher J. PeBenito
Quoted 2 lines · Daniel J Walsh

http://people.redhat.com/dwalsh/SELinux/policy.diff

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Changed to allow 1024 categories.

Not adding this yet. Waiting for concensus on how high we should go.

Ok, any way we could make this a constant defined in the Makefile?

TOTAL_CATS=1024, MAX_CAT=c1023

This was suggested to me by others; it seems like a reasonable compromise. I'll probably make build options for the number of MLS and MCS categories, and the number of MLS sensitivities.

Quoted 5 lines
Quoted 4 lines
Quoted 1 line

Add a files_manage_non_secure_dirs for autofs

This seems suspect.

Autofs creates a file/directory in every directory it mounts over.

But why does it do this?

Also, the other change sounds suspect since it can't do any rawip send or receive:

Quoted 7 lines

automount uses rawip_socket

Quoted 4 lines
Quoted 1 line

Stop using bluetooth_helper_t

Why?

Two many bugs and it is confining userspace with X-Windows.

I assume you're referring to targeted, in which case, the transition should be removed from unconfined_t, not the label from the file.

Quoted 1 line
Quoted 1 line
Quoted 1 line

oddjob policy should be added

/usr/lib/oddjobd gen_context(system_u:object_r:oddjob_var_lib_t,s0)

Is this right? Not /var/lib/oddjobd since its oddjob_var_lib_t?

Quoted 3 lines
Quoted 2 lines

* What is the /opt/fortitude stuff in apache?

It is a new Red Hat product for government use, I believe.

I'm not sure this should upstreamed in that case.

Quoted 1 line

readahead needs mls_read_up priv, donaudit looking at nvram

The second part seems weird since there already is:

dev_getattr_all_chr_files(readahead_t)

Quoted 1 line

fsdaemon_exec_t needs to run at SystemHigh to be able to look at fixed disks

Holding off on this one until the range_transitions work in modules, which should hopefully be very soon. Also, why not just do mls_read_up instead?

Quoted 2 lines

/dev/rawctl is labeled as a fixed_disk_device_t even though it is a chr_file. Not sure if this is correct.

According to drivers/char/raw.c:

* Front-end raw character devices. These can be bound to any block
* devices to provide genuine Unix raw character device semantics. *
* We reserve minor number 0 for a control interface. ioctl()s on this
* device are used to bind the other minor numbers to block devices.

So it sounds like we need two types, one for the control device and one for raw1, etc.

Quoted 1 line

nscd needs to be accessable from sysadm_r.

I think there may be another way to fix this. I looked back at the direct_sysadm_daemon stuff, and I realized that there are two parts to this. The first is the role transition to allow sysadm_t to restart services without using run_init. The second allows sysadm_t to start up daemons by directly executing them. Right now they're both controlled by the DIRECT_INITRC build option.

So the question is, do we still want the second part? If so, it should be separated into its own build option or tunable.

I understand that usermod restarts nscd; its too bad it can't just signal nscd to clear its cache rather than doing something broken like this.

Quoted 2 lines

need a userdom_use_unpriv_users_ttys so sysadm_t can write to all users terminals when system is going down.

Moved this change down.

Quoted 1 line

auditadm and secadm need to be able to messages to syslog

* moved firstboot_rw_t alias to files.

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.
#16 lore raw
Quoted 26 lines · Christopher J. PeBenito
Quoted 7 lines · Daniel J Walsh
Quoted 5 lines · Christopher J. PeBenito
Quoted 2 lines · Daniel J Walsh

http://people.redhat.com/dwalsh/SELinux/policy.diff

Quoted 9 lines
Quoted 5 lines
Quoted 2 lines

Changed to allow 1024 categories.

Not adding this yet. Waiting for concensus on how high we should go.

Ok, any way we could make this a constant defined in the Makefile?

TOTAL_CATS=1024, MAX_CAT=c1023

This was suggested to me by others; it seems like a reasonable compromise. I'll probably make build options for the number of MLS and MCS categories, and the number of MLS sensitivities.

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Add a files_manage_non_secure_dirs for autofs

Quoted 9 lines
Quoted 5 lines
Quoted 3 lines

This seems suspect.

Autofs creates a file/directory in every directory it mounts over.

But why does it do this?

Taken off list to get an answer from autofs package maintainer, will post answer.

Quoted 10 lines

Also, the other change sounds suspect since it can't do any rawip send or receive:

Quoted 6 lines

automount uses rawip_socket

Quoted 2 lines
Quoted 2 lines

Stop using bluetooth_helper_t

Quoted 10 lines
Quoted 5 lines
Quoted 3 lines

Why?

Two many bugs and it is confining userspace with X-Windows.

I assume you're referring to targeted, in which case, the transition should be removed from unconfined_t, not the label from the file.

Yes although I think it will not work well in strict, but we can remove the transition.

Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

oddjob policy should be added

/usr/lib/oddjobd gen_context(system_u:object_r:oddjob_var_lib_t,s0)

Is this right? Not /var/lib/oddjobd since its oddjob_var_lib_t?

Yes this should be eliminated. Not needed.

Quoted 10 lines
Quoted 6 lines
Quoted 4 lines

* What is the /opt/fortitude stuff in apache?

It is a new Red Hat product for government use, I believe.

I'm not sure this should upstreamed in that case.

Fine.

Quoted 8 lines
Quoted 2 lines

readahead needs mls_read_up priv, donaudit looking at nvram

The second part seems weird since there already is:

dev_getattr_all_chr_files(readahead_t)

Your right this would be fixes by mls_read_up.

Quoted 8 lines
Quoted 2 lines

fsdaemon_exec_t needs to run at SystemHigh to be able to look at fixed disks

Holding off on this one until the range_transitions work in modules, which should hopefully be very soon. Also, why not just do mls_read_up instead?

I will try that.

Quoted 25 lines
Quoted 2 lines

/dev/rawctl is labeled as a fixed_disk_device_t even though it is a chr_file. Not sure if this is correct.

According to drivers/char/raw.c:

* Front-end raw character devices. These can be bound to any block
* devices to provide genuine Unix raw character device semantics. *
* We reserve minor number 0 for a control interface. ioctl()s on this
* device are used to bind the other minor numbers to block devices.

So it sounds like we need two types, one for the control device and one for raw1, etc.

Quoted 2 lines

nscd needs to be accessable from sysadm_r.

I think there may be another way to fix this. I looked back at the direct_sysadm_daemon stuff, and I realized that there are two parts to this. The first is the role transition to allow sysadm_t to restart services without using run_init. The second allows sysadm_t to start up daemons by directly executing them. Right now they're both controlled by the DIRECT_INITRC build option.

Quoted 8 lines

So the question is, do we still want the second part? If so, it should be separated into its own build option or tunable.

I understand that usermod restarts nscd; its too bad it can't just signal nscd to clear its cache rather than doing something broken like this.

This is a similar problem to rpm. Where sysadm_r is required access to all domains that could be run in a rpm scriptlet. Currently I require mls people to run rpm with run_init to get it to work correctly.

Quoted 12 lines
Quoted 2 lines

need a userdom_use_unpriv_users_ttys so sysadm_t can write to all users terminals when system is going down.

Moved this change down.

Quoted 2 lines

auditadm and secadm need to be able to messages to syslog

* moved firstboot_rw_t alias to files.

--
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.

#17 lore raw
In reply to Christopher J. PeBenito
Quoted 5 lines · Christopher J. PeBenito
Quoted 2 lines

/dev/rawctl is labeled as a fixed_disk_device_t even though it is a chr_file.  Not sure if this is correct.

According to drivers/char/raw.c:

Quoted 8 lines

 * Front-end raw character devices.  These can be bound to any block
 * devices to provide genuine Unix raw character device semantics. *
 * We reserve minor number 0 for a control interface.  ioctl()s on this
 * device are used to bind the other minor numbers to block devices.

So it sounds like we need two types, one for the control device and one for raw1, etc.

What is the benefit of having an additional type?

fixed_disk_device_t determines access to fixed disks. If there is a control device that controls fixed disks then surely the same type is appropriate.

Signature · 10 lines
[email protected]
http://etbe.blogspot.com/          My Blog

http://www.coker.com.au/sponsorship.html Sponsoring Free Software development


--
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.
#18 lore raw
Quoted 13 lines · Russell Coker
Quoted 11 lines · Christopher J. PeBenito
Quoted 2 lines

/dev/rawctl is labeled as a fixed_disk_device_t even though it is a chr_file. Not sure if this is correct.

According to drivers/char/raw.c:

* Front-end raw character devices. These can be bound to any block
* devices to provide genuine Unix raw character device semantics. *
* We reserve minor number 0 for a control interface. ioctl()s on this
* device are used to bind the other minor numbers to block devices.

Quoted 7 lines
Quoted 2 lines

So it sounds like we need two types, one for the control device and one for raw1, etc.

What is the benefit of having an additional type?

fixed_disk_device_t determines access to fixed disks. If there is a control device that controls fixed disks then surely the same type is appropriate.

Its not just fixed disks, its any block device. Its just like scsi_generic_t, which could be another option rather than a new type.

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.
#19 lore raw
Quoted 11 lines · Christopher J. PeBenito
Quoted 8 lines
Quoted 2 lines

So it sounds like we need two types, one for the control device and one for raw1, etc.

What is the benefit of having an additional type?

fixed_disk_device_t determines access to fixed disks. If there is a control device that controls fixed disks then surely the same type is appropriate.

Its not just fixed disks, its any block device. Its just like scsi_generic_t, which could be another option rather than a new type.

Are you trying to cater for the case of raw access to removable_device_t or raw access to tape_device_t?

Currently either we only have three types for block devices or I messed up a grep command very badly.

Signature · 9 lines
[email protected]
http://etbe.blogspot.com/          My Blog

http://www.coker.com.au/sponsorship.html Sponsoring Free Software development

--
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.
#20 lore raw
Quoted 11 lines · Russell Coker
Quoted 9 lines · Christopher J. PeBenito
Quoted 8 lines
Quoted 2 lines

So it sounds like we need two types, one for the control device and one for raw1, etc.

What is the benefit of having an additional type?

fixed_disk_device_t determines access to fixed disks. If there is a control device that controls fixed disks then surely the same type is appropriate.

Quoted 5 lines
Quoted 2 lines

Its not just fixed disks, its any block device. Its just like scsi_generic_t, which could be another option rather than a new type.

Are you trying to cater for the case of raw access to removable_device_t or raw access to tape_device_t?

Yes. I understand that fixed disks are the common case; however, I also don't want to mix block and char devices, since it doesn't make sense for the general case of /dev/hda, etc.

Quoted 2 lines

Currently either we only have three types for block devices or I messed up a grep command very badly.

You are correct. They are all in storage.te.

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.
#21 lore raw
In reply to Christopher J. PeBenito
Quoted 6 lines · Christopher J. PeBenito
Quoted 3 lines · Daniel J Walsh

http://people.redhat.com/dwalsh/SELinux/policy.diff

Changed to allow 1024 categories.

Not adding this yet. Waiting for concensus on how high we should go.

I think that the only solution for this is to allow semanage to configure it.

If you have 10,000 categories and a system that is run for 20 years that never re-uses categories (as previously described) then you have the scope for 41 categories per month. Assuming 20 working days per month that's two categories per day.

I find it easy to imagine organizations that are large enough to have two new projects started per day.

Based on the information in Casey's email I think you could justify 64K categories, or whatever the upper limit might be.

It seems to me that the ideal solution would be to default to 256 categories for regular users and allow people who need it to reconfigure their system for more.

Signature · 9 lines
[email protected]
http://etbe.blogspot.com/          My Blog

http://www.coker.com.au/sponsorship.html Sponsoring Free Software development

--
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.