Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP3:GA
qemu.8403
0140-virtio-gpu-fix-memory-leak-in-resou.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0140-virtio-gpu-fix-memory-leak-in-resou.patch of Package qemu.8403
From 737db6265fe0648e588ea2816f9bf86e7cc29bd3 Mon Sep 17 00:00:00 2001 From: Li Qiang <liq3ea@gmail.com> Date: Thu, 29 Dec 2016 04:28:41 -0500 Subject: [PATCH] virtio-gpu: fix memory leak in resource attach backing In the resource attach backing function, everytime it will allocate 'res->iov' thus can leading a memory leak. This patch avoid this. Signed-off-by: Li Qiang <liq3ea@gmail.com> Message-id: 1483003721-65360-1-git-send-email-liq3ea@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit 204f01b30975923c64006f8067f0937b91eea68b) [BR: CVE-2017-5578 BSC#1021481] Signed-off-by: Bruce Rogers <brogers@suse.com> --- hw/display/virtio-gpu.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index c76fa7f247..a7e74729dd 100644 --- a/hw/display/virtio-gpu.c +++ b/hw/display/virtio-gpu.c @@ -675,6 +675,11 @@ virtio_gpu_resource_attach_backing(VirtIOGPU *g, return; } + if (res->iov) { + cmd->error = VIRTIO_GPU_RESP_ERR_UNSPEC; + return; + } + ret = virtio_gpu_create_mapping_iov(&ab, cmd, &res->iov); if (ret != 0) { cmd->error = VIRTIO_GPU_RESP_ERR_UNSPEC;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor