Skip to content
Snippets Groups Projects
user avatar
Stefan Hajnoczi authored
iscsi_aio_cancel() does not increment the request's reference count,
causing a use-after-free when ABORT TASK finishes after the request has
already completed.

There are some additional issues with iscsi_aio_cancel():
1. Several ABORT TASKs may be sent for the same task if
   iscsi_aio_cancel() is invoked multiple times.  It's better to avoid
   this just in case the command identifier is reused.
2. The iscsilun->mutex protection is missing in iscsi_aio_cancel().

Reported-by: default avatarFelipe Franciosi <felipe@nutanix.com>
Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20180203061621.7033-4-stefanha@redhat.com>
Reviewed-by: default avatarFelipe Franciosi <felipe@nutanix.com>
Tested-by: default avatarSreejith Mohanan <sreejit.mohanan@nutanix.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
c1004487
History