From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: aliguori@us.ibm.com
Subject: [Qemu-devel] [PATCH 07/23] virtio-blk: fix use-after-free while handling scsi commands
Date: Tue, 21 Aug 2012 12:05:41 -0500 [thread overview]
Message-ID: <1345568757-14365-8-git-send-email-mdroth@linux.vnet.ibm.com> (raw)
In-Reply-To: <1345568757-14365-1-git-send-email-mdroth@linux.vnet.ibm.com>
From: Avi Kivity <avi@redhat.com>
The scsi passthrough handler falls through after completing a
request into the failure path, resulting in a use after free.
Reproducible by running a guest with aio=native on a block device.
Reported-by: Stefan Priebe <s.priebe@profihost.ag>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit 730a9c53b4e52681fcfe31cf38854cbf91e132c7)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
hw/virtio-blk.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index fe07746..f44d244 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -253,6 +253,7 @@ static void virtio_blk_handle_scsi(VirtIOBlockReq *req)
virtio_blk_req_complete(req, status);
g_free(req);
+ return;
#else
abort();
#endif
--
1.7.9.5
next prev parent reply other threads:[~2012-08-21 17:06 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-21 17:05 [Qemu-devel] [stable-1.1] Patch Round-up for stable 1.1.2 Michael Roth
2012-08-21 17:05 ` [Qemu-devel] [PATCH 01/23] qtest: fix infinite loop when QEMU aborts abruptly Michael Roth
2012-08-21 17:05 ` [Qemu-devel] [PATCH 02/23] configure: Don't override user's --cpu on MacOS and Solaris Michael Roth
2012-08-21 17:05 ` [Qemu-devel] [PATCH 03/23] ppc: Fix bug in handling of PAPR hypercall exits Michael Roth
2012-08-21 17:05 ` [Qemu-devel] [PATCH 04/23] s390: Fix error handling and condition code of service call Michael Roth
2012-08-21 17:05 ` [Qemu-devel] [PATCH 05/23] kvmvapic: Disable if there is insufficient memory Michael Roth
2012-08-21 17:05 ` [Qemu-devel] [PATCH 06/23] qdev: fix use-after-free in the error path of qdev_init_nofail Michael Roth
2012-08-21 17:05 ` Michael Roth [this message]
2012-08-21 17:05 ` [Qemu-devel] [PATCH 08/23] ehci: fix reset Michael Roth
2012-08-21 17:05 ` [Qemu-devel] [PATCH 09/23] ehci: don't flush cache on doorbell rings Michael Roth
2012-08-21 17:05 ` [Qemu-devel] [PATCH 10/23] uhci: fix uhci_async_cancel_all Michael Roth
2012-08-21 17:05 ` [Qemu-devel] [PATCH 11/23] usb: restore USBDevice->attached on vmload Michael Roth
2012-08-21 17:05 ` [Qemu-devel] [PATCH 12/23] usb-redir: Correctly handle the usb_redir_babble usbredir status Michael Roth
2012-08-21 17:05 ` [Qemu-devel] [PATCH 13/23] usb-ehci: Fix an assert whenever isoc transfers are used Michael Roth
2012-08-21 17:05 ` [Qemu-devel] [PATCH 14/23] qlist: add qlist_size() Michael Roth
2012-08-21 17:05 ` [Qemu-devel] [PATCH 15/23] json-parser: don't replicate tokens at each level of recursion Michael Roth
2012-08-21 17:05 ` [Qemu-devel] [PATCH 16/23] check-qjson: add test for large JSON objects Michael Roth
2012-08-21 17:05 ` [Qemu-devel] [PATCH 17/23] slirp: Enforce host-side user of smb share Michael Roth
2012-08-21 17:05 ` [Qemu-devel] [PATCH 18/23] slirp: Ensure smbd and shared directory exist when enable smb Michael Roth
2012-08-21 17:05 ` [Qemu-devel] [PATCH 19/23] slirp: Improve error reporting of inaccessible smb directories Michael Roth
2012-08-21 17:05 ` [Qemu-devel] [PATCH 20/23] apic: Resolve potential endless loop around apic_update_irq Michael Roth
2012-08-21 17:05 ` [Qemu-devel] [PATCH 21/23] apic: Reevaluate pending interrupts on LVT_LINT0 changes Michael Roth
2012-08-21 17:05 ` [Qemu-devel] [PATCH 22/23] apic: Defer interrupt updates to VCPU thread Michael Roth
2012-08-21 17:05 ` [Qemu-devel] [PATCH 23/23] update VERSION for 1.1.2 Michael Roth
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=1345568757-14365-8-git-send-email-mdroth@linux.vnet.ibm.com \
--to=mdroth@linux.vnet.ibm.com \
--cc=aliguori@us.ibm.com \
--cc=qemu-devel@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).