All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Shuai Liu" <847807867@qq.com>, linux-rdma@vger.kernel.org
Subject: Re: [PATCH] RDMA/rxe: Mask the SQ producer index read from user space
Date: Sat, 21 Nov 2026 03:48:46 +0000	[thread overview]
Message-ID: <sashiko-outbox-226603@kernel.org> (raw)
In-Reply-To: <tencent_03B85262EE136CEE83D2012CA5F2704D2008@qq.com>

> The send queue producer index of a user space QP is stored in the
> queue buffer which is shared with and written by user space. The
> requester reads it without any validation in req_retry() and
> __req_next_wqe() and compares it against its own local index which
> is always masked.
> 
> The requester stops processing WQEs when its local WQE index equals
> the producer index. If user space writes an out of range producer
> index into the queue buffer, that comparison can never become true.
> Once the QP is put into the error state, rxe_requester() then keeps
> flushing WQEs forever: the flush path advances the WQE index with the
> masked queue_next_index() but the producer index stays out of range,
> and each pass calls rxe_qp_error() which reschedules the send task,
> so the loop never converges. The send task holds a reference to the
> QP for as long as this lasts, so ib_destroy_qp() waits for the QP
> [ ... ]
> 
> Reported-by: syzbot+fef38133c495aeb48297@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=fef38133c495aeb48297
> Fixes: ae6e843fe08d ("RDMA/rxe: Add memory barriers to kernel queues")
> Signed-off-by: Shuai Liu <847807867@qq.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/tencent_03B85262EE136CEE83D2012CA5F2704D2008@qq.com?part=1

  reply	other threads:[~2026-11-21  3:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-23 12:35 [syzbot] [rdma?] WARNING in __rxe_cleanup syzbot
2026-10-24  3:31 ` Zhu Yanjun
2026-11-19 21:03 ` syzbot
2026-11-20 11:42 ` [PATCH rdma-next v1] RDMA/rxe: Don't trust the user space SQ producer index Shuai Liu
2026-11-20 12:02   ` sashiko-bot
2026-11-21  3:42   ` [PATCH] RDMA/rxe: Mask the SQ producer index read from user space Shuai Liu
2026-11-21  3:48     ` sashiko-bot [this message]
2026-11-21  3:46   ` [PATCH rdma-next v2] " Shuai Liu
2026-11-21  3:51     ` sashiko-bot

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=sashiko-outbox-226603@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=847807867@qq.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.