View previous topic :: View next topic |
Author |
Message |
dman777 Veteran
Joined: 10 Jan 2007 Posts: 1004
|
Posted: Fri Jul 29, 2011 11:50 am Post subject: LXC versus KVM-Qemu- which is more secure against jail break |
|
|
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 |
|
|
audiodef Watchman
Joined: 06 Jul 2005 Posts: 6656 Location: The soundosphere
|
|
Back to top |
|
|
depontius Advocate
Joined: 05 May 2004 Posts: 3526
|
Posted: Fri Jul 29, 2011 3:54 pm Post subject: |
|
|
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 |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 23091
|
Posted: Fri Jul 29, 2011 11:00 pm Post subject: |
|
|
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 |
|
|
chithanh Developer
Joined: 05 Aug 2006 Posts: 2158 Location: Berlin, Germany
|
Posted: Sat Jul 30, 2011 8:35 am Post subject: |
|
|
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 |
|
|
depontius Advocate
Joined: 05 May 2004 Posts: 3526
|
Posted: Mon Aug 01, 2011 3:00 pm Post subject: |
|
|
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 |
|
|
dman777 Veteran
Joined: 10 Jan 2007 Posts: 1004
|
Posted: Mon Aug 01, 2011 3:09 pm Post subject: |
|
|
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 |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 23091
|
Posted: Mon Aug 01, 2011 11:23 pm Post subject: |
|
|
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 |
|
|
|