aboutsummaryrefslogtreecommitdiffstats
path: root/main/qemu/CVE-2017-5857.patch
diff options
context:
space:
mode:
authorSergei Lukin <sergej.lukin@gmail.com>2017-04-18 12:55:12 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2017-04-21 12:52:14 +0000
commit251f7b99aba7d81c9ef398c6f3ec41f06c2ba661 (patch)
tree980a1728084ee290a631b716d1697125994dfe48 /main/qemu/CVE-2017-5857.patch
parent6e43b8e910ddb974b60364e4a18c31ff9c22b9e8 (diff)
downloadaports-251f7b99aba7d81c9ef398c6f3ec41f06c2ba661.tar.bz2
aports-251f7b99aba7d81c9ef398c6f3ec41f06c2ba661.tar.xz
main/qemu: security fixes #6921
CVE-2016-7994: Qemu virtio-gpu: memory leak in virtio_gpu_resource_create_2d CVE-2016-7995: Qemu: usb: hcd-ehci: memory leak in ehci_process_itd CVE-2016-8576: Qemu: usb: xHCI: infinite loop vulnerability in xhci_ring_fetch CVE-2016-8577: Qemu: 9pfs: host memory leakage in v9fs_read CVE-2016-8578: Qemu: 9pfs: potential NULL dereferencein 9pfs routines CVE-2016-8668: Qemu: net: OOB buffer access in rocker switch emulation CVE-2016-8909: Qemu: audio: intel-hda: infinite loop in processing dma buffer stream CVE-2016-8910: Qemu: net: rtl8139: infinite loop while transmit in C+ mode CVE-2016-9101: Qemu: net: eepro100 memory leakage at device unplug CVE-2016-9102: Qemu: 9pfs: memory leakage when creating extended attribute CVE-2016-9103: Qemu: 9pfs: information leakage via xattribute CVE-2016-9104: Qemu: 9pfs: integer overflow leading to OOB access CVE-2016-9105: Qemu: memory leakage in v9fs_link CVE-2016-9106: Qemu: 9pfs: memory leakage in v9fs_write CVE-2017-5525: Qemu: audio: memory leakage in ac97 device CVE-2017-5552: Qemu: display: virtio-gpu-3d: memory leakage in virgl_resource_attach_backing CVE-2017-5578: Qemu: display: virtio-gpu: host memory leakage in virtio_gpu_resource_attach_backing CVE-2017-5579: Qemu: serial: host memory leakage in 16550A UART emulation CVE-2017-5667: Qemu: sd: sdhci OOB access during multi block SDMA transfer CVE-2017-5856: Qemu: scsi: megasas: host memory leakage in megasas_handle_dcmd CVE-2017-5857: display: virtio-gpu-3d: host memory leakage in virgl_cmd_resource_unref CVE-2017-5898: Qemu: usb: integer overflow in emulated_apdu_from_guest CVE-2017-5931: virtio: integer overflow in handling virtio-crypto requests CVE-2017-2615: Qemu: display: cirrus: oob access while doing bitblt copy backward mode CVE-2017-2620: Qemu: display: cirrus: potential arbitrary code execution via cirrus_bitblt_cputovideo CVE-2017-6505: usb: an infinite loop issue in ohci_service_ed_list
Diffstat (limited to 'main/qemu/CVE-2017-5857.patch')
-rwxr-xr-xmain/qemu/CVE-2017-5857.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/main/qemu/CVE-2017-5857.patch b/main/qemu/CVE-2017-5857.patch
new file mode 100755
index 0000000000..664a669ffa
--- /dev/null
+++ b/main/qemu/CVE-2017-5857.patch
@@ -0,0 +1,38 @@
+When the guest sends VIRTIO_GPU_CMD_RESOURCE_UNREF without detaching the
+backing storage beforehand (VIRTIO_GPU_CMD_RESOURCE_DETACH_BACKING)
+we'll leak memory.
+
+This patch fixes it for 3d mode, simliar to the 2d mode fix in commit
+"b8e2392 virtio-gpu: call cleanup mapping function in resource destroy".
+
+Reported-by: 李强 <address@hidden>
+Signed-off-by: Gerd Hoffmann <address@hidden>
+---
+ hw/display/virtio-gpu-3d.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/hw/display/virtio-gpu-3d.c b/hw/display/virtio-gpu-3d.c
+index f96a0c2..ecb09d1 100644
+--- a/hw/display/virtio-gpu-3d.c
++++ b/hw/display/virtio-gpu-3d.c
+@@ -77,10 +77,18 @@ static void virgl_cmd_resource_unref(VirtIOGPU *g,
+ struct virtio_gpu_ctrl_command *cmd)
+ {
+ struct virtio_gpu_resource_unref unref;
++ struct iovec *res_iovs = NULL;
++ int num_iovs = 0;
+
+ VIRTIO_GPU_FILL_CMD(unref);
+ trace_virtio_gpu_cmd_res_unref(unref.resource_id);
+
++ virgl_renderer_resource_detach_iov(unref.resource_id,
++ &res_iovs,
++ &num_iovs);
++ if (res_iovs != NULL && num_iovs != 0) {
++ virtio_gpu_cleanup_mapping_iov(res_iovs, num_iovs);
++ }
+ virgl_renderer_resource_unref(unref.resource_id);
+ }
+
+--
+1.8.3.1