Skip to contentSkip to conversation

kernel_filesystem.patch

refpolicy Daniel J Walsh 4 participants 9 messages Feb 23, 2010 – Mar 22, 2010

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

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

Changes for handling leaks

Handling fusefs and hugetlbfs, cgroups

I'm confused by this:

+files_type(hugetlbfs_t)
+files_poly_parent(hugetlbfs_t)

If its a filesystem, its not a regular file.

Quoted 2 lines

gpfs file system
devtmpfs file system

I'm thinking that perhaps devtmpfs should be moved to devices and use device_t, since thats its only purpose.

Fixed fs_dontaudit_read_nfs_symlinks() (it was allowing instead of dontauditing).

Otherwise merged, with some rearrangement.

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

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

Changes for handling leaks

Handling fusefs and hugetlbfs, cgroups

I'm confused by this:

(quoted diff) +2 -0
+files_type(hugetlbfs_t)
+files_poly_parent(hugetlbfs_t)
Quoted 3 lines

If its a filesystem, its not a regular file.

Looks like a cut and paste error.

Quoted 7 lines
Quoted 3 lines

gpfs file system
devtmpfs file system

I'm thinking that perhaps devtmpfs should be moved to devices and use device_t, since thats its only purpose.

Sounds good to me.

Will this work?

fs_use_trans devtmpfs gen_context(system_u:object_r:device_t,s0);

Quoted 6 lines

Fixed fs_dontaudit_read_nfs_symlinks() (it was allowing instead of dontauditing).

Otherwise merged, with some rearrangement.

Thanks.

#3 lore raw
Quoted 8 lines · Daniel J Walsh
Quoted 7 lines · Christopher J. PeBenito
Quoted 2 lines · Daniel J Walsh

devtmpfs file system

I'm thinking that perhaps devtmpfs should be moved to devices and use device_t, since thats its only purpose.

Quoted 5 lines

Sounds good to me.

Will this work?

fs_use_trans devtmpfs gen_context(system_u:object_r:device_t,s0);

I don't have a system with devtmpfs, so I can't be sure, but I would think it would work. That line would go in the devices module.

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

devtmpfs file system

I'm thinking that perhaps devtmpfs should be moved to devices and use device_t, since thats its only purpose.

Quoted 8 lines
Quoted 5 lines

Sounds good to me.

Will this work?

fs_use_trans devtmpfs gen_context(system_u:object_r:device_t,s0);

I don't have a system with devtmpfs, so I can't be sure, but I would think it would work. That line would go in the devices module.

Yes that works i can confirm that.

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

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20100313/689ab977/attachment.bin

#5 lore raw
In reply to Christopher J. PeBenito
Quoted 9 lines · Christopher J. PeBenito
Quoted 8 lines · Daniel J Walsh
Quoted 7 lines · Christopher J. PeBenito
Quoted 2 lines · Daniel J Walsh

devtmpfs file system

I'm thinking that perhaps devtmpfs should be moved to devices and use device_t, since thats its only purpose.

Quoted 8 lines
Quoted 5 lines

Sounds good to me.

Will this work?

fs_use_trans devtmpfs gen_context(system_u:object_r:device_t,s0);

I don't have a system with devtmpfs, so I can't be sure, but I would think it would work. That line would go in the devices module.

Although we might get some of these:

allow devlog_t device_t:filesystem associate;
allow tty_device_t device_t:filesystem associate;

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

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20100313/72db90f3/attachment.bin

#6 lore raw
Quoted 16 lines · Dominick Grift
Quoted 15 lines · Christopher J. PeBenito
Quoted 13 lines · Daniel J Walsh
Quoted 7 lines · Christopher J. PeBenito
Quoted 2 lines · Daniel J Walsh

devtmpfs file system

I'm thinking that perhaps devtmpfs should be moved to devices and use device_t, since thats its only purpose.

Sounds good to me.

Will this work?

fs_use_trans devtmpfs gen_context(system_u:object_r:device_t,s0);

Quoted 7 lines
Quoted 2 lines

I don't have a system with devtmpfs, so I can't be sure, but I would think it would work. That line would go in the devices module.

Although we might get some of these:

allow devlog_t device_t:filesystem associate;
allow tty_device_t device_t:filesystem associate;

Thats easy enough to fix, just put this in devices.te:

allow device_node device_t:filesystem associate;

along with something similar in dev_filetrans(). Thanks for testing it out.

Signature · 7 lines
Chris PeBenito
<[email protected]>
Developer,
Hardened Gentoo Linux
 
Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE6AF9243
Key fingerprint = B0E6 877A 883F A57A 8E6A  CB00 BC8E E42D E6AF 9243
#7 lore raw
Quoted 25 lines · Chris PeBenito
Quoted 16 lines · Dominick Grift
Quoted 15 lines · Christopher J. PeBenito
Quoted 13 lines · Daniel J Walsh
Quoted 7 lines · Christopher J. PeBenito
Quoted 2 lines · Daniel J Walsh

devtmpfs file system

I'm thinking that perhaps devtmpfs should be moved to devices and use device_t, since thats its only purpose.

Sounds good to me.

Will this work?

fs_use_trans devtmpfs gen_context(system_u:object_r:device_t,s0);

Quoted 7 lines
Quoted 2 lines

I don't have a system with devtmpfs, so I can't be sure, but I would think it would work. That line would go in the devices module.

Although we might get some of these:

allow devlog_t device_t:filesystem associate;
allow tty_device_t device_t:filesystem associate;

Quoted 6 lines

Thats easy enough to fix, just put this in devices.te:

allow device_node device_t:filesystem associate;

along with something similar in dev_filetrans(). Thanks for testing it out.

I was wrong. It works in permissive mode but as soon as i boot in enforcing mode things stop working and i have no clue as to why.

Quoted 10 lines
Signature · 8 lines
-- 
Chris PeBenito
<[email protected]>
Developer,
Hardened Gentoo Linux
 
Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE6AF9243
Key fingerprint = B0E6 877A 883F A57A 8E6A  CB00 BC8E E42D E6AF 9243

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20100320/8b27e069/attachment.bin

#8 lore raw
Quoted 34 lines · Dominick Grift
Quoted 32 lines · Chris PeBenito
Quoted 30 lines · Dominick Grift
Quoted 14 lines · Christopher J. PeBenito
Quoted 12 lines · Daniel J Walsh
Quoted 10 lines · Christopher J. PeBenito
Quoted 3 lines · Daniel J Walsh

devtmpfs file system

I'm thinking that perhaps devtmpfs should be moved to devices and use device_t, since thats its only purpose.

Quoted 9 lines
Quoted 6 lines

Sounds good to me.

Will this work?

fs_use_trans devtmpfs gen_context(system_u:object_r:device_t,s0);

I don't have a system with devtmpfs, so I can't be sure, but I would think it would work. That line would go in the devices module.

Although we might get some of these:

allow devlog_t device_t:filesystem associate;
allow tty_device_t device_t:filesystem associate;

Quoted 10 lines
Quoted 7 lines

Thats easy enough to fix, just put this in devices.te:

allow device_node device_t:filesystem associate;

along with something similar in dev_filetrans(). Thanks for testing it out.

I was wrong. It works in permissive mode but as soon as i boot in enforcing mode things stop working and i have no clue as to why.

I started on this but pulled back when I had too many problems. I think we can work on this in F14, We need to identify what kind of files can be associated with a device_t file system. And then set up the rules.