RDMA/siw: Fix use-after-free in siw_accept()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 6c52fdc244b5ccc468006fd65a504d4ee33743c7 · < de603f01d9ccf823e575b013ffd86ebedca9a8c5| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
RDMA/siw: Fix use-after-free in siw_accept()
siw_accept() looks up the QP supplied by userspace. If that QP is already in RTS, the function jumps to error cleanup before associating the incoming CEP with it.
The cleanup tests whether qp->cep is non-NULL and assumes the current call installed the association. However, qp->cep can point to the CEP of an existing connection. The cleanup then drops a reference from the incoming cep, not qp->cep. Once the incoming endpoint loses its remaining references, this can free it before the subsequent cep->qp store, causing a use-after-free. It also clears the existing QP association.
Only release the association reference when qp->cep is the incoming CEP. This preserves an existing association and avoids accessing the freed endpoint.
From the CVE record · Linux
The Linux kernel's RDMA/siw siw_accept() cleanup can mishandle an incoming connection when userspace supplies a QP that is already in RTS. This can free the incoming endpoint before a later access, causing a use-after-free, and can clear the existing QP association. The described trigger involves a userspace-supplied QP; the input does not specify authentication requirements.
Engineers running Linux kernels with RDMA/siw should check whether their kernel is affected; no affected versions are specified.