net: macb: destroy the phylink instance on the probe error path
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 7897b071ac3b45a5788d084fc7f8a8ee9e5f07f0 · < 7d059f390750152b9bd69df934198651b94fc26d| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: macb: destroy the phylink instance on the probe error path
macb_mii_init() creates a phylink instance on both of its success paths, but the probe unwind frees the netdev without destroying it, so a failing macb_alloc_tieoff() or register_netdev() leaks the instance.
Destroy it at err_out_unregister_mdio, which is only reachable once macb_mii_init() has succeeded, so bp->phylink is valid there.
From the CVE record · Linux
The Linux kernel macb network driver leaks a phylink instance if probe fails after initialization, including when macb_alloc_tieoff() or register_netdev() fails. The input does not establish whether an attacker can trigger the failure, or specify any network, authentication, or user-interaction conditions.
Engineers running the Linux kernel with the macb network driver should check their kernel; affected versions are not specified.