All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: bernard.metzler@linux.dev
Cc: leon@kernel.org, linux-rdma@vger.kernel.org,
	Shuangpeng Bai <shuangpeng.kernel@gmail.com>
Subject: Re: [PATCH] RDMA/siw: Fix endpoint/socket association handling.
Date: Fri, 5 Jun 2026 14:26:43 -0300	[thread overview]
Message-ID: <20260605172643.GA2785196@nvidia.com> (raw)
In-Reply-To: <20260604160808.30948-1-bernard.metzler@linux.dev>

On Thu, Jun 04, 2026 at 06:08:08PM +0200, bernard.metzler@linux.dev wrote:
> From: Bernard Metzler <bernard.metzler@linux.dev>
> 
> Disassociating a socket from an endpoint via
> siw_socket_disassoc() may release the last reference on that
> endpoint and free it. Therefore, don't clear the endpoints
> socket pointer after calling that function, but within.
> 
> This fixes a
> 
> BUG: KASAN: slab-use-after-free in siw_cm_work_handler (drivers/infiniband/sw/siw/siw_cm.c:1053 drivers/infiniband/sw/siw/siw_cm.c:1075)
> 
> which occurred after processing a malformed MPA request
> during connection establishment, causing the new endpoint
> to be closed.
> 
> Fixes: 6c52fdc244b5c ("rdma/siw: connection management")
> Reported-by: Shuangpeng Bai <shuangpeng.kernel@gmail.com>
> Signed-off-by: Bernard Metzler <bernard.metzler@linux.dev>
> ---
>  drivers/infiniband/sw/siw/siw_cm.c | 30 +++++++++++++++---------------
>  1 file changed, 15 insertions(+), 15 deletions(-)

Applied to for-next, thanks

Jason

      reply	other threads:[~2026-06-05 17:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-04 16:08 [PATCH] RDMA/siw: Fix endpoint/socket association handling bernard.metzler
2026-06-05 17:26 ` Jason Gunthorpe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260605172643.GA2785196@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=bernard.metzler@linux.dev \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=shuangpeng.kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.