From: sashiko-bot@kernel.org
To: "Dairui Zhang" <zhangdairui@gmail.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH] IB/mad: fix UAF and double-free in RMPP receive reassembly
Date: Tue, 22 Sep 2026 15:33:33 +0000 [thread overview]
Message-ID: <20260922153334.54F6D1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260922152342.1474845-1-zhangdairui@gmail.com>
> mad_rmpp_recv.state is protected by two locks that do not exclude
> each other: recv_timeout_handler() (port workqueue) uses agent->lock,
> continue_rmpp() (CQ softirq) uses rmpp_recv->lock. Nothing serializes
> the check-then-set sequence on the state word:
>
> T1 (CQ softirq) T2 (port workqueue)
> continue_rmpp()
> lock(rmpp_recv->lock)
> state == ACTIVE [passes]
> recv_timeout_handler()
> lock(agent->lock)
> state = TIMEOUT
> list_del(&rmpp_recv->list)
> unlock(agent->lock)
> destroy_rmpp_recv()
> [ ... ]
>
> Fixes: fa619a77046b ("[PATCH] IB: Add RMPP implementation")
> Cc: stable@vger.kernel.org
> Assisted-by: LLM
> Signed-off-by: Dairui Zhang <zhangdairui@gmail.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260922152342.1474845-1-zhangdairui@gmail.com?part=1
next prev parent reply other threads:[~2026-09-22 15:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 15:23 [PATCH] IB/mad: fix UAF and double-free in RMPP receive reassembly Dairui Zhang
2026-09-22 15:33 ` sashiko-bot [this message]
2026-09-29 13:29 ` Leon Romanovsky
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=20260922153334.54F6D1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=zhangdairui@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox