Blame SOURCES/kvm-qxl-check-release-info-object.patch

8b1478
From 2e9c7edfee60b61e3b6b0c0eba29cb4df6d47f85 Mon Sep 17 00:00:00 2001
8b1478
From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@redhat.com>
8b1478
Date: Wed, 19 Jun 2019 16:05:49 +0200
8b1478
Subject: [PATCH 18/23] qxl: check release info object
8b1478
MIME-Version: 1.0
8b1478
Content-Type: text/plain; charset=UTF-8
8b1478
Content-Transfer-Encoding: 8bit
8b1478
8b1478
RH-Author: Philippe Mathieu-Daudé <philmd@redhat.com>
8b1478
Message-id: <20190619160549.15731-2-philmd@redhat.com>
8b1478
Patchwork-id: 88734
8b1478
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH 1/1] qxl: check release info object
8b1478
Bugzilla: 1712704
8b1478
RH-Acked-by: Gerd Hoffmann <kraxel@redhat.com>
8b1478
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
8b1478
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
8b1478
8b1478
From: Prasad J Pandit <pjp@fedoraproject.org>
8b1478
8b1478
When releasing spice resources in release_resource() routine,
8b1478
if release info object 'ext.info' is null, it leads to null
8b1478
pointer dereference. Add check to avoid it.
8b1478
8b1478
Reported-by: Bugs SysSec <bugs-syssec@rub.de>
8b1478
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
8b1478
Message-id: 20190425063534.32747-1-ppandit@redhat.com
8b1478
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
8b1478
(cherry picked from commit d52680fc932efb8a2f334cc6993e705ed1e31e99)
8b1478
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
8b1478
---
8b1478
 hw/display/qxl.c | 3 +++
8b1478
 1 file changed, 3 insertions(+)
8b1478
8b1478
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
8b1478
index a71714c..f757d2e 100644
8b1478
--- a/hw/display/qxl.c
8b1478
+++ b/hw/display/qxl.c
8b1478
@@ -763,6 +763,9 @@ static void interface_release_resource(QXLInstance *sin,
8b1478
     QXLReleaseRing *ring;
8b1478
     uint64_t *item, id;
8b1478
 
8b1478
+    if (!ext.info) {
8b1478
+        return;
8b1478
+    }
8b1478
     if (ext.group_id == MEMSLOT_GROUP_HOST) {
8b1478
         /* host group -> vga mode update request */
8b1478
         QXLCommandExt *cmdext = (void *)(intptr_t)(ext.info->id);
8b1478
-- 
8b1478
1.8.3.1
8b1478