RDMA/irdma: Prevent user-triggered null deref on QP create
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ b48c24c2d710cf34810c555dcef883a3d35a9c08 · < b9b0889071569d43623c260074e159cd8f26adb1| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
RDMA/irdma: Prevent user-triggered null deref on QP create
Previously, the user QP creation path would only attempt to populate iwqp->iwpbl if the user-provided req.user_wqe_bufs field was non-zero. The problem is that iwqp->iwpbl is unconditionally dereferenced later on in irdma_setup_virt_qp.
While there was a check for iwqp->iwpbl != NULL, this check would only occur if req.user_wqe_bufs was non-zero. The end result is that a user could send a zero user_wqe_bufs value and trigger a null ptr deref.
Fix this by unconditionally calling irdma_get_pbl and bailing if it fails, similar to the CQ and SRQ paths.
From the CVE record · Linux
The Linux kernel’s RDMA/irdma user QP creation path can dereference a null pointer when a user supplies a zero user_wqe_bufs value. A local user able to create a QP can trigger the dereference; no further user interaction is described.
Engineers running Linux kernels with RDMA/irdma should check whether their kernel is affected; affected versions are not specified.