Skip to contentSkip to conversation

security files - why not sysadmfile

DISCUSSION Ivan Gyurdiev 3 participants 7 messages Feb 27, 2005 – Mar 1, 2005 SELinux security module

lore
Share & tools
lore
#0 lore raw

Why are those types not marked sysadmfile? This is particularly annoying when vi spits out error messages every time I edit a selinux source file.

#

# security_t is the target type when checking
# the permissions in the security class.  It is also
# applied to selinuxfs inodes.
#
type security_t, fs_type;

#

# policy_config_t is the type of /etc/security/selinux/*
# the security server policy configuration.
#
type policy_config_t, file_type;

#

# policy_src_t is the type of the policy source
# files.
#
type policy_src_t, file_type;
Signature · 8 lines
Ivan Gyurdiev <[email protected]>
Cornell University


--
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 3 lines · Ivan Gyurdiev

Why are those types not marked sysadmfile? This is particularly annoying when vi spits out error messages every time I edit a selinux source file.

The goal is to ultimately remove direct access to many file types by sysadm_t, and only allow permissions to specific programs when run by sysadm_t. That reduces your risk of accidental corruption by the admin and of intentional corruption or leakage by malicious code unwittingly run by the admin. In particular, protecting the policy in this manner is important.

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.
#2 lore raw
Quoted 11 lines · Stephen Smalley
Quoted 3 lines · Ivan Gyurdiev

Why are those types not marked sysadmfile? This is particularly annoying when vi spits out error messages every time I edit a selinux source file.

The goal is to ultimately remove direct access to many file types by sysadm_t, and only allow permissions to specific programs when run by sysadm_t. That reduces your risk of accidental corruption by the admin and of intentional corruption or leakage by malicious code unwittingly run by the admin. In particular, protecting the policy in this manner is important.

...what's stopping malicious code ran as sysadm from turning off selinux, then doing whatever it wants?

Quoted 1 line
Signature · 8 lines
Ivan Gyurdiev <[email protected]>
Cornell University


--
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 2 lines · Ivan Gyurdiev

...what's stopping malicious code ran as sysadm from turning off selinux, then doing whatever it wants?

That is another example of where we want permissions migrated from sysadm_t to specific program domains, where said programs are further expected to use a trusted path mechanism to verify intent with the user to avoid malicious invocation.

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.
#4 lore raw
In reply to Stephen Smalley
Quoted 11 lines · Stephen Smalley
Quoted 3 lines · Ivan Gyurdiev

Why are those types not marked sysadmfile? This is particularly annoying when vi spits out error messages every time I edit a selinux source file.

The goal is to ultimately remove direct access to many file types by sysadm_t, and only allow permissions to specific programs when run by sysadm_t. That reduces your risk of accidental corruption by the admin and of intentional corruption or leakage by malicious code unwittingly run by the admin. In particular, protecting the policy in this manner is important.

So, what's the proper way for a user to edit policy source files (which is the purpose of the selinux-sources package) without running into denials.

Quoted 1 line
Signature · 8 lines
Ivan Gyurdiev <[email protected]>
Cornell University


--
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 3 lines · Ivan Gyurdiev

So, what's the proper way for a user to edit policy source files (which is the purpose of the selinux-sources package) without running into denials.

The ultimate goal is that they won't have to do that.
In the absence of the necessary policy infrastructure (for which Tresys Technology is developing components), possibly it makes sense to assign sysadmfile to the policy file types for now. security_t is only for selinuxfs and shouldn't be assigned to any file edited by a user anyway, so there is no reason to make it sysadmfile.

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.
#6 lore raw
In reply to Ivan Gyurdiev
Quoted 3 lines · Ivan Gyurdiev

So, what's the proper way for a user to edit policy source files (which is the purpose of the selinux-sources package) without running into denials.

how about a similar approach to vipw?

--
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.