From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
Prasad J Pandit <pjp@fedoraproject.org>,
Alistair Francis <alistair@alistair23.me>,
qemu-arm@nongnu.org, qemu-ppc@nongnu.org,
Gerd Hoffmann <kraxel@redhat.com>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: [Qemu-devel] [PULL 1/8] qxl: check release info object
Date: Tue, 7 May 2019 10:19:39 +0200 [thread overview]
Message-ID: <20190507081946.19264-2-kraxel@redhat.com> (raw)
In-Reply-To: <20190507081946.19264-1-kraxel@redhat.com>
From: Prasad J Pandit <pjp@fedoraproject.org>
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>
---
hw/display/qxl.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index c8ce5781e037..632923add239 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);
--
2.18.1
next prev parent reply other threads:[~2019-05-07 8:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-07 8:19 [Qemu-devel] [PULL 0/8] Vga 20190507 patches Gerd Hoffmann
2019-05-07 8:19 ` Gerd Hoffmann [this message]
2019-05-07 8:19 ` [Qemu-devel] [PULL 2/8] hw/display/cirrus_vga: Update the documentation URL Gerd Hoffmann
2019-05-07 8:19 ` [Qemu-devel] [PULL 3/8] hw/display/cirrus_vga: Remove unused include Gerd Hoffmann
2019-05-07 8:19 ` [Qemu-devel] [PULL 4/8] vl: constify VGAInterfaceInfo Gerd Hoffmann
2019-05-07 8:19 ` [Qemu-devel] [PULL 5/8] vl: add -vga help support Gerd Hoffmann
2019-05-07 8:19 ` [Qemu-devel] [PULL 6/8] qxl: avoid unaligned pointer reads/writes Gerd Hoffmann
2019-05-07 8:19 ` [Qemu-devel] [PULL 7/8] ati-vga: Fix check for blt outside vram Gerd Hoffmann
2019-05-07 8:19 ` [Qemu-devel] [PULL 8/8] i2c-ddc: move it to hw/display Gerd Hoffmann
2019-05-07 23:06 ` [Qemu-devel] [PULL 0/8] Vga 20190507 patches Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190507081946.19264-2-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=alistair@alistair23.me \
--cc=edgar.iglesias@gmail.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=pjp@fedoraproject.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).