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

From 5ef86f41148af71aefca9c7ad31926ca179c185b Mon Sep 17 00:00:00 2001
From: "Daniel P. Berrange" <berrange@redhat.com>
Date: Tue, 4 Feb 2014 16:46:28 +0000
Subject: [PATCH 03/14] Record hotplugged USB device in LXC live guest config

After hotplugging a USB device, the LXC driver forgot
to add the device def to the virDomainDefPtr.

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

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
@@ -3374,6 +3374,9 @@ lxcDomainAttachDeviceHostdevSubsysUSBLiv
 
     mode = 0700 | S_IFCHR;
 
+    if (VIR_REALLOC_N(vm->def->hostdevs, vm->def->nhostdevs + 1) < 0)
+        goto cleanup;
+
     if (virFileMakePath(dstdir) < 0) {
         virReportSystemError(errno,
                              _("Unable to create %s"), dstdir);
@@ -3402,6 +3405,8 @@ lxcDomainAttachDeviceHostdevSubsysUSBLiv
                                 priv->cgroup) < 0)
         goto cleanup;
 
+    vm->def->hostdevs[vm->def->nhostdevs++] = def;
+
     ret = 0;
 
 cleanup:
openSUSE Build Service is sponsored by