RDMA/srpt: Fix srpt_alloc_rw_ctxs() unwind counters
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ b99f8e4d7bcd3bfbb3cd965918523299370d0cb2 · < af073bd245180393bcb15d33d3990a6bdc32593a| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
RDMA/srpt: Fix srpt_alloc_rw_ctxs() unwind counters
When srpt_alloc_rw_ctxs() fails partway through a multi-buffer indirect descriptor, the unwind path destroys RDMA contexts but leaves stale n_rw_ctx and n_rdma values (and a dangling rw_ctxs pointer). Later sq_wr_avail accounting in srpt_queue_response() or srpt_write_pending() can then subtract the wrong number of send queue credits.
Reset the counters and clear rw_ctxs after freeing the heap allocation before returning an error.
From the CVE record · Linux
In the Linux kernel’s RDMA/srpt component, a partial allocation failure can leave stale counters and a dangling pointer after cleanup. Subsequent response or write handling can subtract the wrong number of send queue credits. The input does not establish how an attacker could trigger this condition or whether authentication or user interaction is required.
Engineers running Linux kernels with RDMA/srpt should check their versions; affected versions were not provided.