HIGH Introduced in 3.11
mlx5 QPBufSize Overflow
CVE-2026-90435
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI7.8HIGH
01Description
In the Linux kernel, the following vulnerability has been resolved: RDMA/mlx5: Fix integer overflow of user QP buffer size set_user_buf_size() computes the QP buffer size by left-shifting the user-supplied rq.wqe_cnt and rq.wqe_shift values as signed integers. A sufficiently large rq.wqe_cnt causes signed integer overflow, which is undefined behavior, and yields a small or negative buf_size, causing ib_umem_get() to map a buffer smaller than the hardware will actually write into. Replace the shifts and addition with check_shl_overflow() and check_add_overflow(), rejecting invalid user inputs. Moreover, guard the identical shift computing qp->sq.offset in _create_user_qp() before set_user_buf_size() is reached.
02KernelScan AI Analysis
Risk summary
A local user with access to a Mellanox RDMA adapter can supply oversized Queue Pair parameters that overflow a signed integer size computation, causing the kernel to map a buffer far smaller than the hardware will actually write into. The NIC then writes beyond the mapped region, corrupting kernel memory and potentially crashing the system or escalating privileges. Systems without Mellanox RDMA hardware are unaffected.
Vulnerability analysis
When a userspace process creates an RDMA Queue Pair on a Mellanox adapter, the driver computes the receive and send buffer sizes by left-shifting user-supplied work-request counts and shift values as signed integers. A sufficiently large count causes signed integer overflow, producing a small or negative buffer size; the kernel then maps a memory region far smaller than the hardware will actually write into, so the NIC overwrites adjacent kernel memory. The fix replaces every raw shift and addition with overflow-checking helpers that reject invalid inputs before the buffer is mapped, and adds the same guard to the Queue Pair offset computation that runs earlier in the creation path. The vulnerable code is reached locally through the RDMA verbs device interface; any user who can open the adapter's userspace verbs device—typically through group membership or device file permissions—can trigger it, and the system must have a Mellanox RDMA adapter present.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.10 | 3.11 | 5.10.270 | ccce6b7ef1d7 |
| 5.15 | 3.11 | 5.15.221 | d99622e40aaa |
| 6.1 | 3.11 | 6.1.188 | c845e5e05140 |
| 6.12 | 3.11 | 6.12.110 | d7fa2ff72ad1 |
| 6.18 | 3.11 | 6.18.52 | 5b6cfc6d7ff0 |
| 6.6 | 3.11 | 6.6.157 | 42fb8aefffff |
| 7.2 | 3.11 | 7.2.6 | f917707f0de0 |
| mainline | 3.11 | 7.3 | dec47e4b0fe3 |
| cip/5.10 | 3.11 | 5.10.271-cip78 | ccce6b7ef1d7 |
| cip/5.10-rt | 3.11 | 5.10.272-cip79-rt35 | ccce6b7ef1d7 |
| cip/6.1 | 3.11 | 6.1.189-cip61 | c845e5e05140 |
| cip/6.1-rt | 3.11 | 6.1.189-cip61-rt32 | c845e5e05140 |
| cip/6.12 | 3.11 | 6.12.111-cip32 | d7fa2ff72ad1 |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.111-cip32 |
| cip/6.1 | Fixed in 6.1.189-cip61 |
| cip/6.1-rt | Fixed in 6.1.189-cip61-rt32 |
| cip/5.10 | Fixed in 5.10.271-cip78 |
| cip/5.10-rt | Fixed in 5.10.272-cip79-rt35 |
| cip/4.19 | Affected — no CIP fix yet (latest 4.19.325-cip136) |
| cip/4.19-rt | Affected — no CIP fix yet (latest 4.19.325-cip136-rt50) |
| cip/4.4 | Affected — no CIP fix yet (latest 4.4.302-cip115) |
| cip/4.4-rt | Affected — no CIP fix yet (latest 4.4.302-cip115-rt63) |