KernelScan.io

HIGH

rdma WqeSize OOB

CVE-2026-45856

CVSS 7.1 / 10.0 NVD

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H

KernelScan AI3.2LOW

01

In the Linux kernel, the following vulnerability has been resolved: RDMA/uverbs: Validate wqe_size before using it in ib_uverbs_post_send ib_uverbs_post_send() uses cmd.wqe_size from userspace without any validation before passing it to kmalloc() and using the allocated buffer as struct ib_uverbs_send_wr. If a user provides a small wqe_size value (e.g., 1), kmalloc() will succeed, but subsequent accesses to user_wr->opcode, user_wr->num_sge, and other fields will read beyond the allocated buffer, resulting in an out-of-bounds read from kernel heap memory. This could potentially leak sensitive kernel information to userspace. Additionally, providing an excessively large wqe_size can trigger a WARNING in the memory allocation path, as reported by syzkaller. This is inconsistent with ib_uverbs_unmarshall_recv() which properly validates that wqe_size >= sizeof(struct ib_uverbs_recv_wr) before proceeding. Add the same validation for ib_uverbs_post_send() to ensure wqe_size is at least sizeof(struct ib_uverbs_send_wr).

02

Engine v0.2.0

Risk summary

Local users with access to RDMA/InfiniBand devices can trigger out-of-bounds heap reads by providing undersized wqe_size values to ib_uverbs_post_send(). This can leak adjacent kernel heap memory contents to userspace, potentially exposing kernel pointers or other sensitive data.

Affecteddrivers/infiniband/core/uverbs_cmd.c (RDMA/InfiniBand)

Vulnerability analysis

The root cause is missing input validation in ib_uverbs_post_send() where cmd.wqe_size from userspace is passed directly to kmalloc() without checking if it is large enough to hold a struct ib_uverbs_send_wr. When a small value like 1 is provided, kmalloc() succeeds but subsequent field accesses (user_wr->opcode, user_wr->num_sge) read beyond the allocated buffer boundary. The fix adds validation to ensure wqe_size >= sizeof(struct ib_uverbs_send_wr) before allocation, matching the existing validation in ib_uverbs_unmarshall_recv(). Attack surface is local-only, requiring access to RDMA/InfiniBand character devices typically restricted to specific groups or capabilities.

03

BranchFixed inPatch commit
5.105.10.2529c15ec4cd4e7
5.155.15.2029b5ac1c15334
6.16.1.16501c9b152647d
6.126.12.75d533425ac1f2
6.186.18.14bf4454da8b1e
6.196.19.4bef70ff98419
6.66.6.128bf1feed1a788
mainline7.01956f0a74ccf