ice: Fix memory leak in ice_set_ringparam()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ fcea6f3da546b93050f3534aadea7bd96c1d7349 · < fe868b499d16f55bbeea89992edb98043c9de416| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ice: Fix memory leak in ice_set_ringparam()
In ice_set_ringparam, tx_rings and xdp_rings are allocated before rx_rings. If the allocation of rx_rings fails, the code jumps to the done label leaking both tx_rings and xdp_rings. Furthermore, if the setup of an individual Rx ring fails during the loop, the code jumps to the free_tx label which releases tx_rings but leaks xdp_rings.
Fix this by introducing a free_xdp label and updating the error paths to ensure both xdp_rings and tx_rings are properly freed if rx_rings allocation or setup fails.
Compile tested only. Issue found using a prototype static analysis tool and code review.
From the CVE record · Linux
The Linux kernel's ice_set_ringparam() can leak allocated ring memory if Rx ring allocation or setup fails. The input does not establish an attacker path or specify network access, authentication, or user-interaction requirements.
Engineers running the Linux kernel should check whether their kernel includes the affected ice code; affected versions are not specified.