HIGH Introduced in 4.8
cxgb4 DeregSkb DoubleFree
CVE-2026-90417
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
01Description
In the Linux kernel, the following vulnerability has been resolved: RDMA/cxgb4: Fix dereg_skb leak and double free in write_tpt_entry() When the device is in the fatal error state, write_tpt_entry() returns -EIO before handing the caller's preallocated skb to the transmit path; its allocation-failure returns do the same. c4iw_dereg_mr() ignores the error and frees mhp, leaking mhp->dereg_skb. c4iw_get_dma_mr() instead frees the skb a second time after dereg_mem() already consumed it, a double free. Make write_tpt_entry() the sole owner of a non-NULL skb, freeing it on every return preceding handoff to c4iw_ofld_send(): fatal error, tpt and stag allocation failure. c4iw_ofld_send() consumes the skb on success and error alike, so drop the redundant kfree_skb() in c4iw_get_dma_mr() after dereg_mem().
02KernelScan AI Analysis
Risk summary
A local attacker with access to a Chelsio T4/T5/T6 RDMA device can trigger a double free or memory leak in the memory region deregistration error paths. The double free corrupts the kernel heap and may be exploitable for arbitrary code execution; the leak can drive the system toward resource exhaustion. Systems without Chelsio RDMA hardware are unaffected.
Vulnerability analysis
The cxgb4 RDMA driver mishandles a preallocated socket buffer on error paths during memory region registration and deregistration. When the network device is in a fatal error state or when internal allocations fail, the write path returns early without freeing the caller's buffer, causing a leak in the deregistration path; conversely, when an initial registration succeeds but a follow-up step fails, the cleanup routine consumes the buffer and then the error handler frees it again, producing a double free. The fix makes the write path the sole owner of the buffer — freeing it on every early return before handing it to the transmit layer — and removes the redundant free in the caller's error path after the cleanup routine has already consumed it. This is reachable locally through the RDMA verbs interface on systems equipped with Chelsio T4/T5/T6 network hardware, requiring access to the RDMA device (typically root or membership in the rdma group).
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.12 | 4.8 | 6.12.114 | 379cf06e6fe3 |
| 6.18 | 4.8 | 6.18.57 | 2fcd26f46801 |
| 6.6 | 4.8 | 6.6.160 | 68c1d2c085f2 |
| 7.2 | 4.8 | 7.2.6 | 6b15fc9bc117 |
| mainline | 4.8 | 7.3 | 373f3716a2de |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Affected — no CIP fix yet (latest 6.12.112-cip33) |
| cip/6.1 | Affected — no CIP fix yet (latest 6.1.189-cip61) |
| cip/6.1-rt | Affected — no CIP fix yet (latest 6.1.189-cip61-rt32) |
| cip/5.10 | Affected — no CIP fix yet (latest 5.10.271-cip78) |
| cip/5.10-rt | Affected — no CIP fix yet (latest 5.10.268-cip77-rt34) |
| cip/4.19 | Affected — no CIP fix yet (latest 4.19.325-cip136) |
| cip/4.19-rt | Affected — no CIP fix yet (latest 4.19.325-cip136-rt50) |