Skip to contentSkip to conversation

default_context file

DISCUSSION Carsten Grohmann 2 participants 4 messages Nov 3, 2002 – Nov 4, 2002 SELinux security module

lore
Share & tools
lore
#0 lore raw

Hi,

I've don't understand the new default_context file. Could anybody explain it? I understand the entries for login and ssh, but the line for the crond I to stupid.
The crond can use both partial context (user_r:user_crond_t and system_r:system_crond_t) but I don't unterstand the selection mechanism.

Thanks

Carsten

--
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 5 lines · Carsten Grohmann

I've don't understand the new default_context file. Could anybody explain it? I understand the entries for login and ssh, but the line for the crond I to stupid.
The crond can use both partial context (user_r:user_crond_t and system_r:system_crond_t) but I don't unterstand the selection mechanism.

Actually the new setup for cron seems less capable than the old.

For example in the old setup I could setup an account bofh to have context bofh:user_r:user_crond_t for cron even though that user may be authorised for multiple roles.

If a hostile user manages to create a crontab file for the user then under the old system the cron job just wouldn't be run because it would be in the wrong context. Under the new system the cron job would be run under the UID of the victim user but with the security context of the attacking user, if the attacking user is not permitted to change UID then this can give access to the UID of the victim user which may allow undesired access.

So I think that the new system is easier to setup, but offers less control.

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.
#2 lore raw

That's clear, but I give the crond two partial context. But I don't understand who select crond the right context for the acutell user. Try crond the first partial context for the user and after it failed the next and so on?

Quoted 30 lines · Carsten Grohmann
Quoted 1 line

I've don't understand the new default_context file. Could anybody

explain

Quoted 1 line

it? I understand the entries for login and ssh, but the line for the

crond

Quoted 3 lines

I to stupid.
The crond can use both partial context (user_r:user_crond_t and system_r:system_crond_t) but I don't unterstand the selection mechanism.

Actually the new setup for cron seems less capable than the old.

For example in the old setup I could setup an account bofh to have context

bofh:user_r:user_crond_t for cron even though that user may be authorised for
multiple roles.

If a hostile user manages to create a crontab file for the user then under the
old system the cron job just wouldn't be run because it would be in the wrong
context. Under the new system the cron job would be run under the UID of the
victim user but with the security context of the attacking user, if the attacking user is not permitted to change UID then this can give access to

the UID of the victim user which may allow undesired access.

So I think that the new system is easier to setup, but offers less control.

Signature · 8 lines
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!


--
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 4 lines · On Mon, 4 Nov 2002 09:48, [email protected] wrote:

That's clear, but I give the crond two partial context. But I don't understand who select crond the right context for the acutell user. Try crond the first partial context for the user and after it failed the next and so on?

The type of the file used to store the user's crontab will be uniquely determined by the domain that they are using when they run the "crontab -e" command. There should be only one context that will match that file type defined in the policy database.

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.