Skip to content

SMB Direct: double-free of send_io on ib_post_send failure in batch flush path

Stefan Metzmacher linux-cifs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2smb: client: avoid double-free in smbd_free_send_io() after smbd_send_batch_flush()fs/smb/client/smbdirect.c+8 -00 replies
2/2smb: server: avoid double-free in smb_direct_free_sendmsg after smb_direct_flush_send_list()fs/smb/server/transport_rdma.c+7 -10 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchRuikai PengPaulo Alcantara (Red Hat)Namjae Jeon
SeriesA-b A-b
1/2T-b
2/2T-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 v1 thread

Cover letter [PATCH 0/2] SMB Direct: double-free of send_io on ib_post_send failure in batch flush path

Hi Steve,

here are the real patches for the changes already tested by Ruikai Peng for the double-free problem reported, see:
https://lore.kernel.org/linux-cifs/CAFD3drNOSJ05y3A+jNXSDxW-2w09KHQ0DivhxQ_pcc7immVVOQ@mail.gmail.com/

I prepared a branch that can replace ksmbd-for-next.
The 2 changes are rebased below the smbdirect.ko changes,
I resolved the conflicts and made sure the problem is also solved in the new common code. This in for-7.1/smbdirect-ko-20260410-v12
at commit: 274b415378bbd0cf6fde1a719e264cee2eefc06f
git fetch https://git.samba.org/metze/linux/wip.git for-7.1/smbdirect-ko-20260410-v12
https://git.samba.org/?p=metze/linux/wip.git;a=shortlog;h=refs/heads/for-7.1/smbdirect-ko-20260410-v12
I made sure each commit compiles fine...

Stefan Metzmacher (2):
smb: client: avoid double-free in smbd_free_send_io() after
smbd_send_batch_flush()
smb: server: avoid double-free in smb_direct_free_sendmsg after
smb_direct_flush_send_list()

 fs/smb/client/smbdirect.c      | 8 ++++++++
 fs/smb/server/transport_rdma.c | 8 +++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)
Signature · 1 line
2.43.0