Skip to contentSkip to conversation

Latest Diffs

DISCUSSION Daniel J Walsh 4 participants 10 messages Oct 24, 2006 – Nov 17, 2006 SELinux security module

lore
Share & tools
lore
#0 lore raw

http://people.redhat.com/dwalsh/SELinux/policy-20061016.patch

flow_in flow_out changes for labeled networking. Not sure if these are still needed.

Change allow_polyinstatiation into a boolean, since this turns on lots of privs.

Added use_lpd_server boolean to eliminate some not needed permissions from cups versions of lpr commands.

Added a userdom_executable_file type so that we can change the ability to execute all commands in MLS, to only be allowed to execute commands that an admin would legitimately like to execute without transition.

Amands needs additon privs

Anaconds should no longer create bootloader_runtime_t files

Remove commented out lines in bootloader.fc

Xen executed netutils and wants to log output.

prelink signals itself and needs to be able to output to the terminal and fix executables in homedirs.

Redhat's Fedora Extras apd-get and apt-shell run as rpm.

yum-updatesd runs as rpm and communicates over dbus with an applet running mono_t

Need to add rw_faillog to a bunch of domains. Although this might be better in the a global place that handles login apps.

useradd is looking at default context and needs to be able to create home_dir_t.

IBM requests javaws and bin under /opt/ibm/java2-ppc64-50/jre be labeled java_exec_t

iscsi policy ready to merge. You can probably start to role in ricci and cluster code, although I think only Red Hat is shipping this suff so far.

xen has a new device /dev/xen/blktap.*

Avc messages from caused by xsession-errors.log

Hal creats a file in /media directory

Autofs needs to manage symlinks

gfs and gfs2 now support xattrs. encfs from fuse does also. although it is broken.

mv dosfs_t to nfs_t needs to work.

rhgb wants to setattr on a generic devpts_t

Apache scrips want to turn down their priority

httpd needs to be able to rotatelogs

httpd needs to be able to execute bash scripts as cgi.

automount needs to manage non security dirs and handle symlinks. Also wants to open a rawip_socket.

Bluetooth now creates a directory in var as well as files.

Major changes to crontab_t to transition to user_tmp_t. Why do we have a user_crond_t, would just transitioning to user_t make more sense?

crond needs to deal with kernel key ring

multi level cups support

other cups changes

dovecot_auth_t wants to rw utmp

hald needs power management device and manage mnt symlinks for setting up media (ipod)

Additional lpr type commands

nm-applet talks to named pipes of networkmanager

Fixed for oddjob_mkhomedir_t

Lots of fixes to get rhgb_t to work correctly

gssd_t needs to read certs

samba wants to rewrite cups configuration

setroubleshoot wants to look at sched because of threads

spamd needs to read netlink_route_socket

squid wants to rw_tmpfs for diskd mode.

add policy for tallylog

hwclock has a fifo_file and needs to search bin

fsadm_t needs to read up for MLS

getty needs sys_admin

ibm wants all jre libraries and jar files textrel_shlib_t

locallogin keyring support

Auditctl needs aditional privs to look at other parts of the os

mount needs aditional privs

mdadm needs lots more privs

unconfined_t should not transition to so many domains. Causes to many redirection avc messages.

auditadm and secadm need dac_ capabiliies

secadm needs to be able to relabel devices

Additional xen commands and devices

Want to be able to label a fixed_disk_device_t xen_image_t in order to allow xen access to raw 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
Quoted 2 lines · Daniel J Walsh

flow_in flow_out changes for labeled networking. Not sure if these are still needed.

Dropped this since labeled networking is still up in the air.

Quoted 2 lines

Added use_lpd_server boolean to eliminate some not needed permissions from cups versions of lpr commands.

I would rather split out the lpr portions out to a lpr module that would function like the mta module. Then the rules that aren't common for lpd and cups can go into optionals.

Quoted 3 lines

Added a userdom_executable_file type so that we can change the ability to execute all commands in MLS, to only be allowed to execute commands that an admin would legitimately like to execute without transition.

I don't like the implementation of this; the idea of a user executable doesn't make sense to me. It may be better defining this concept in terms of executables an admin wouldn't execute.

In addition, the corecmd_exec_all_executables() change breaks the meaning of the interface.

Quoted 1 line

Redhat's Fedora Extras apd-get and apt-shell run as rpm.

Can't add this because it causes conflicting file contexts if the dpkg module is included.

Dropped mcs_killall(rpm_script_t) and mcs_ptrace_all(rpm_script_t) since it does not have the requisite TE permissions.

Quoted 2 lines

IBM requests javaws and bin under /opt/ibm/java2-ppc64-50/jre be labeled java_exec_t

Dropped the other change; I'm trying to stay away from broad specifications since it makes more problems for sorting.

Quoted 1 line

mv dosfs_t to nfs_t needs to work.

You have fs_associate_tmpfs(noxattrfs), which won't do it. My guess is that you want something like fs_associate_noxattr(noxattrfs).

Quoted 1 line

httpd needs to be able to rotatelogs

The problem with this is that it would allow apache to delete its logs. I suggest trying rotatelogs labeled as logrotate_exec_t instead.

Quoted 2 lines

Major changes to crontab_t to transition to user_tmp_t. Why do we have a user_crond_t, would just transitioning to user_t make more sense?

I don't know the original intention, but my guess is to be a subset of the user domain.

Quoted 1 line

Fixed for oddjob_mkhomedir_t

Why is domain_subj_id_change_exemption(oddjob_t) needed?

Quoted 1 line

squid wants to rw_tmpfs for diskd mode.

I'm wondering if this is tmpfs_t because there is no squid_tmpfs_t+type transition, or if it is because the machine is targeted.

Quoted 1 line

getty needs sys_admin

I find this very questionable, and the bug you mentioned doesn't have any good information.

Why does sasl need compute_av?

What program(s) have a dyntrans from unconfined to unconfined_execmem?

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

http://people.redhat.com/dwalsh/SELinux/policy-20061106.patch.gz

Quoted 8 lines · Christopher J. PeBenito
Quoted 2 lines · Daniel J Walsh

flow_in flow_out changes for labeled networking. Not sure if these are still needed.

Dropped this since labeled networking is still up in the air.

I need to leave it in since I have already released it and any loadable modules that have been created require it.

Quoted 8 lines
Quoted 2 lines

Added use_lpd_server boolean to eliminate some not needed permissions from cups versions of lpr commands.

I would rather split out the lpr portions out to a lpr module that would function like the mta module. Then the rules that aren't common for lpd and cups can go into optionals.

Ok, when that I happens I will switch.

Quoted 8 lines
Quoted 2 lines

Added a userdom_executable_file type so that we can change the ability to execute all commands in MLS, to only be allowed to execute commands that an admin would legitimately like to execute without transition.

I don't like the implementation of this; the idea of a user executable doesn't make sense to me. It may be better defining this concept in terms of executables an admin wouldn't execute.

I am trying to differentiate between executing commands like tools that run in a domain and outside a domain cvs, rsync, rpm from always confined domains.
The requirement for this comes from MLS policy, we want to have a failure when sysadm tries to run a SELinux utility.

So he executes setsebool he gets a exec failure rather then a partial success.

Quoted 11 lines

In addition, the corecmd_exec_all_executables() change breaks the meaning of the interface.

Quoted 2 lines

Redhat's Fedora Extras apd-get and apt-shell run as rpm.

Can't add this because it causes conflicting file contexts if the dpkg module is included.

I think we need a rewrite of the dpkg te file so on redhat platforms dbkg_t is aliased to rpm_t.

Quoted 4 lines

Dropped mcs_killall(rpm_script_t) and mcs_ptrace_all(rpm_script_t) since it does not have the requisite TE permissions.

Since these are unconfined domains, they do have the allows. This prevents the mcs constraint from firing.

Quoted 7 lines
Quoted 2 lines

IBM requests javaws and bin under /opt/ibm/java2-ppc64-50/jre be labeled java_exec_t

Dropped the other change; I'm trying to stay away from broad specifications since it makes more problems for sorting.

Quoted 7 lines
Quoted 2 lines

mv dosfs_t to nfs_t needs to work.

You have fs_associate_tmpfs(noxattrfs), which won't do it. My guess is that you want something like fs_associate_noxattr(noxattrfs).

Yes, changed in this update.

Quoted 7 lines
Quoted 2 lines

httpd needs to be able to rotatelogs

The problem with this is that it would allow apache to delete its logs. I suggest trying rotatelogs labeled as logrotate_exec_t instead.

apache can not delete logs, only httpd_rotatelogs_t can. We could combine the domains together but that would give /usr/sbin/rotatelogs more power, currently it can only touch apache logs.

Quoted 13 lines
Quoted 2 lines

Major changes to crontab_t to transition to user_tmp_t. Why do we have a user_crond_t, would just transitioning to user_t make more sense?

I don't know the original intention, but my guess is to be a subset of the user domain.

Quoted 2 lines

Fixed for oddjob_mkhomedir_t

Why is domain_subj_id_change_exemption(oddjob_t) needed?

oddjob runs jobs on behalf of helper apps, It asks the kernel how to run them.

If I restart oddjob by hand, it will be running as user_u:system_r:oddjob_t

When it asks the kernel what to run jobs on behalf of system_u:system_r:ricci_t, it
gets back system_u:system_r:ricci_modcluster_t, which causes this access violation.

Quoted 6 lines
Quoted 2 lines

squid wants to rw_tmpfs for diskd mode.

I'm wondering if this is tmpfs_t because there is no squid_tmpfs_t+type transition, or if it is because the machine is targeted.

Not sure, this was in the old policy as well. Never used squid.

Quoted 10 lines
Quoted 3 lines

getty needs sys_admin

I find this very questionable, and the bug you mentioned doesn't have any good information.

Why does sasl need compute_av?

I think because it is running through pam and this causes the compute_av

Quoted 3 lines

What program(s) have a dyntrans from unconfined to unconfined_execmem?

on ia32el you need to transition 32 bit apps from unconfined_t to unconfined_execmem_t.

The kernel steps into do this so there is no transition.

============================================================
New changes.

amanda, krb5kdc, postfix_smtp, swat, telnetd, mount - All want to read netlink_route

Broke allo_mount_anyfiles boolean into allow_mount_anydir and allow_mount_anydir, So you can mount at the dir level or a bind_mount

Added boolean to allow daemons to dump core in /.

xen wants to read/write raw disks. Currenly we are allowing this via a boolean. Eventually we want to force users to label devices as xen_image_t. Didn't make it in to RHEL5. :^(

logwatch wants to search sysfs

prelink wants to execute privs on exe's in homedir.

rpm wants to chat with hal

remove big ugly todo at the bottom or rpm.te - They all looked broken.

Broke reserved ports in to hi_reserved_port_t and reserved_port_t, this gives us better security to allow bindresvport, but protect ports 1-511. Current implementation was broken, in that callers to bindresvport were failing on non-defined ports > 512.

Added netsupport, ocsp ports.

New devices

          /dev/hpet
          /dev/kmsg
          /dev/raw1394.* (Bad def)
          /dev/snapshot
          /dev/xvc*

Added aide policy

New apache cache dir
+/var/cache/mod_proxy(/.*)?
gen_context(system_u:object_r:httpd_cache_t,s0)

New rules for apache.

I think crontab policy is good, to go.

cron wants to look at login keys? Might be a leak?

cupsd changes to allow it to run in MLS.

Fix policy for dbus running in chroot under bind.

Hal has a new directory /var/lib/hal

Lots of changes to kerberos to allow it to work with Public Key Infrastructure.

Dontaudit mqueue_spool_t:dir - Talked about in other emails.

Oddjob wants to signal itself.

Procmail using nfs or samba shares

swat needs additional privs

snmp wants to look at homedir. Needs dontaudit

In order to get rhgb and X to work together had to add
+ allow $1 xdm_xserver_t:process siginh;

xdm opens stdout/stderr to an xdmerrors file and then hands that to subprocesses. If the
subprocesses don't reopen stderr/stdout and eventually run a confined domain, the domain will
generate avc messages

Some domains try to lock the wtmp file when they update it.

pam_console reads /var when it is mislabled. This probably could be surrounded by a hide_broken_apps boolean

We don't want mkswap running as fsadm_exec_t. It has SELinux awareness in it, so this causes problems.

A bunch of textrel_shlib_t changes

libraries.te has a useless hide_broken_symptoms

/var/lib/mutlipath directory needs context

We have had requests to allow /var/log to be mounted on.

Many fixes for clvmd and additional lvm_var_lib_t context

Lots of changes for lvm_t, mainly tested with new management platform for Red Hat (ricci, and conga)

New locale directory under /usr/share/X11/locale

depmod needs to be able to delete kernel modules.

mdadm can create physical devices.

selinux utilities needs to be able to create default_context files

initscripts running setsebool need to transition.

newrole needs privs to run pam/login stuff.

realplayer context wrong

Additional unconfined_execmem_exec_t context

oddjob wants to chat with unconfined domain.

fixes for gen_require in userdomain interfaces.

secadm needs to read audit.log, and run aide

More xen changes.

--
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 7 lines · Daniel J Walsh
Quoted 4 lines
Quoted 1 line

Redhat's Fedora Extras apd-get and apt-shell run as rpm.

Can't add this because it causes conflicting file contexts if the dpkg module is included.

I think we need a rewrite of the dpkg te file so on redhat platforms dbkg_t is aliased to rpm_t.

I think it's best if Red Hat compiles just don't include dpkg.te.

Have apt-get and yum run in the same context in Fedora.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

squid wants to rw_tmpfs for diskd mode.

I'm wondering if this is tmpfs_t because there is no squid_tmpfs_t+type transition, or if it is because the machine is targeted.

Not sure, this was in the old policy as well. Never used squid.

I believe that it was a mistake in the Squid policy.

Quoted 1 line

Added boolean to allow daemons to dump core in /.

Some of the fun things this permits include:

Creating a file named /fsckoptions with "-r" or "-N" as the contents (system hang on boot or failure to ever do an automatic fsck).

Creating /.unconfigured (could be good for taking over an Internet terminal machine).

Also as daemons don't have separate types for the core files there is the issue of matching the core files up to the domain that generated them.

Can't you use /proc/sys/kernel/core_pattern to put the core files somewhere else? Preferably somewhere in a mode 700 directory.

Also those files that are generated in the root directory are a bad idea, there should probably be a long term plan to move them elsewhere.

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.
#4 lore raw
Quoted 7 lines · Russell Coker
Quoted 5 lines · Daniel J Walsh
Quoted 5 lines
Quoted 2 lines

Redhat's Fedora Extras apd-get and apt-shell run as rpm.

Can't add this because it causes conflicting file contexts if the dpkg module is included.

Quoted 9 lines
Quoted 3 lines

I think we need a rewrite of the dpkg te file so on redhat platforms dbkg_t is aliased to rpm_t.

I think it's best if Red Hat compiles just don't include dpkg.te.

Have apt-get and yum run in the same context in Fedora.

That is the way it is now, but it is unacceptable to upstream. Chris does not like the conflicting file context.

Quoted 11 lines
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

squid wants to rw_tmpfs for diskd mode.

I'm wondering if this is tmpfs_t because there is no squid_tmpfs_t+type transition, or if it is because the machine is targeted.

Not sure, this was in the old policy as well. Never used squid.

I believe that it was a mistake in the Squid policy.

I have just recently received an AVC requiring it, which is why I put it back.

Quoted 7 lines
Quoted 2 lines

Added boolean to allow daemons to dump core in /.

Some of the fun things this permits include:

Creating a file named /fsckoptions with "-r" or "-N" as the contents (system hang on boot or failure to ever do an automatic fsck).

Quoted 9 lines

Creating /.unconfigured (could be good for taking over an Internet terminal machine).

Also as daemons don't have separate types for the core files there is the issue of matching the core files up to the domain that generated them.

Can't you use /proc/sys/kernel/core_pattern to put the core files somewhere else? Preferably somewhere in a mode 700 directory.

Also those files that are generated in the root directory are a bad idea, there should probably be a long term plan to move them elsewhere.

I am looking into this.

--
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 7 lines · Daniel J Walsh
Quoted 3 lines

I think it's best if Red Hat compiles just don't include dpkg.te.

Have apt-get and yum run in the same context in Fedora.

That is the way it is now, but it is unacceptable to upstream. Chris does not like the conflicting
file context.

There is no conflict if rpm.te and dpkg.te are never included in the same build.

Having a one-line .fc supposed conflict (it's not a conflict if the two .fc files in question are never used at the same time) is much better than massively hacking up an entire .te file.

Quoted 11 lines
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line

squid wants to rw_tmpfs for diskd mode.

I'm wondering if this is tmpfs_t because there is no squid_tmpfs_t+type transition, or if it is because the machine is targeted.

Not sure, this was in the old policy as well. Never used squid.

I believe that it was a mistake in the Squid policy.

I have just recently received an AVC requiring it, which is why I put it back.

Do you have any more information? If the user is doing something odd like using tmpfs for squid backing store then it's not something we want to support in policy in that manner. Maybe we could have restorecon run on the Squid spool directory to cater for the case of using tmpfs for it if people want to do that.

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.
#6 lore raw
Quoted 9 lines · Russell Coker
Quoted 7 lines · Daniel J Walsh
Quoted 3 lines

I think it's best if Red Hat compiles just don't include dpkg.te.

Have apt-get and yum run in the same context in Fedora.

That is the way it is now, but it is unacceptable to upstream. Chris does not like the conflicting
file context.

Quoted 6 lines

There is no conflict if rpm.te and dpkg.te are never included in the same build.

Having a one-line .fc supposed conflict (it's not a conflict if the two .fc files in question are never used at the same time) is much better than massively hacking up an entire .te file.

Any configuration of modules where all dependencies are met should be a valid configuration. Having a file context conflict would make it an invalid configuration.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line

squid wants to rw_tmpfs for diskd mode.

I'm wondering if this is tmpfs_t because there is no squid_tmpfs_t+type transition, or if it is because the machine is targeted.

Not sure, this was in the old policy as well. Never used squid.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

I believe that it was a mistake in the Squid policy.

I have just recently received an AVC requiring it, which is why I put it back.

Do you have any more information? If the user is doing something odd like using tmpfs for squid backing store then it's not something we want to support in policy in that manner.

I don't think I agree with that. If it can be made to work with a squid_tmpfs_t, then why not support it?

Quoted 2 lines

Maybe we could have restorecon run on the Squid spool directory to cater for the case of using tmpfs for it if people want to do that.

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

Having a one-line .fc supposed conflict (it's not a conflict if the two .fc files in question are never used at the same time) is much better than massively hacking up an entire .te file.

Any configuration of modules where all dependencies are met should be a valid configuration. Having a file context conflict would make it an invalid configuration.

Can we add conflicts to modules? Or just deal with this?

Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 1 line

squid wants to rw_tmpfs for diskd mode.

I have just recently received an AVC requiring it, which is why I put it back.

Quoted 6 lines
Quoted 3 lines

Do you have any more information? If the user is doing something odd like using tmpfs for squid backing store then it's not something we want to support in policy in that manner.

I don't think I agree with that. If it can be made to work with a squid_tmpfs_t, then why not support it?

Any directory on the system that contains application data could be replaced by a tmpfs filesystem and require a $1_tmpfs_t type for the least intelligent use. As an example I once ran a MySQL database with a tmpfs for the database store.

The correct solution for such cases is to use either restorecon or a -o context= mount option to give it the expected type. It's worked for me every time I've tried such things.

Quoted 2 lines
Quoted 2 lines

Maybe we could have restorecon run on the Squid spool directory to cater for the case of using tmpfs for it if people want to do that.

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.
#8 lore raw
Quoted 4 lines · Russell Coker

On Friday 17 November 2006 00:49, "Christopher J. PeBenito" <[email protected]> wrote:

Any directory on the system that contains application data could be replaced by a tmpfs filesystem and require a $1_tmpfs_t type for the least intelligent use. As an example I once ran a MySQL database with a tmpfs for the database store.

Eh? Why? MySQL has a memory backed database type, this is an unnecessary layer of indirection.

It makes sense for some apps but not others, why add lots of completely unnecessary policy?

Quoted 5 lines

The correct solution for such cases is to use either restorecon or a -o context= mount option to give it the expected type. It's worked for me every time I've tried such things.

Quoted 2 lines
Quoted 2 lines

Maybe we could have restorecon run on the Squid spool directory to cater for the case of using tmpfs for it if people want to do that.

--
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
Quoted 11 lines · Joshua Brindle
Quoted 7 lines · Russell Coker

On Friday 17 November 2006 00:49, "Christopher J. PeBenito" <[email protected]> wrote:

Any directory on the system that contains application data could be replaced by a tmpfs filesystem and require a $1_tmpfs_t type for the least intelligent use. As an example I once ran a MySQL database with a tmpfs for the database store.

Eh? Why? MySQL has a memory backed database type, this is an unnecessary layer of indirection.

I wanted to prepare a database image for distribution to other people. The database load took ages when used on a disk (due to synchronous writes) but was really fast on a tmpfs. A memory backed database would not have worked as it's not something you can distribute.

Quoted 2 lines

It makes sense for some apps but not others, why add lots of completely unnecessary policy?

I am opposing the addition of the unnecessary policy, which in this case is tmpfs access for squid.

Quoted 6 lines
Quoted 6 lines

The correct solution for such cases is to use either restorecon or a -o context= mount option to give it the expected type. It's worked for me every time I've tried such things.

Quoted 2 lines
Quoted 2 lines

Maybe we could have restorecon run on the Squid spool directory to cater for the case of using tmpfs for it if people want to do that.

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.