cxgb4: fix memory leak in cxgb4_init_ethtool_filters() error path
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ d915c299f1da68a7dbb43895b8741c7b916c9d08 · < 76deedea08899885f076aba0bb80bd1276446822| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
cxgb4: fix memory leak in cxgb4_init_ethtool_filters() error path
In the for loop used to allocate the loc_array and bmap for each port, a memory leak is possible when the allocation for loc_array succeeds, but the allocation for bmap fails. This is because when the control flow goes to the label free_eth_finfo, only the allocations starting from (i-1)th iteration are freed.
Fix that by freeing the loc_array in the bmap allocation error path.
From the CVE record · Linux
The Linux kernel’s cxgb4 driver can leak memory if allocation of a port’s loc_array succeeds but allocation of its bmap fails. The input does not establish whether an attacker can trigger this condition, or specify network access, authentication, or user interaction requirements.
Engineers running Linux kernels with the cxgb4 driver should check their versions against the vendor advisory; affected versions are not specified.