Skip to contentSkip to conversation

kernel_files.patch

refpolicy Daniel J Walsh 3 participants 7 messages Feb 23, 2010 – Mar 8, 2010

lore
Share & tools
lore
#1 lore raw
Quoted 5 lines · Daniel J Walsh

http://people.fedoraproject.org/~dwalsh/SELinux/F13/kernel_files.patch

New file context

Lots of new interfaces

* need explanation as to why boot_t would be a device node.
* need additional explanation as to the purpose of system_conf_t.
* the files_relabel_all_files() change is still rejected, since block and chr files should have regular file types.
* the the files-delete_isid_type_files() additions need their own interfaces instead.
* same thing for files_delete_usr_files()
* the files_read_usr_files() change is excessive
* files_search_var_log() is wrong, var_log_t doesn't belong to the files module. There is already an equivalent interface in logging.
* the concept of files_dump_core() is wrong. Applications do core dumps in the current directory, and services just happen to "cd /" at the start. It doesn't make sense for other domains.
* files_create_default_dir() needs to be 2 interfaces.
* I don't even know what to make of files_boot().

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

http://people.fedoraproject.org/~dwalsh/SELinux/F13/kernel_files.patch

New file context

Lots of new interfaces

[...]

Quoted 2 lines

* the files_relabel_all_files() change is still rejected, since block and chr files should have regular file types.

That is, they should *not* have regular file types.

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

http://people.fedoraproject.org/~dwalsh/SELinux/F13/kernel_files.patch

New file context

Lots of new interfaces

* need explanation as to why boot_t would be a device node.

I can't find why. Might be some bizarro ia64 type machine. I will remove and see if it comes back

Quoted 2 lines

* need additional explanation as to the purpose of system_conf_t.

Miroslav has this one. It has to do with system-config-firewall.

Quoted 3 lines

* the files_relabel_all_files() change is still rejected, since block and chr files should have regular file types.

This one comes about because of mkinitd being run by rpm in post installs. Which does not happen any longer but I do not see what the benifit of turning this off.
We have several tools like mock, liveusb_creator, kernel make etc that are going to create blk_files
and chr_files in places like /tmp that might run a cp -p or some other tool that is going to try to relabel.

Quoted 3 lines

* the the files-delete_isid_type_files() additions need their own interfaces instead.

Fixed

Quoted 2 lines

* same thing for files_delete_usr_files()

Removed

Quoted 2 lines

* the files_read_usr_files() change is excessive

Ok can we remove src_t altogether then. It just seems to cause bugs and I see no reason for this label.

It's only reason for being is to create AVC messages. ./policy/modules/services/networkmanager.te:files_read_usr_src_files(NetworkManager_t) ./policy/modules/services/virt.te:files_read_usr_src_files(virtd_t) ./policy/modules/system/userdomain.if:
files_read_usr_src_files($1_usertype)
./policy/modules/system/userdomain.if: files_exec_usr_src_files($1_t)
./policy/modules/system/modutils.te:files_read_usr_src_files(depmod_t) ./policy/modules/system/modutils.te:
files_getattr_usr_src_files(update_modules_t)
./policy/modules/kernel/files.if: files_read_usr_src_files($1)
./policy/modules/kernel/files.if:interface(files_getattr_usr_src_files', ./policy/modules/kernel/files.if:interface(files_read_usr_src_files', ./policy/modules/kernel/files.if:interface(files_exec_usr_src_files', ./policy/modules/admin/bootloader.te:files_read_usr_src_files(bootloader_t)
./policy/modules/admin/portage.if: files_exec_usr_src_files($1)

Only one of these you might care about is portage.if, if that is the case then I will eliminate the label from RedHat labeling.

Quoted 3 lines

* files_search_var_log() is wrong, var_log_t doesn't belong to the files module. There is already an equivalent interface in logging.

Removed

Quoted 4 lines

* the concept of files_dump_core() is wrong. Applications do core dumps in the current directory, and services just happen to "cd /" at the start. It doesn't make sense for other domains.

Fine I need a domain for creating files in the / directory which I can then allow daemon to do.
Do you want to call this files_manage_root?

Quoted 2 lines

* files_create_default_dir() needs to be 2 interfaces.

Added files_root_filetrans_default

Quoted 3 lines

* I don't even know what to make of files_boot().

I think this is caused by early boot of the kernel, /dev/ gets labeled boot_t until it gets relabeled in the initrc scripts. Might not exist any longer with the move to dracut.

I will remove and see what happens.

Most people run an unconfined_domain(kernel_t) anyways.

#4 lore raw
Quoted 103 lines · Daniel J Walsh
Quoted 13 lines · Christopher J. PeBenito
Quoted 7 lines · Daniel J Walsh

http://people.fedoraproject.org/~dwalsh/SELinux/F13/kernel_files.patch

New file context

Lots of new interfaces

* need explanation as to why boot_t would be a device node.

I can't find why. Might be some bizarro ia64 type machine. I will remove and see if it comes back

Quoted 3 lines

* need additional explanation as to the purpose of system_conf_t.

Miroslav has this one. It has to do with system-config-firewall.

Quoted 4 lines

* the files_relabel_all_files() change is still rejected, since block and chr files should have regular file types.

This one comes about because of mkinitd being run by rpm in post installs. Which does not happen any longer but I do not see what the benifit of turning this off.
We have several tools like mock, liveusb_creator, kernel make etc that are going to create blk_files
and chr_files in places like /tmp that might run a cp -p or some other tool that is going to try to relabel.

Quoted 4 lines

* the the files-delete_isid_type_files() additions need their own interfaces instead.

Fixed

Quoted 3 lines

* same thing for files_delete_usr_files()

Removed

Quoted 3 lines

* the files_read_usr_files() change is excessive

Ok can we remove src_t altogether then. It just seems to cause bugs and I see no reason for this label.

It's only reason for being is to create AVC messages. ./policy/modules/services/networkmanager.te:files_read_usr_src_files(NetworkManager_t) ./policy/modules/services/virt.te:files_read_usr_src_files(virtd_t) ./policy/modules/system/userdomain.if:
files_read_usr_src_files($1_usertype)
./policy/modules/system/userdomain.if: files_exec_usr_src_files($1_t)
./policy/modules/system/modutils.te:files_read_usr_src_files(depmod_t) ./policy/modules/system/modutils.te:
files_getattr_usr_src_files(update_modules_t)
./policy/modules/kernel/files.if: files_read_usr_src_files($1)
./policy/modules/kernel/files.if:interface(files_getattr_usr_src_files', ./policy/modules/kernel/files.if:interface(files_read_usr_src_files', ./policy/modules/kernel/files.if:interface(files_exec_usr_src_files', ./policy/modules/admin/bootloader.te:files_read_usr_src_files(bootloader_t)
./policy/modules/admin/portage.if: files_exec_usr_src_files($1)

Only one of these you might care about is portage.if, if that is the case then I will eliminate the label from RedHat labeling.

Quoted 4 lines

* files_search_var_log() is wrong, var_log_t doesn't belong to the files module. There is already an equivalent interface in logging.

Removed

Quoted 5 lines

* the concept of files_dump_core() is wrong. Applications do core dumps in the current directory, and services just happen to "cd /" at the start. It doesn't make sense for other domains.

Fine I need a domain for creating files in the / directory which I can then allow daemon to do.
Do you want to call this files_manage_root?

Quoted 3 lines

* files_create_default_dir() needs to be 2 interfaces.

Added files_root_filetrans_default

Quoted 4 lines

* I don't even know what to make of files_boot().

I think this is caused by early boot of the kernel, /dev/ gets labeled boot_t until it gets relabeled in the initrc scripts. Might not exist any longer with the move to dracut.

Quoted 9 lines

I will remove and see what happens.

Most people run an unconfined_domain(kernel_t) anyways.

_______________________________________________
refpolicy mailing list
refpolicy at oss.tresys.com
http://oss.tresys.com/mailman/listinfo/refpolicy

Is this more to your liking?
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: kernel_files.patch
Url: http://oss.tresys.com/pipermail/refpolicy/attachments/20100305/da553dc2/attachment-0001.pl

#5 lore raw
Quoted 10 lines · Daniel J Walsh
Quoted 9 lines · Daniel J Walsh
Quoted 8 lines · Christopher J. PeBenito
Quoted 6 lines · Daniel J Walsh

http://people.fedoraproject.org/~dwalsh/SELinux/F13/kernel_files.patch

New file context

Lots of new interfaces

Quoted 8 lines
Quoted 8 lines
Quoted 2 lines

* need explanation as to why boot_t would be a device node.

I can't find why. Might be some bizarro ia64 type machine. I will remove and see if it comes back

Quoted 2 lines

* need additional explanation as to the purpose of system_conf_t.

Miroslav has this one. It has to do with system-config-firewall.

Yes, it is related with the s-c-firewall which writes to the sysctl.conf file (to enable masquerading ) and creates the sysctl.conf.old file. But s-c-firewall creates also 'iptables.conf.old' under /etc directory.

So we came up with a new type system_conf_t to solve this issue.

Quoted 78 lines
Quoted 70 lines
Quoted 3 lines

* the files_relabel_all_files() change is still rejected, since block and chr files should have regular file types.

This one comes about because of mkinitd being run by rpm in post installs.
Which does not happen any longer but I do not see what the benifit of turning this off.
We have several tools like mock, liveusb_creator, kernel make etc that are going to create blk_files
and chr_files in places like /tmp that might run a cp -p or some other tool that is going to try to relabel.

Quoted 3 lines

* the the files-delete_isid_type_files() additions need their own interfaces instead.

Fixed

Quoted 2 lines

* same thing for files_delete_usr_files()

Removed

Quoted 2 lines

* the files_read_usr_files() change is excessive

Ok can we remove src_t altogether then. It just seems to cause bugs and I see no reason for this label.

It's only reason for being is to create AVC messages. ./policy/modules/services/networkmanager.te:files_read_usr_src_files(NetworkManager_t)

./policy/modules/services/virt.te:files_read_usr_src_files(virtd_t) ./policy/modules/system/userdomain.if:
files_read_usr_src_files($1_usertype)
./policy/modules/system/userdomain.if: files_exec_usr_src_files($1_t)
./policy/modules/system/modutils.te:files_read_usr_src_files(depmod_t) ./policy/modules/system/modutils.te:
files_getattr_usr_src_files(update_modules_t)
./policy/modules/kernel/files.if: files_read_usr_src_files($1)
./policy/modules/kernel/files.if:interface(files_getattr_usr_src_files',

./policy/modules/kernel/files.if:interface(files_read_usr_src_files', ./policy/modules/kernel/files.if:interface(files_exec_usr_src_files', ./policy/modules/admin/bootloader.te:files_read_usr_src_files(bootloader_t)

./policy/modules/admin/portage.if: files_exec_usr_src_files($1)

Only one of these you might care about is portage.if, if that is the case then I will eliminate the label from RedHat labeling.

Quoted 4 lines

* files_search_var_log() is wrong, var_log_t doesn't belong to the files
module. There is already an equivalent interface in logging.

Removed

Quoted 5 lines

* the concept of files_dump_core() is wrong. Applications do core dumps
in the current directory, and services just happen to "cd /" at the start. It doesn't make sense for other domains.

Fine I need a domain for creating files in the / directory which I can then allow daemon to do.
Do you want to call this files_manage_root?

Quoted 2 lines

* files_create_default_dir() needs to be 2 interfaces.

Added files_root_filetrans_default

Quoted 3 lines

* I don't even know what to make of files_boot().

I think this is caused by early boot of the kernel, /dev/ gets labeled boot_t until it gets relabeled in the initrc scripts. Might not exist any longer with the move to dracut.

Quoted 8 lines

I will remove and see what happens.

Most people run an unconfined_domain(kernel_t) anyways.

_______________________________________________
refpolicy mailing list
refpolicy at oss.tresys.com
http://oss.tresys.com/mailman/listinfo/refpolicy

Quoted 8 lines

Is this more to your liking?

_______________________________________________
refpolicy mailing list
refpolicy at oss.tresys.com
http://oss.tresys.com/mailman/listinfo/refpolicy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.tresys.com/pipermail/refpolicy/attachments/20100308/ae4bb83b/attachment.html

#6 lore raw
In reply to Daniel J Walsh
Quoted 26 lines · Daniel J Walsh
Quoted 6 lines · Christopher J. PeBenito
Quoted 1 line · Daniel J Walsh

http://people.fedoraproject.org/~dwalsh/SELinux/F13/kernel_files.patch

* the files_read_usr_files() change is excessive

Ok can we remove src_t altogether then. It just seems to cause bugs and I see no reason for this label.

It's only reason for being is to create AVC messages. ./policy/modules/services/networkmanager.te:files_read_usr_src_files(NetworkManager_t) ./policy/modules/services/virt.te:files_read_usr_src_files(virtd_t) ./policy/modules/system/userdomain.if:
files_read_usr_src_files($1_usertype)
./policy/modules/system/userdomain.if: files_exec_usr_src_files($1_t)
./policy/modules/system/modutils.te:files_read_usr_src_files(depmod_t) ./policy/modules/system/modutils.te:
files_getattr_usr_src_files(update_modules_t)
./policy/modules/kernel/files.if: files_read_usr_src_files($1)
./policy/modules/kernel/files.if:interface(files_getattr_usr_src_files', ./policy/modules/kernel/files.if:interface(files_read_usr_src_files', ./policy/modules/kernel/files.if:interface(files_exec_usr_src_files', ./policy/modules/admin/bootloader.te:files_read_usr_src_files(bootloader_t)
./policy/modules/admin/portage.if: files_exec_usr_src_files($1)

Quoted 2 lines

Only one of these you might care about is portage.if, if that is the case then I will eliminate the label from RedHat labeling.

The only reason I can think of is to separate kernel sources out from usr_t. Domains that can write to usr_t shouldn't necessarily be able to write to the kernel sources.

Quoted 7 lines
Quoted 4 lines

* the concept of files_dump_core() is wrong. Applications do core dumps in the current directory, and services just happen to "cd /" at the start. It doesn't make sense for other domains.

Fine I need a domain for creating files in the / directory which I can then allow daemon to do.
Do you want to call this files_manage_root?

files_manage_root_files().

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