Skip to contentSkip to conversation

SELinux fresh out of the box problems...

DISCUSSION Warren Lerner 2 participants 2 messages Jul 2, 2002 SELinux security module

lore
Share & tools
lore
#0 lore raw

I have recently done a fresh install of Red Hat 7.2. At the conclusion of this install, I did a fresh install of SELinux utilizing the "make quickinstall" method. After installation, I reboot and receive many AVC messages. Here is a small sample:

kernel: avc: denied { execute } for pid=1 exe=/sbin/init
path=/lib/i686/libc-2.2.5.so dev=03:42 ino=737295 scontext=system_u:system_r:init_t tcontext=system_u:object_r:writeable_t tclass=file
kernel:
kernel: avc: denied { write } for pid=1 exe=/sbin/init dev=00:08 ino=1 scontext=system_u:system_r:init_t tcontext=system_u:object_r:devfs_t tclass=dir
kernel:
kernel: avc: denied { add_name } for pid=1 exe=/sbin/init path=/initctl scontext=system_u:system_r:init_t tcontext=system_u:object_r:devfs_t tclass=dir
kernel:
kernel: avc: denied { create } for pid=1 exe=/sbin/init path=/initctl scontext=system_u:system_r:init_t tcontext=system_u:object_r:devfs_t tclass=fifo_file
kernel:
kernel: avc: denied { read write } for pid=1 exe=/sbin/init path=/initctl dev=00:08 ino=434 scontext=system_u:system_r:init_t tcontext=system_u:object_r:devfs_t tclass=fifo_file
kernel:
kernel: avc: denied { getattr } for pid=1 exe=/sbin/init path=/initctl dev=00:08 ino=434 scontext=system_u:system_r:init_t tcontext=system_u:object_r:devfs_t tclass=fifo_file
kernel:
kernel: avc: denied { execute } for pid=11 exe=/sbin/init path=/lib/ld-2.2.5.so dev=03:42 ino=1067699 scontext=system_u:system_r:init_t tcontext=system_u:object_r:file_t tclass=file
kernel:
kernel: avc: denied { execute } for pid=11 exe=/bin/bash path=/lib/i686/libc-2.2.5.so dev=03:42 ino=737295 scontext=system_u:system_r:initrc_t tcontext=system_u:object_r:writeable_t tclass=file

These messages are received after executing the "avc_toggle". I made no modifications to any SELinux files. SELinux seems to generate many AVC messages right out of the box, so to speak.

Here is what I would like to know:

1. Can I install SELiunx with no modifications do an avc_toggle and have a working system?
2. Why do I receive AVC messages from SELinux before I have done an avc_toggle?
3. Is there a basic policy available for download that addresses the
"average" user's security needs?
4. Is there a GUI available for policy.conf modification that makes understanding the file easier?
5. What is the minimum that must be done in order to have SELinux function as intended?

Thank you for your time and consideration

Signature · 6 lines
Warren D. Lerner
Associate
Zeta Associates
10302 Eaton Place, Suite 500
Fairfax, Virginia 22030
(703)-279-5387
#1 lore raw
Quoted 9 lines · Warren Lerner

I have recently done a fresh install of Red Hat 7.2. At the conclusion of this install, I did a fresh install of SELinux utilizing the "make quickinstall" method. After installation, I reboot and receive many AVC messages. Here is a small sample:

kernel: avc: denied { execute } for pid=1 exe=/sbin/init
path=/lib/i686/libc-2.2.5.so dev=03:42 ino=737295 scontext=system_u:system_r:init_t tcontext=system_u:object_r:writeable_t tclass=file

This file clearly has the wrong type, writeable_t instead of shlib_t. I'm not sure why this would have happened. Try running 'make relabel' and then run ls --context on the file again to see whether it still has this type.

Quoted 3 lines

kernel: avc: denied { write } for pid=1 exe=/sbin/init dev=00:08 ino=1 scontext=system_u:system_r:init_t tcontext=system_u:object_r:devfs_t tclass=dir

We don't use devfs ourselves, so the example policy configuration is very incomplete with respect to supporting devfs usage. We have been merging many of Russell Coker's changes back into the example policy for future releases, and these changes will help with devfs support since he seems to be using devfs. Feel free to submit patches to devfs_contexts and to the TE configuration to improve support for devfs. At least some of the audit messages you posted have already been addressed by Russell's changes.

Quoted 2 lines

1. Can I install SELiunx with no modifications do an avc_toggle and have a working system?

If the example policy happens to cover all of the services that you want to run and meets your security goals, then yes. Otherwise, no. The example policy is only intended to help demonstrate the system and to provide people with a starting point for developing their own policies.

Quoted 2 lines

2. Why do I receive AVC messages from SELinux before I have done an avc_toggle?

Read the README. As it states, the module will log permission failures but not enforce them while in permissive mode (i.e. before running avc_toggle). This allows you to determine what additional permissions are needed for your system and to update your policy accordingly.

Quoted 2 lines

3. Is there a basic policy available for download that addresses the
"average" user's security needs?

Define "average" user.

Quoted 2 lines

4. Is there a GUI available for policy.conf modification that makes understanding the file easier?

Not within the upstream SELinux distribution. However, Tresys has developed some tools (see http://www.tresys.com/selinux) that operate on policy.conf, and UNT has developed a TE browser
(http://cops.csci.unt.edu/projects/selinux) that operates on the binary policy.

Please be sure to read the Configuring the SELinux Policy report, which is available in the distribution and from the web site.

Quoted 2 lines

5. What is the minimum that must be done in order to have SELinux function as intended?

"as intended"? By whom?

--
Stephen D. Smalley, NAI Labs
[email protected]

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.