]> git.proxmox.com Git - pve-qemu-kvm.git/blame - debian/patches/extra/CVE-2016-9911-usb-ehci-fix-memory-leak-in-ehci_init_transfer.patch
bump version to 2.7.1-501
[pve-qemu-kvm.git] / debian / patches / extra / CVE-2016-9911-usb-ehci-fix-memory-leak-in-ehci_init_transfer.patch
CommitLineData
f262231e
WB
1From 824f78bb0135cff4cb29e26c3de1cb4c2da35b46 Mon Sep 17 00:00:00 2001
2From: Li Qiang <liqiang6-s@360.cn>
3Date: Tue, 8 Nov 2016 04:11:10 -0800
4Subject: [PATCH 05/12] usb: ehci: fix memory leak in ehci_init_transfer
5
6In ehci_init_transfer function, if the 'cpage' is bigger than 4,
7it doesn't free the 'p->sgl' once allocated previously thus leading
8a memory leak issue. This patch avoid this.
9
10Signed-off-by: Li Qiang <liqiang6-s@360.cn>
11Message-id: 5821c0f4.091c6b0a.e0c92.e811@mx.google.com
12Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
13---
14 hw/usb/hcd-ehci.c | 1 +
15 1 file changed, 1 insertion(+)
16
17diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
18index f4ece9a..7622a3a 100644
19--- a/hw/usb/hcd-ehci.c
20+++ b/hw/usb/hcd-ehci.c
21@@ -1190,6 +1190,7 @@ static int ehci_init_transfer(EHCIPacket *p)
22 while (bytes > 0) {
23 if (cpage > 4) {
24 fprintf(stderr, "cpage out of range (%d)\n", cpage);
25+ qemu_sglist_destroy(&p->sgl);
26 return -1;
27 }
28
29--
302.1.4
31