virtio-mlk: fix use-after-free while handling scsi commands
PATCH 1/1 virtio-mlk: fix use-after-free while handling scsi commands
The scsi passthrough handler falls through after completing a request into the failure path, resulting in a use after free.
Reprducible by running a guest with aio=native on a block device.
--- hw/virtio-blk.c | 1 + 1 file changed, 1 insertion(+)
hw/virtio-blk.c +1 -0
@@ -254,6 +254,7 @@ static void virtio_blk_handle_scsi(VirtIOBlockReq *req)virtio_blk_req_complete (req, status);g_free (req); +return ;#else abort ();#endif
Signature · 1 line
1.7.11.3
Quoted 10 lines · Avi Kivity
The scsi passthrough handler falls through after completing a request into the failure path, resulting in a use after free.
Reprducible by running a guest with aio=native on a block device.
Reported-by Stefan Priebe <[email protected]>Signed-off-by Avi Kivity <[email protected]>--- hw/virtio-blk.c | 1 + 1 file changed, 1 insertion(+)
It would be nice to fix up the commit message:
s/virtio-mlk/virtio-blk/
Quoted 6 lines · Stefan Hajnoczi
Quoted 5 lines · Avi Kivity
The scsi passthrough handler falls through after completing a request into the failure path, resulting in a use after free.
Reprducible by running a guest with aio=native on a block device.
Quoted 8 lines
Quoted 5 lines
Reported-by Stefan Priebe <[email protected]>Signed-off-by Avi Kivity <[email protected]>--- hw/virtio-blk.c | 1 + 1 file changed, 1 insertion(+)It would be nice to fix up the commit message:
s/virtio-mlk/virtio-blk/
Sorry, an off-by-two. Presumably Kevin will fix it up.
Quoted 3 lines
Reviewed-by Stefan Hajnoczi <[email protected]>
Thanks.
Signature · 1 line
error compiling committee.c: too many arguments to function
Am 06.08.2012 15:11, schrieb Stefan Hajnoczi:
Quoted 5 lines · Avi Kivity
Quoted 4 lines
The scsi passthrough handler falls through after completing a request into the failure path, resulting in a use after free.
Reprducible by running a guest with aio=native on a block device.
While at it, also "Reproducible".
/-F
Quoted 11 lines
Quoted 6 lines
Reported-by Stefan Priebe <[email protected]>Signed-off-by Avi Kivity <[email protected]>--- hw/virtio-blk.c | 1 + 1 file changed, 1 insertion(+)It would be nice to fix up the commit message:
s/virtio-mlk/virtio-blk/Reviewed-by Stefan Hajnoczi <[email protected]>
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg