{"id":2222212,"url":"http://patchwork.ozlabs.org/api/1.1/covers/2222212/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-cifs-client/cover/cover.1775838249.git.metze@samba.org/","project":{"id":12,"url":"http://patchwork.ozlabs.org/api/1.1/projects/12/?format=json","name":"Linux CIFS Client","link_name":"linux-cifs-client","list_id":"linux-cifs.vger.kernel.org","list_email":"linux-cifs@vger.kernel.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<cover.1775838249.git.metze@samba.org>","date":"2026-04-10T20:10:59","name":"[0/2] SMB Direct: double-free of send_io on ib_post_send failure in batch flush path","submitter":{"id":8149,"url":"http://patchwork.ozlabs.org/api/1.1/people/8149/?format=json","name":"Stefan Metzmacher","email":"metze@samba.org"},"mbox":"http://patchwork.ozlabs.org/project/linux-cifs-client/cover/cover.1775838249.git.metze@samba.org/mbox/","series":[{"id":499503,"url":"http://patchwork.ozlabs.org/api/1.1/series/499503/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-cifs-client/list/?series=499503","date":"2026-04-10T20:11:00","name":"SMB Direct: double-free of send_io on ib_post_send failure in batch flush path","version":1,"mbox":"http://patchwork.ozlabs.org/series/499503/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/covers/2222212/comments/","headers":{"Return-Path":"\n <linux-cifs+bounces-10750-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-cifs@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (3072-bit key;\n secure) header.d=samba.org header.i=@samba.org header.a=rsa-sha256\n header.s=42 header.b=Cokn3iTz;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-cifs+bounces-10750-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (3072-bit key) header.d=samba.org header.i=@samba.org\n header.b=\"Cokn3iTz\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=144.76.82.148","smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=samba.org","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=samba.org"],"Received":["from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fsp1V5Cq2z1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 11 Apr 2026 06:14:38 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 9653C3045201\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 10 Apr 2026 20:11:31 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id AF85F37FF6E;\n\tFri, 10 Apr 2026 20:11:30 +0000 (UTC)","from hr2.samba.org (hr2.samba.org [144.76.82.148])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 9676E36495C\n\tfor <linux-cifs@vger.kernel.org>; Fri, 10 Apr 2026 20:11:28 +0000 (UTC)","from [127.0.0.2] (localhost [127.0.0.1])\n\tby hr2.samba.org with esmtpsa\n (TLS1.3:ECDHE_SECP256R1__ECDSA_SECP256R1_SHA256__CHACHA20_POLY1305:256)\n\t(Exim)\n\tid 1wBICF-00000000IIe-3heA;\n\tFri, 10 Apr 2026 20:11:20 +0000"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775851890; cv=none;\n b=AQtbKfffcOJw8oBMmkSItf4N/eVXpHxMViEwe86r6dKe8MGHcaEu+BXA4zfNJTMdlC5v25tXzVA+yPt4zGgl6MhdPKnJdUzMQR07E9PtaYgg3eTVvBplUq3eeVA/bLaMmKZGp19Tv1cs9ukKfkDK3GiGcCdN5DMpA6u5+scKXfU=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775851890; c=relaxed/simple;\n\tbh=Zj91PZcPlRIL+TxypM4Mtqk1g5xF3vWKc60IuJ7hLuI=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=DSxEWgrLHSyswYNHPEO4Qz1HV5jTSLDQ45MOfTHjVvWs0RaQAND2MIDbIXNa5SbKTe8kRcW/GZm3Sl9HmGbSiiUFptxNZNKyiN0rnG94vEbYAv+kKMwYf1/1Rd6ET6kP0szQdDjSpSwZgP1kG6/WXOPaAdFP5m0woxCn4dBbiOo=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=samba.org;\n spf=pass smtp.mailfrom=samba.org;\n dkim=pass (3072-bit key) header.d=samba.org header.i=@samba.org\n header.b=Cokn3iTz; arc=none smtp.client-ip=144.76.82.148","DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=samba.org;\n\ts=42; h=Message-ID:Date:Cc:To:From;\n\tbh=NkbsGmWts+8NpjXxjr3jPhBNvXYMr4h2mi9l+myO+yU=; b=Cokn3iTzu9dhXB5f4EGZwGvIKf\n\tUdq6mIIJ6ov5dAaVSveT3ABFB1xZb0lzImvvNgfBQvsNrqGRT17p+HEsh368mc7qUdDQg+Oj3LFLI\n\tJOgAmDUnQicNe6dvzpTOQqd8kxvFOjo6ZCjjSULY0loKUJqz7J9UVMWcJp3ByWSObC6UHt9l52qFx\n\tI812C9CjMZEY4YYyU2fHK5Y2SeOsFtdwTbsRNox6VdecEyK506bnZviyrF+/WRZFt+bStedpb9U8f\n\tc7Z5dxv9VCtrw2Gt4VxsdtcNRx9pfMudOVlJW11TjcNb7CVxYXWy7z7AL3DJ3/eLkZbIhni5h6r+u\n\teJWTpkSHdRFkvE5fruujCtCm0/mT7Qk31SvD/mN1MIsnp0Sz66blTIJDS470CeONGTeKjzATbE64W\n\tNSmi9S9DBmhmV9FiKtXVgA5f8um8XL7MZfIBqaLuOd8V5Oy4G/NpYhTgKo2C1U2ysyyy2OKaLtf/7\n\t4vqUCCPsvM1IfvuylrMJQAMx;","From":"Stefan Metzmacher <metze@samba.org>","To":"linux-cifs@vger.kernel.org,\n\tsamba-technical@lists.samba.org","Cc":"metze@samba.org,\n\tNamjae Jeon <linkinjeon@kernel.org>,\n\tSteve French <smfrench@gmail.com>,\n\tTom Talpey <tom@talpey.com>,\n\tRuikai Peng <ruikai@pwno.io>,\n\tSergey Senozhatsky <senozhatsky@chromium.org>,\n\tPaulo Alcantara <pc@manguebit.org>,\n\tsecurity@kernel.org","Subject":"[PATCH 0/2] SMB Direct: double-free of send_io on ib_post_send\n failure in batch flush path","Date":"Fri, 10 Apr 2026 22:10:59 +0200","Message-ID":"<cover.1775838249.git.metze@samba.org>","X-Mailer":"git-send-email 2.43.0","Precedence":"bulk","X-Mailing-List":"linux-cifs@vger.kernel.org","List-Id":"<linux-cifs.vger.kernel.org>","List-Subscribe":"<mailto:linux-cifs+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-cifs+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit"},"content":"Hi Steve,\n\nhere are the real patches for the changes already tested by\nRuikai Peng for the double-free problem reported, see:\nhttps://lore.kernel.org/linux-cifs/CAFD3drNOSJ05y3A+jNXSDxW-2w09KHQ0DivhxQ_pcc7immVVOQ@mail.gmail.com/\n\nI prepared a branch that can replace ksmbd-for-next.\nThe 2 changes are rebased below the smbdirect.ko changes,\nI resolved the conflicts and made sure the problem is also solved in\nthe new common code. This in for-7.1/smbdirect-ko-20260410-v12\nat commit: 274b415378bbd0cf6fde1a719e264cee2eefc06f\ngit fetch https://git.samba.org/metze/linux/wip.git for-7.1/smbdirect-ko-20260410-v12\nhttps://git.samba.org/?p=metze/linux/wip.git;a=shortlog;h=refs/heads/for-7.1/smbdirect-ko-20260410-v12\nI made sure each commit compiles fine...\n\n\nStefan Metzmacher (2):\n  smb: client: avoid double-free in smbd_free_send_io() after\n    smbd_send_batch_flush()\n  smb: server: avoid double-free in smb_direct_free_sendmsg after\n    smb_direct_flush_send_list()\n\n fs/smb/client/smbdirect.c      | 8 ++++++++\n fs/smb/server/transport_rdma.c | 8 +++++++-\n 2 files changed, 15 insertions(+), 1 deletion(-)"}