yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
b38b0f
From 56a21c3a967a6cbf99e2ecb2dff30d4dca759532 Mon Sep 17 00:00:00 2001
b38b0f
From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@redhat.com>
b38b0f
Date: Thu, 20 Jun 2019 13:07:31 +0100
b38b0f
Subject: [PATCH 1/2] qxl: check release info object
b38b0f
MIME-Version: 1.0
b38b0f
Content-Type: text/plain; charset=UTF-8
b38b0f
Content-Transfer-Encoding: 8bit
b38b0f
b38b0f
RH-Author: Philippe Mathieu-Daudé <philmd@redhat.com>
b38b0f
Message-id: <20190620130731.18034-2-philmd@redhat.com>
b38b0f
Patchwork-id: 88745
b38b0f
O-Subject: [RHEL-8.1.0 qemu-kvm PATCH 1/1] qxl: check release info object
b38b0f
Bugzilla: 1712705
b38b0f
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
b38b0f
RH-Acked-by: Gerd Hoffmann <kraxel@redhat.com>
b38b0f
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
b38b0f
b38b0f
From: Prasad J Pandit <pjp@fedoraproject.org>
b38b0f
b38b0f
When releasing spice resources in release_resource() routine,
b38b0f
if release info object 'ext.info' is null, it leads to null
b38b0f
pointer dereference. Add check to avoid it.
b38b0f
b38b0f
Reported-by: Bugs SysSec <bugs-syssec@rub.de>
b38b0f
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
b38b0f
Message-id: 20190425063534.32747-1-ppandit@redhat.com
b38b0f
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
b38b0f
(cherry picked from commit d52680fc932efb8a2f334cc6993e705ed1e31e99)
b38b0f
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
b38b0f
---
b38b0f
 hw/display/qxl.c | 3 +++
b38b0f
 1 file changed, 3 insertions(+)
b38b0f
b38b0f
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
b38b0f
index b373c50..a8c953b 100644
b38b0f
--- a/hw/display/qxl.c
b38b0f
+++ b/hw/display/qxl.c
b38b0f
@@ -776,6 +776,9 @@ static void interface_release_resource(QXLInstance *sin,
b38b0f
     QXLReleaseRing *ring;
b38b0f
     uint64_t *item, id;
b38b0f
 
b38b0f
+    if (!ext.info) {
b38b0f
+        return;
b38b0f
+    }
b38b0f
     if (ext.group_id == MEMSLOT_GROUP_HOST) {
b38b0f
         /* host group -> vga mode update request */
b38b0f
         QXLCommandExt *cmdext = (void *)(intptr_t)(ext.info->id);
b38b0f
-- 
b38b0f
1.8.3.1
b38b0f