Skip to contentSkip to conversation

uml policy

DISCUSSION Tom 2 participants 8 messages Sep 12, 2002 – Sep 13, 2002 SELinux security module

lore
Share & tools
lore

Tom

author
#0 lore raw

During Linux Kongress, I had a little chat with Russell about uml (user-mode-linux) on top of SELinux (for now, I'll leave the mindboggling involved with SE-UML-Linux to someone else :) ).

I've found out that uml runs fine as a standard userspace process (i.e. as it was intendend) with the default policy. So getting it simply to run is already done.

I plan to spend some time on running uml in it's own domain, with minimal rights and auto-trans into it when you fire it up. I'm announcing this so anyone else working on something similiar can yell and we don't need to do redundant work.

Signature · 8 lines
http://web.lemuria.org/pubkey.html
pub  1024D/2D7A04F5 2002-05-16 Tom Vogt <[email protected]>
     Key fingerprint = C731 64D1 4BCF 4C20 48A4  29B2 BF01 9FA1 2D7A 04F5

--
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 4 lines · Tom

During Linux Kongress, I had a little chat with Russell about uml (user-mode-linux) on top of SELinux (for now, I'll leave the mindboggling involved with SE-UML-Linux to someone else :) ).

Quoted 8 lines

I've found out that uml runs fine as a standard userspace process (i.e. as it was intendend) with the default policy. So getting it simply to run is already done.

I plan to spend some time on running uml in it's own domain, with minimal rights and auto-trans into it when you fire it up. I'm announcing this so anyone else working on something similiar can yell and we don't need to do redundant work.

Go for it!

I suggest looking at my IRC domain for an example of how to do it. Also you have to make sure that the user can change the type of the file to/from the type you choose for the UML kernel.

Also I suggest having two types for the kernel, one per-user (IE user_uml_kernel_t etc) and one for the system (maybe system_uml_kernel_t).

Also for the data store, make sure that you define access for a directory too, so that the UML program domain doesn't even get access to user_home_dir_t or user_home_t directories.

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.

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

author
#2 lore raw
Quoted 3 lines · Russell Coker

I suggest looking at my IRC domain for an example of how to do it. Also you have to make sure that the user can change the type of the file to/from the type you choose for the UML kernel.

Yes, that will be needed, especially for COW files.

Quoted 2 lines

Also I suggest having two types for the kernel, one per-user (IE user_uml_kernel_t etc) and one for the system (maybe system_uml_kernel_t).

Actually, I think I don't want the system to run uml. Except in a run_init way. And I definitely don't want root/sysadm_r to run it. Hey, ever seen permissions 007 ? :)

Quoted 3 lines

Also for the data store, make sure that you define access for a directory too, so that the UML program domain doesn't even get access to user_home_dir_t or user_home_t directories.

I was planning to borrow some ideas from your chroot domain, and set things up very close to that. I will also need an interesting type for the keystroke logger files.

Signature · 8 lines
http://web.lemuria.org/pubkey.html
pub  1024D/2D7A04F5 2002-05-16 Tom Vogt <[email protected]>
     Key fingerprint = C731 64D1 4BCF 4C20 48A4  29B2 BF01 9FA1 2D7A 04F5

--
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 6 lines · Tom
Quoted 3 lines · Russell Coker

I suggest looking at my IRC domain for an example of how to do it. Also you have to make sure that the user can change the type of the file to/from the type you choose for the UML kernel.

Yes, that will be needed, especially for COW files.

NB You need separate types for the kernel and the disk image. The kernel should not be writable...

Quoted 7 lines
Quoted 3 lines

Also I suggest having two types for the kernel, one per-user (IE user_uml_kernel_t etc) and one for the system (maybe system_uml_kernel_t).

Actually, I think I don't want the system to run uml. Except in a run_init way. And I definitely don't want root/sysadm_r to run it. Hey, ever seen permissions 007 ? :)

You possibly don't want the system to run it (but that is debatable), however you certainly want to be able to install a kernel as the administrator and have regular users execute it.

Quoted 7 lines
Quoted 3 lines

Also for the data store, make sure that you define access for a directory too, so that the UML program domain doesn't even get access to user_home_dir_t or user_home_t directories.

I was planning to borrow some ideas from your chroot domain, and set things up very close to that. I will also need an interesting type for the keystroke logger files.

Chroot is probably too heavy, irc is simpler and easier to copy from. For keystroke logger files I guess you could make them append-only. Or you could use the same read-write file you use for the data store.

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.

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

author
#4 lore raw
Quoted 2 lines · Russell Coker

NB You need separate types for the kernel and the disk image. The kernel should not be writable...

Yes, and the backing store file should also not be writeable, just the cow file and the keystroke logger files.

Quoted 3 lines

You possibly don't want the system to run it (but that is debatable), however you certainly want to be able to install a kernel as the administrator and have regular users execute it.

Shouldn't chcon be able to do that?

Ah, I'll find out.

Quoted 3 lines

Chroot is probably too heavy, irc is simpler and easier to copy from. For keystroke logger files I guess you could make them append-only. Or you could use the same read-write file you use for the data store.

Definitely append only, but the problem is that they are created on runtime, not like logfiles where you can assume that it exists when you execute.
And they are always created in the uml dir. I'll look into the uml source what exactly is hardcoded there. I would definitely prefer them to be in their own subdir.

Signature · 8 lines
http://web.lemuria.org/pubkey.html
pub  1024D/2D7A04F5 2002-05-16 Tom Vogt <[email protected]>
     Key fingerprint = C731 64D1 4BCF 4C20 48A4  29B2 BF01 9FA1 2D7A 04F5

--
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 5 lines · Tom
Quoted 3 lines

You possibly don't want the system to run it (but that is debatable), however you certainly want to be able to install a kernel as the administrator and have regular users execute it.

Shouldn't chcon be able to do that?

chcon/chsid changes the context, but you have to create the policy that allows the changes in question and defines suitable types to be used.

Also it might be best to set things up such that the user can create (and remove!) a hard link to a kernel or backing store file created by the administrator. Then the UML is stuck to it's own directory.

Quoted 7 lines
Quoted 3 lines

Chroot is probably too heavy, irc is simpler and easier to copy from. For keystroke logger files I guess you could make them append-only. Or you could use the same read-write file you use for the data store.

Definitely append only, but the problem is that they are created on runtime, not like logfiles where you can assume that it exists when you execute.

You can allow create and append access but no write or unlink...

Quoted 3 lines

And they are always created in the uml dir. I'll look into the uml source what exactly is hardcoded there. I would definitely prefer them to be in their own subdir.

Is the fact that they are created in the UML directory interfering with the policy you desire? Or is it just a general UML usability issue?

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.

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

author
#6 lore raw
Quoted 5 lines · Russell Coker
Quoted 3 lines

Definitely append only, but the problem is that they are created on runtime, not like logfiles where you can assume that it exists when you execute.

You can allow create and append access but no write or unlink...

Good, yeah. I guess I'll do that.

Quoted 6 lines
Quoted 3 lines

And they are always created in the uml dir. I'll look into the uml source what exactly is hardcoded there. I would definitely prefer them to be in their own subdir.

Is the fact that they are created in the UML directory interfering with the policy you desire? Or is it just a general UML usability issue?

Both, actually. If they had their own dir, I could define a type and autotransition for that dir.

Signature · 8 lines
http://web.lemuria.org/pubkey.html
pub  1024D/2D7A04F5 2002-05-16 Tom Vogt <[email protected]>
     Key fingerprint = C731 64D1 4BCF 4C20 48A4  29B2 BF01 9FA1 2D7A 04F5

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

During Linux Kongress, I had a little chat with Russell about uml (user-mode-linux) on top of SELinux (for now, I'll leave the mindboggling involved with SE-UML-Linux to someone else :) ).

Oh, there's no mind-boggling of SE-UML-SE.

I've been thinking of setting up some UML instances on cose running SE to allow people to play with setting up their own SE policy inside their own UML.

Russell Coker

PS Everyone on this list should try and get a GPG key signing with other people on the list, so that we have short lines in the web of trust in case we need to encrypt/sign emails to each other. I've signed Tom's key...

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