HIGH
rdma WqeSize OOB
CVE-2026-45856
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
KernelScan AI3.2LOW
01Description
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).
02KernelScan AI Analysis
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.
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.
03Fix Versions
| Branch | Fixed in | Patch commit |
|---|---|---|
| 5.10 | 5.10.252 | 9c15ec4cd4e7 |
| 5.15 | 5.15.202 | 9b5ac1c15334 |
| 6.1 | 6.1.165 | 01c9b152647d |
| 6.12 | 6.12.75 | d533425ac1f2 |
| 6.18 | 6.18.14 | bf4454da8b1e |
| 6.19 | 6.19.4 | bef70ff98419 |
| 6.6 | 6.6.128 | bf1feed1a788 |
| mainline | 7.0 | 1956f0a74ccf |