Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
* [PATCH 0/2] RDMA/rxe: fix shared memory TOCTOU in receive path
@ 2026-05-18 21:50 Tristan Madani
  2026-05-18 21:50 ` [PATCH 1/2] RDMA/rxe: fix TOCTOU heap overflow in get_srq_wqe Tristan Madani
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Tristan Madani @ 2026-05-18 21:50 UTC (permalink / raw)
  To: Zhu Yanjun; +Cc: Jason Gunthorpe, Leon Romanovsky, linux-rdma, 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.

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(-)

-- 
2.47.3

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-05-20  0:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox