Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Tristan Madani <tristmd@gmail.com>
Cc: Zhu Yanjun <zyjzyj2000@gmail.com>,
	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: Fri, 29 May 2026 20:35:22 -0300	[thread overview]
Message-ID: <20260529233522.GA223905@nvidia.com> (raw)
In-Reply-To: <20260518215040.1598586-1-tristan@talencesecurity.com>

On Mon, May 18, 2026 at 09:50:38PM +0000, Tristan Madani wrote:
> 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.
> 
> 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(-)

Applied to for-next, I added the rxe_ Zhu pointed out

Jason


      parent reply	other threads:[~2026-05-29 23:35 UTC|newest]

Thread overview: 16+ 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-29  1:34   ` yanjun.zhu
2026-05-18 21:50 ` [PATCH 2/2] RDMA/rxe: copy WQE to local buffer in non-SRQ receive path Tristan Madani
2026-05-29  1:39   ` yanjun.zhu
2026-05-19  2:03 ` [PATCH 0/2] RDMA/rxe: fix shared memory TOCTOU in " Zhu Yanjun
2026-05-19 14:56   ` 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
2026-05-20 17:04             ` Yanjun.Zhu
2026-05-21 12:18               ` Tristan Madani
2026-05-21 21:09                 ` Yanjun.Zhu
2026-05-28 21:46                   ` Tristan Madani
2026-05-29 23:35 ` 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=20260529233522.GA223905@nvidia.com \
    --to=jgg@nvidia.com \
    --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