mlxsw: fix refcount leak in mlxsw_sp_port_lag_join()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 0d65fc13042fce6a2d6de58ff0dc9531e8523c07 · < 2d8b3c3e129973a51ae924bdcf6993a76b828814| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
mlxsw: fix refcount leak in mlxsw_sp_port_lag_join()
When mlxsw_sp_port_lag_index_get() fails, mlxsw_sp_port_lag_join() returns an error without releasing the lag reference obtained by the earlier mlxsw_sp_lag_get(). All other error paths in the function jump to the cleanup label that ends with mlxsw_sp_lag_put(), so this is a single missed release.
Fix the leak by replacing the bare 'return err' with a goto to the existing error cleanup label, which will drop the reference safely.
From the CVE record · Linux
The Linux kernel's mlxsw_sp_port_lag_join() leaks a LAG reference when mlxsw_sp_port_lag_index_get() fails. The input does not describe an attacker-controlled trigger, resulting impact, or access requirements.
Engineers running the Linux kernel with mlxsw should check their deployments; affected versions are not specified.