From: Prasad J Pandit Date: Thu, 25 Apr 2019 06:35:34 +0000 (+0530) Subject: qxl: check release info object X-Git-Url: https://repo.jachan.dev/qemu.git/commitdiff_plain/d52680fc932efb8a2f334cc6993e705ed1e31e99 qxl: check release info object 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 Signed-off-by: Prasad J Pandit Message-id: 20190425063534.32747-1-ppandit@redhat.com Signed-off-by: Gerd Hoffmann --- diff --git a/hw/display/qxl.c b/hw/display/qxl.c index c8ce5781e0..632923add2 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -777,6 +777,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);