RDMA/irdma: Fix OOB read during CQ MR registration
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ b48c24c2d710cf34810c555dcef883a3d35a9c08 · < d5aa82da8f65562da996d184686db9d0ea718b91| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
RDMA/irdma: Fix OOB read during CQ MR registration
Sashiko pointed out an unrelated bug during a previous patch: https://sashiko.dev/#/patchset/20260512183852.614045-1-jmoroni%40google.com
This change fixes the bug by eliminating the cqmr->split field which was not being set properly and instead just checks the CQ resize feature flag directly.
The cqmr->split field essentially tracks whether IRDMA_FEATURE_CQ_RESIZE is set, but it was not being set until CQ creation time, which is _after_ CQ memory registration (the only other place where it is referenced).
As a result, it would always be false during MR registration and would therefore cause irdma_handle_q_mem to populate cqmr->shadow even for GEN_2 HW and beyond:
cqmr->shadow = (dma_addr_t)arr[req->cq_pages];
The issue is that for GEN_2 and beyond, req->cq_pages may be exactly equal to iwmr->page_cnt and therefore equal to the size of arr, which would cause an OOB read by one.
From the CVE record · Linux
The Linux kernel's RDMA/irdma driver can read one entry past an array during CQ memory registration on GEN_2 or later hardware when the CQ page count equals the memory region page count. The input does not specify whether an attacker can trigger this remotely or locally, or whether authentication or user interaction is required.
Engineers running Linux kernels with the RDMA/irdma driver on GEN_2 or later hardware should check their exposure; affected versions were not provided.