Skip to contentSkip to conversation

/tmp and others

DISCUSSION Ed Street 3 participants 4 messages Jul 4, 2002 – Jul 8, 2002 SELinux security module

lore
Share & tools
lore

Ed Street

author
#0 lore raw

Hello,

I'm curious as to how Selinux deals with /tmp issues like exploits. Also how does Selinux deal with stack exploits and /proc exploits?

Ed

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

#1 lore raw
Quoted 1 line · Ed Street

I'm curious as to how Selinux deals with /tmp issues like exploits.

As a general rule each domain that creates files in /tmp uses a different type (user_tmp_t for user_t domain and sysadm_tmp_t for sysadm_t domain). So the only race condition that you are vulnerable to in a typical configuration is that of having the system administrator follow a sym-link created by a user. But this could be fixed by a different policy (and I may do this in my default policy).

There was a question about this issue at my presentation for OLS.

Quoted 1 line

Also how does Selinux deal with stack exploits and /proc exploits?

It doesn't do anything with stack exploits, you should be able to get one of the stack protection mechanisms going in addition to it, but I've never really tried.

As for /proc exploits, what exactly do you mean?

Signature · 3 lines
I do not get viruses because I do not use MS software.
If you use Outlook then please do not put my email address in your
address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line

From field.

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

author
#2 lore raw

Hello,

Ah. For the /proc exploits I do recall reading about some but don't remember the names. I do know some rootkits use /proc.

Ed

-----Original Message-----
From: Russell Coker [mailto:[email protected]]
Sent: Thursday, July 04, 2002 9:39 PM
To: [email protected]; Selinux
Subject: Re: /tmp and others

Quoted 1 line · Ed Street

I'm curious as to how Selinux deals with /tmp issues like exploits.

As a general rule each domain that creates files in /tmp uses a different
type (user_tmp_t for user_t domain and sysadm_tmp_t for sysadm_t domain). So
the only race condition that you are vulnerable to in a typical configuration
is that of having the system administrator follow a sym-link created by a
user. But this could be fixed by a different policy (and I may do this in my
default policy).

There was a question about this issue at my presentation for OLS.

Quoted 1 line

Also how does Selinux deal with stack exploits and /proc exploits?

It doesn't do anything with stack exploits, you should be able to get one of
the stack protection mechanisms going in addition to it, but I've never really tried.

As for /proc exploits, what exactly do you mean?

Signature · 3 lines
I do not get viruses because I do not use MS software.
If you use Outlook then please do not put my email address in your
address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line

From field.

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

#3 lore raw
In reply to Ed Street
Quoted 2 lines · Ed Street

I'm curious as to how Selinux deals with /tmp issues like exploits. Also how does Selinux deal with stack exploits and /proc exploits?

SELinux isn't exploit-specific. It provides a general mechanism for confining processes to least privilege. This can be applied in many different ways. For /tmp files, you can use SELinux to provide rigorous separation of temporary files created by different domains through the use of file type transition rules. For buffer overflows, you can use SELinux to confine each system service (e.g. apache, sendmail, etc) to only accessing the objects and services required for its job so that exploits are strictly confined. For /proc, you can use the SELinux file access controls to limit access to only authorized domains. Keep in mind that the Linux root user has no special privileges with respect to the SELinux access controls.

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