CVE-2026-143258: net/mlx5e: TC, Fix double free of branch in failure
In the Linux kernel, the following vulnerability has been resolved:
net/mlx5e: TC, Fix double free of branch in failure
When allocating the false branch fails in parsebranchctrl(), the already allocated true branch is freed but attr->branchtrue is left pointing to it. The caller parsetcactions() fails the flow, and freeflowpostacts(), mlx5freeflowattractions() which calls again freebranchattr() on attr->branchtrue.
Clear the pointer after freeing it.
This bug is theoretical and was compile tested only.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.120 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.66 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.7 - Compensating control
In parse_branch_ctrl(), clear attr->branch_true after freeing the allocated true branch so later cleanup does not free it again.
Event History
Frequently Asked Questions
Under what condition can the double free occur?
It requires allocation of the false branch in parse_branch_ctrl() to fail after the true branch has already been allocated. The stale attr->branch_true pointer is then freed again during flow cleanup.
Is this known to be exploitable in practice?
The issue is described as theoretical and compile tested only. The provided information does not identify a demonstrated exploitation path or affected default configuration.
How can I determine whether a system includes the fix?
Check whether the kernel source or applied stable patches include the change that clears attr->branch_true after freeing the true branch when false-branch allocation fails. The provided references identify commits containing the fix.