From: Zhu Yanjun <yanjun.zhu@linux.dev>
To: Tristan Madani <tristmd@gmail.com>,
Zhu Yanjun <zyjzyj2000@gmail.com>,
"yanjun.zhu@linux.dev" <yanjun.zhu@linux.dev>
Cc: Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>,
linux-rdma@vger.kernel.org,
Tristan Madani <tristan@talencesecurity.com>
Subject: Re: [PATCH 0/2] RDMA/rxe: fix shared memory TOCTOU in receive path
Date: Mon, 18 May 2026 19:03:18 -0700 [thread overview]
Message-ID: <0ae59679-5cc9-48e4-87e9-63299684acf8@linux.dev> (raw)
In-Reply-To: <20260518215040.1598586-1-tristan@talencesecurity.com>
在 2026/5/18 14:50, Tristan Madani 写道:
> RXE queue buffers are mapped read-write into userspace. The receive
> path reads WQE fields from these shared buffers, which lets a
> concurrent userspace thread modify them between validation and use.
To be honest, can you implement the above? If yes, please show us the
steps to reproduce this problem.
Thanks a lot.
Zhu Yanjun
>
> Patch 1 fixes a heap overflow in the SRQ path where num_sge is
> validated but then re-read for the memcpy size calculation.
>
> Patch 2 addresses the non-SRQ path by copying the WQE to a
> kernel-local buffer before processing, preventing TOCTOU on
> fields used in check_length and copy_data.
>
> Tristan Madani (2):
> RDMA/rxe: fix TOCTOU heap overflow in get_srq_wqe
> RDMA/rxe: copy WQE to local buffer in non-SRQ receive path
>
> drivers/infiniband/sw/rxe/rxe_resp.c | 33 ++++++++++++++++++++++++---
> 1 file changed, 28 insertions(+), 5 deletions(-)
>
next prev parent reply other threads:[~2026-05-19 2:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-18 21:50 [PATCH 0/2] RDMA/rxe: fix shared memory TOCTOU in receive path Tristan Madani
2026-05-18 21:50 ` [PATCH 1/2] RDMA/rxe: fix TOCTOU heap overflow in get_srq_wqe Tristan Madani
2026-05-18 21:50 ` [PATCH 2/2] RDMA/rxe: copy WQE to local buffer in non-SRQ receive path Tristan Madani
2026-05-19 2:03 ` Zhu Yanjun [this message]
2026-05-19 14:56 ` [PATCH 0/2] RDMA/rxe: fix shared memory TOCTOU in " Leon Romanovsky
2026-05-19 15:00 ` Jason Gunthorpe
2026-05-19 22:30 ` Tristan Madani
2026-05-20 0:07 ` Yanjun.Zhu
2026-05-20 12:03 ` Tristan Madani
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=0ae59679-5cc9-48e4-87e9-63299684acf8@linux.dev \
--to=yanjun.zhu@linux.dev \
--cc=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=tristan@talencesecurity.com \
--cc=tristmd@gmail.com \
--cc=zyjzyj2000@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