Skip to content

target: Fix two races leading to use-after-free

Joern Engel lkml 1 version Applied

Status from this message: Applied to target-pending/queue

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 10 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3target: removed unused transport_state flaginclude/target/target_core_base.h+0 -10 replies
2/3target: close target_put_sess_cmd() vs. core_tmr_abort_task() race v5drivers/target/target_core_transport.c include/linux/kref.h+38 -63 replies
3/3target: simplify target_wait_for_sess_cmds()drivers/infiniband/ulp/srpt/ib_srpt.c drivers/scsi/qla2xxx/tcm_qla2xxx.c drivers/target/target_core_transport.c +2 more+20 -527 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchGreg Kroah-Hartman
1/3
2/3A-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] target: Fix two races leading to use-after-free

In our testing we've encountered use-after-free bugs, usually in the shape of double list_del, at a rate of 2-10 per week. Patches 2 and 3 fix two races that can both lead to use-after-free and after applying both of those patches, we have been bug-free for some weeks now.

Patch 1 is an unrelated trivial cleanup. I just happened to spot it while I was in the area.

Joern Engel (3):
target: removed unused transport_state flag
target: close target_put_sess_cmd() vs. core_tmr_abort_task() race v5
target: simplify target_wait_for_sess_cmds()

 drivers/infiniband/ulp/srpt/ib_srpt.c  |    2 +-
 drivers/scsi/qla2xxx/tcm_qla2xxx.c     |    2 +-
 drivers/target/target_core_transport.c |   73 +++++++++-----------------------
 include/linux/kref.h                   |   33 +++++++++++++++
 include/target/target_core_base.h      |    3 --
 include/target/target_core_fabric.h    |    2 +-
 6 files changed, 57 insertions(+), 58 deletions(-)
Signature · 1 line
1.7.10.4