public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] RDMA/uverbs: Fix missing wqe_size validation in ib_uverbs_post_send
@ 2026-01-22 14:28 Yi Liu
  2026-01-22 14:29 ` [PATCH 1/1] RDMA/uverbs: Validate wqe_size before using it " Yi Liu
  2026-01-22 17:10 ` [PATCH 0/1] RDMA/uverbs: Fix missing wqe_size validation " Greg KH
  0 siblings, 2 replies; 7+ messages in thread
From: Yi Liu @ 2026-01-22 14:28 UTC (permalink / raw)
  To: jgg, leon; +Cc: linux-rdma, security, Yi Liu

Hi,

I discovered a missing input validation issue in ib_uverbs_post_send().

The function uses cmd.wqe_size from userspace without validation before
passing it to kmalloc() and accessing the buffer as struct ib_uverbs_send_wr.

Security Impact:
- If wqe_size is too small: out-of-bounds read from kernel heap memory,
  potentially leaking sensitive kernel information.
- If wqe_size is too large: triggers WARNING in the memory allocator.

This patch addresses the first issue (wqe_size too small) by adding a
lower bound check, consistent with ib_uverbs_unmarshall_recv(). The
upper bound check is not included in this patch and may need further
discussion on what a reasonable limit should be.

Given the potential for kernel heap information disclosure, I believe
the first issue may warrant a CVE assignment. I would appreciate it if
the security team could evaluate this.

Thanks,
Yi Liu

Yi Liu (1):
  RDMA/uverbs: Validate wqe_size before using it in ib_uverbs_post_send

 drivers/infiniband/core/uverbs_cmd.c | 3 +++
 1 file changed, 3 insertions(+)

--
2.34.1


^ permalink raw reply	[flat|nested] 7+ messages in thread
* [PATCH v2 0/1] RDMA/uverbs: Fix missing wqe_size validation in ib_uverbs_post_send
@ 2026-01-23  1:42 Yi Liu
  2026-01-23  1:42 ` [PATCH 1/1] RDMA/uverbs: Validate wqe_size before using it " Yi Liu
  0 siblings, 1 reply; 7+ messages in thread
From: Yi Liu @ 2026-01-23  1:42 UTC (permalink / raw)
  To: jgg, leon; +Cc: linux-rdma, security, Yi Liu

Hi,

I discovered a missing input validation issue in ib_uverbs_post_send().

The function uses cmd.wqe_size from userspace without validation before
passing it to kmalloc() and accessing the buffer as struct ib_uverbs_send_wr.

Security Impact:
- If wqe_size is too small: out-of-bounds read from kernel heap memory,
  potentially leaking sensitive kernel information.
- If wqe_size is too large: triggers WARNING in the memory allocator.

This patch addresses the first issue (wqe_size too small) by adding a
lower bound check, consistent with ib_uverbs_unmarshall_recv(). The
upper bound check is not included in this patch and may need further
discussion on what a reasonable limit should be.

v2: Add Cc: stable tag

Yi Liu (1):
  RDMA/uverbs: Validate wqe_size before using it in ib_uverbs_post_send

 drivers/infiniband/core/uverbs_cmd.c | 3 +++
 1 file changed, 3 insertions(+)

--
2.34.1


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

end of thread, other threads:[~2026-01-26 13:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-22 14:28 [PATCH 0/1] RDMA/uverbs: Fix missing wqe_size validation in ib_uverbs_post_send Yi Liu
2026-01-22 14:29 ` [PATCH 1/1] RDMA/uverbs: Validate wqe_size before using it " Yi Liu
2026-01-22 17:10   ` Greg KH
2026-01-26 13:07   ` Leon Romanovsky
2026-01-26 13:07   ` Leon Romanovsky
2026-01-22 17:10 ` [PATCH 0/1] RDMA/uverbs: Fix missing wqe_size validation " Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2026-01-23  1:42 [PATCH v2 " Yi Liu
2026-01-23  1:42 ` [PATCH 1/1] RDMA/uverbs: Validate wqe_size before using it " Yi Liu

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