Skip to contentSkip to conversation

chroot jailing...

Qemu-devel [email protected] 4 participants 6 messages Jan 12, 2014 – Jan 13, 2014

lore
Share & tools
lore
#0 lore raw

Would there be any security benefits, without suffering any considerable relative loss in performance, to (chroot) jailing qemu? Can it, practically speaking, be done?? Would that be a partial safeguard against virtual machine escapes? Or is it the case that if a virtual machine escape takes place, then all bets are probably off? (i.e., you probably have already pole-vaulted over any filesystem driver/partition access control mechanisms...) Are there any articles or discussions that I can be directed to about it? (my focus for now is 64 bit, Intel core i7...) Are there specific suggestions and/or guidelines for attempting to do so -or not??

#1 lore raw
Quoted 10 lines · On Sun, Jan 12, 2014 at 02:17:43PM -0500, [email protected] wrote:

Would there be any security benefits, without suffering any considerable relative loss in performance, to (chroot) jailing qemu? Can it, practically speaking, be done?? Would that be a partial safeguard against virtual machine escapes? Or is it the case that if a virtual machine escape takes place, then all bets are probably off? (i.e., you probably have already pole-vaulted over any filesystem driver/partition access control mechanisms...) Are there any articles or discussions that I can be directed to about it? (my focus for now is 64 bit, Intel core i7...) Are there specific suggestions and/or guidelines for attempting to do so -or not??

Isolating QEMU can be useful to prevent exposing data on the host or from other guests.

Production systems using libvirt often run QEMU unprivileged and use SELinux to restrict what resources the process has access to. This way a QEMU process that has been taken over still cannot get access to much besides the files it already has open, the network device it uses, etc.

Stefan

#2 lore raw

Thanks!

So it sounds like you're saying selinux is the only meaningful thing to try? Or do people ever bother to place qemu in chroot jails??

I seem to have gotten the impression that people use qemu-static to do this, but it appears to be more for offering secured access of a guest folder to the host OS;
not so much for security...

========================

Quoted 20 lines · Stefan Hajnoczi
Quoted 10 lines · On Sun, Jan 12, 2014 at 02:17:43PM -0500, [email protected] wrote:

Would there be any security benefits, without suffering any considerable relative loss in performance, to (chroot) jailing qemu? Can it, practically speaking, be done?? Would that be a partial safeguard against virtual machine escapes? Or is it the case that if a virtual machine escape takes place, then all bets are probably off? (i.e., you probably have already pole-vaulted over any filesystem driver/partition access control mechanisms...) Are there any articles or discussions that I can be directed to about it? (my focus for now is 64 bit, Intel core i7...) Are there specific suggestions and/or guidelines for attempting to do so -or not??

Isolating QEMU can be useful to prevent exposing data on the host or from other guests.

Production systems using libvirt often run QEMU unprivileged and use SELinux to restrict what resources the process has access to. This way a QEMU process that has been taken over still cannot get access to much besides the files it already has open, the network device it uses, etc.

Stefan

#3 lore raw
Quoted 9 lines · "[email protected]" <[email protected]> writes:

Thanks!

So it sounds like you're saying selinux is the only meaningful thing to try? Or do people ever bother to place qemu in chroot jails??

I seem to have gotten the impression that people use qemu-static to do this, but it appears to be more for offering secured access of a guest folder to the host OS;
not so much for security...

chroot() by itself is not a useful security tool.

https://lwn.net/Articles/252794/

#4 lore raw
In reply to [email protected]
Quoted 8 lines · [email protected] writes:

Thanks!

So it sounds like you're saying selinux is the only meaningful thing to try? Or do people ever bother to place qemu in chroot jails??

I seem to have gotten the impression that people use qemu-static to do this, but it appears to be more for offering secured access of a guest folder to the host OS;

The qemu-static + chroot approach is mainly to avoid doing complex path manipulation between host/guest file-systems AFAICT.

Quoted 2 lines

not so much for security...

<snip>

Signature · 1 line
Alex Bennée
#5 lore raw

That's what I thought; just had to be sure.
Thanks all...

========================

Quoted 17 lines · Alex Bennée
Quoted 8 lines · [email protected] writes:

Thanks!

So it sounds like you're saying selinux is the only meaningful thing to try? Or do people ever bother to place qemu in chroot jails??

I seem to have gotten the impression that people use qemu-static to do this, but it appears to be more for offering secured access of a guest folder to the host OS;

The qemu-static + chroot approach is mainly to avoid doing complex path manipulation between host/guest file-systems AFAICT.

Quoted 2 lines

not so much for security...

<snip>