Skip to content

block/iscsi: fix ioctl cancel use-after-free

Stefan Hajnoczi qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 8 repliesIn review
  2. v13 patches 1 replySuperseded

Changes in v2 from the cover letter

* It was unnecessary to avoid duplicate iscsi_schedule_bh() calls since this function already protects against duplicate calls internally [Stefan]

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3block/iscsi: drop unused IscsiAIOCB->buf fieldblock/iscsi.c+0 -81 reply
2/3block/iscsi: take iscsilun->mutex in iscsi_timed_check_events()block/iscsi.c+4 -01 reply
3/3block/iscsi: fix ioctl cancel use-after-freeblock/iscsi.c+18 -34 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchPaolo BonziniFelipe FranciosiSreejith Mohanan
1/3R-b
2/3R-b
3/3R-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [Qemu-devel] [PATCH v2 0/3] block/iscsi: fix ioctl cancel use-after-free

v2:
* It was unnecessary to avoid duplicate iscsi_schedule_bh() calls since this function already protects against duplicate calls internally [Stefan]

Patches 1 & 2 are cleanups.

Patch 3 fixes cancellation of ioctls. Felipe showed me a trace where an acb is cancelled and then completes twice. The second time around crashes QEMU.

Compile-tested only.

Felipe: Please let us know if this fixes the issue you are seeing. Thanks!

Stefan Hajnoczi (3):
block/iscsi: drop unused IscsiAIOCB->buf field block/iscsi: take iscsilun->mutex in iscsi_timed_check_events() block/iscsi: fix ioctl cancel use-after-free

 block/iscsi.c | 33 ++++++++++++++++++++++-----------
 1 file changed, 22 insertions(+), 11 deletions(-)
Signature · 1 line
2.14.3