]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
qxl: check release info object
authorPrasad J Pandit <pjp@fedoraproject.org>
Thu, 25 Apr 2019 06:35:34 +0000 (12:05 +0530)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 30 Jul 2019 20:15:46 +0000 (15:15 -0500)
When releasing spice resources in release_resource() routine,
if release info object 'ext.info' is null, it leads to null
pointer dereference. Add check to avoid it.

Reported-by: Bugs SysSec <bugs-syssec@rub.de>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Message-id: 20190425063534.32747-1-ppandit@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit d52680fc932efb8a2f334cc6993e705ed1e31e99)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/display/qxl.c

index 9087db5dee3da255aae3522e908cc47ebda67367..5ea862baf086cacaa9b7fae94b54e89df5508d46 100644 (file)
@@ -776,6 +776,9 @@ static void interface_release_resource(QXLInstance *sin,
     QXLReleaseRing *ring;
     uint64_t *item, id;
 
+    if (!ext.info) {
+        return;
+    }
     if (ext.group_id == MEMSLOT_GROUP_HOST) {
         /* host group -> vga mode update request */
         QXLCommandExt *cmdext = (void *)(intptr_t)(ext.info->id);