KernelScan.io

HIGH Introduced in 4.8

cxgb4 DeregSkb DoubleFree

CVE-2026-90417

CVSS 7.0 / 10.0 KernelScan AI

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

01

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().

02

Engine v0.6.0

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.

Affecteddrivers/infiniband/hw/cxgb4/mem.c (RDMA/cxgb4)

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).

03

BranchIntroducedFixed inPatch commit
7.24.87.2.66b15fc9bc117
mainline4.87.3-rc1373f3716a2de