Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
LXC versus KVM-Qemu- which is more secure against jail break
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
dman777
Veteran
Veteran


Joined: 10 Jan 2007
Posts: 1004

PostPosted: Fri Jul 29, 2011 11:50 am    Post subject: LXC versus KVM-Qemu- which is more secure against jail break Reply with quote

I see in 2011-05-19 there was a released fix for two security exploits for Qemu-Kvm. What about LXC? Up to date, which one is more secure against jail breaks? I did a google search and didn't really find anything about LXC in that respect, but then again it's probably not as popular.
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6656
Location: The soundosphere

PostPosted: Fri Jul 29, 2011 1:48 pm    Post subject: Reply with quote

I'd be interested in knowing about this, too.

http://lxc.sourceforge.net/

Looks pretty good to me. Anyone else use it?
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3526

PostPosted: Fri Jul 29, 2011 3:54 pm    Post subject: Reply with quote

Now that I see it, I'm quite interested in this, as well.

I use a laptop in a cradle as my desktop, but every now and then I'd like to take it to a meeting, or whatever. Engineering applications on Linux tend to be quite brittle about the network, and don't like the idea of it going away, coming back, or changing. The simplest use would be to put the engineering applications in a container, and quiesce that container when away from the desk. Next up would be some sort of VPN-like connection, so that those applications could keep a consistent IP even though the real network is moving from wired to wireless, etc. Still, quiescing the container while juggling the network seems necessary to me.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23091

PostPosted: Fri Jul 29, 2011 11:00 pm    Post subject: Reply with quote

Theoretically, KVM should be more secure since it virtualizes an entire machine. You could then run the suspicious code as an unprivileged user in a guest system. In order to fully escape, an attacker would need to break out of the hypervisor. Most, though not all, attacks against hypervisors have required privilege in the guest, so an attacker would need to elevate inside the guest before attacking the host. However, KVM will also be much heavier than LXC since you need to run a second machine.
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2158
Location: Berlin, Germany

PostPosted: Sat Jul 30, 2011 8:35 am    Post subject: Reply with quote

If isolation is your top priority, then run QEMU as user. The performance will not be great, but any exploit which allows the attacker to break out of QEMU will give him at most user privileges on the host.

LXC is currently not secure at all against privileged user breaking out
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3526

PostPosted: Mon Aug 01, 2011 3:00 pm    Post subject: Reply with quote

In my case, I'm not after it for security, I just want a better and easier chroot. Plus I want to be able to suspend the chroot temporarily and restart it later.

Question... It looks to me as if lxc suggests bridged networking in the container. I believe that for my purposes routed networkworking would work better. I haven't gone through the documentation thoroughly yet, but haven't seen anything about doing it that way. Does anyone here have experience with lxc and routed networking?
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
dman777
Veteran
Veteran


Joined: 10 Jan 2007
Posts: 1004

PostPosted: Mon Aug 01, 2011 3:09 pm    Post subject: Reply with quote

I was on #gentoo-hardened it was mentioned that with GRSecurity's findtask feature that LXC Container was worthy of being considered secure, if I understood correctly.

Since I read about RHEL reporting this security flaw for Qemu KVM, I'm not sure VM is as secure as it is believed:

Quote:
It was found that the virtio subsystem in qemu-kvm did not properly
validate virtqueue in and out requests from the guest. A privileged guest
user could use this flaw to trigger a buffer overflow, allowing them to
crash the guest (denial of service) or, possibly, escalate their privileges
on the host. (CVE-2011-2212)

It was found that the virtio_queue_notify() function in qemu-kvm did not
perform sufficient input validation on the value later used as an index
into the array of virtqueues. An unprivileged guest user could use this
flaw to crash the guest (denial of service) or, possibly, escalate their
privileges on the host. (CVE-2011-2512)
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23091

PostPosted: Mon Aug 01, 2011 11:23 pm    Post subject: Reply with quote

All systems have bugs, and some of those bugs are severe. The first CVE is in line with the typical problem for paravirtualized systems: a guest kernel can feed bad data to the hypervisor, and the hypervisor may not handle it well. The second CVE is more concerning, but both are fixable. If you assume that a malicious user in the guest has permission to make arbitrary system calls and supply crafted data to those calls, then the attack surface is considerably larger.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum