summaryrefslogtreecommitdiff
path: root/app-emulation/qemu/files/qemu-3.1.0-CVE-2018-20123.patch
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation/qemu/files/qemu-3.1.0-CVE-2018-20123.patch')
-rw-r--r--app-emulation/qemu/files/qemu-3.1.0-CVE-2018-20123.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/app-emulation/qemu/files/qemu-3.1.0-CVE-2018-20123.patch b/app-emulation/qemu/files/qemu-3.1.0-CVE-2018-20123.patch
new file mode 100644
index 000000000000..a021a6a970d2
--- /dev/null
+++ b/app-emulation/qemu/files/qemu-3.1.0-CVE-2018-20123.patch
@@ -0,0 +1,35 @@
+From: Prasad J Pandit <address@hidden>
+
+If during pvrdma device initialisation an error occurs,
+pvrdma_realize() does not release memory resources, leading
+to memory leakage.
+
+Reported-by: Li Qiang <address@hidden>
+Signed-off-by: Prasad J Pandit <address@hidden>
+---
+ hw/rdma/vmw/pvrdma_main.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/hw/rdma/vmw/pvrdma_main.c b/hw/rdma/vmw/pvrdma_main.c
+index 8a03ab4669..b65f8662df 100644
+--- a/hw/rdma/vmw/pvrdma_main.c
++++ b/hw/rdma/vmw/pvrdma_main.c
+@@ -579,7 +579,7 @@ static void pvrdma_shutdown_notifier(Notifier *n, void *opaque)
+
+ static void pvrdma_realize(PCIDevice *pdev, Error **errp)
+ {
+- int rc;
++ int rc = 0;
+ PVRDMADev *dev = PVRDMA_DEV(pdev);
+ Object *memdev_root;
+ bool ram_shared = false;
+@@ -655,6 +655,7 @@ static void pvrdma_realize(PCIDevice *pdev, Error **errp)
+
+ out:
+ if (rc) {
++ pvrdma_fini(pdev);
+ error_append_hint(errp, "Device fail to load\n");
+ }
+ }
+--
+2.19.2