]> git.proxmox.com Git - pve-qemu-kvm.git/blame - debian/patches/extra/CVE-2016-9106-9pfs-fix-memory-leak-in-v9fs_write.patch
fix #1237: include cirrus follow up fixes
[pve-qemu-kvm.git] / debian / patches / extra / CVE-2016-9106-9pfs-fix-memory-leak-in-v9fs_write.patch
CommitLineData
d37b5565
WB
1From 2c5bcb2d5f32ffcf5064d3557e44836fa70700be Mon Sep 17 00:00:00 2001
2From: Li Qiang <liqiang6-s@360.cn>
3Date: Mon, 17 Oct 2016 14:13:58 +0200
4Subject: [PATCH 7/8] 9pfs: fix memory leak in v9fs_write
5
6If an error occurs when marshalling the transfer length to the guest, the
7v9fs_write() function doesn't free an IO vector, thus leading to a memory
8leak. This patch fixes the issue.
9
10Signed-off-by: Li Qiang <liqiang6-s@360.cn>
11Reviewed-by: Greg Kurz <groug@kaod.org>
12[groug, rephrased the changelog]
13Signed-off-by: Greg Kurz <groug@kaod.org>
14---
15 hw/9pfs/9p.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
19index aa2b8c0..af07846 100644
20--- a/hw/9pfs/9p.c
21+++ b/hw/9pfs/9p.c
22@@ -2080,7 +2080,7 @@ static void v9fs_write(void *opaque)
23 offset = 7;
24 err = pdu_marshal(pdu, offset, "d", total);
25 if (err < 0) {
26- goto out;
27+ goto out_qiov;
28 }
29 err += offset;
30 trace_v9fs_write_return(pdu->tag, pdu->id, total, err);
31--
322.1.4
33