yeahuh / rpms / qemu-kvm

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