RDMA/irdma: Prevent rereg_mr for non-mem regions
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
RDMA/irdma: Prevent rereg_mr for non-mem regions
When a QP/CQ/SRQ is created, a two step process is used where the buffer is allocated in userspace and explicitly registered with the normal reg_mr mechanism prior to creating the actual QP/CQ/SRQ object.
These special registrations are indicated via an ABI field so the driver knows that they do not have a valid mkey and to skip the actual CQP command submission.
Since these are real MR objects from the core's perspective, it is possible for a user application to invoke rereg_mr on them and cause a real CQP op to be emitted with the zero-initialized mkey value of 0.
Fix this by preventing rereg_mr on these special regions.
From the CVE record · Linux
The Linux kernel's RDMA/irdma driver allows re-registration of special memory regions used for QP, CQ, and SRQ buffers. A local user application can re-register one of these regions, causing the driver to submit a CQP command with a zero-initialized memory key.
Engineers running Linux kernels with the RDMA/irdma driver should check whether their kernel includes the fix; affected versions were not specified.