File 2c2bec9-CVE-2013-6456.patch of Package libvirt.openSUSE_13.1_Update

From b272b572cc013e1e0a9aadc22b9690ee097a2bb8 Mon Sep 17 00:00:00 2001
From: "Daniel P. Berrange" <berrange@redhat.com>
Date: Tue, 4 Feb 2014 17:41:22 +0000
Subject: [PATCH 04/14] Fix reset of cgroup when detaching USB device from LXC
 guests

When detaching a USB device from an LXC guest we must remove
the device from the cgroup ACL. Unfortunately we were telling
the cgroup code to use the guest /dev path, not the host /dev
path, and the guest device node had already been unlinked.
This was, however, fortunate since the code passed &priv->cgroup
instead of priv->cgroup, so would have crash if the device node
were accessible.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
(cherry picked from commit 2c2bec94d27ccd070bee18a6113b1cfea6d80126)
---
 src/lxc/lxc_driver.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: libvirt-1.1.2/src/lxc/lxc_driver.c
===================================================================
--- libvirt-1.1.2.orig/src/lxc/lxc_driver.c
+++ libvirt-1.1.2/src/lxc/lxc_driver.c
@@ -3908,7 +3908,7 @@ lxcDomainDetachDeviceHostdevUSBLive(virL
     }
 
     if (!(usb = virUSBDeviceNew(def->source.subsys.u.usb.bus,
-                                def->source.subsys.u.usb.device, vroot)))
+                                def->source.subsys.u.usb.device, NULL)))
         goto cleanup;
 
     VIR_DEBUG("Unlinking %s", dst);
@@ -3922,7 +3922,7 @@ lxcDomainDetachDeviceHostdevUSBLive(virL
 
     if (virUSBDeviceFileIterate(usb,
                                 virLXCTeardownHostUsbDeviceCgroup,
-                                &priv->cgroup) < 0)
+                                priv->cgroup) < 0)
         VIR_WARN("cannot deny device %s for domain %s",
                  dst, vm->def->name);
 
openSUSE Build Service is sponsored by