Skip to contentSkip to conversation

uses_shlib() and device_t

DISCUSSION Russell Coker 2 participants 2 messages Apr 18, 2003 SELinux security module

lore
Share & tools
lore
#0 lore raw

In my tree I have just changed the uses_shlib() macro to include:
allow $1 device_t:dir search;

The rationale is that the macro allows access to null_device_t and it is almost always necessary to allow search access on the directory to actually open /dev/null (and it is necessary for the mmap /dev/null operations that shared libraries use).

I decided to do this after adding a huge number of allow rules for device_t:dir search as part of the process of removing every_domain().

Steve, please let me know what you think of this. If you think it's worthy of inclusion in the CVS then I'll go through my policy tree and remove all the redundant rules from the various .te files.

Signature · 10 lines
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page


--
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 10 lines · Russell Coker

In my tree I have just changed the uses_shlib() macro to include:
allow $1 device_t:dir search;

The rationale is that the macro allows access to null_device_t and it is almost always necessary to allow search access on the directory to actually open /dev/null (and it is necessary for the mmap /dev/null operations that shared libraries use).

I decided to do this after adding a huge number of allow rules for device_t:dir search as part of the process of removing every_domain().

This seems to be justified, but we do want to keep uses_shlib as minimal as possible because most domains include it for dynamically linked programs, which can lead to unexpected potential data flows among domains. Thanks.

Signature · 8 lines
Stephen Smalley <[email protected]>
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.