tg3: clean up PHYLIB resources on probe failure
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 158d7abdae85e9ac43d99780c372d79c119f7626 · < 6515c41503eef849abd2c7364f34e4bb25110f90| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
tg3: clean up PHYLIB resources on probe failure
tg3_get_invariants() can register an MDIO bus and connect a PHY for USE_PHYLIB devices. If tg3_init_one() later fails, its common error path releases the mappings and netdev without undoing those PHYLIB resources.
Disconnect the PHY and unregister the MDIO bus before the remaining teardown. Guard PHY cleanup with USE_PHYLIB to match tg3_phy_init(), and call tg3_mdio_fini() unconditionally to match tg3_mdio_init(). The existing IS_CONNECTED and MDIOBUS_INITED flags make both helpers safe when initialization only completed partially.
This issue was identified during our ongoing static-analysis research while reviewing kernel code.
From the CVE record · Linux
The tg3 driver can leave an MDIO bus registered and a PHY connected if device initialization fails after those resources are set up. The input does not describe an attacker action or specify network, local, authentication, or user-interaction conditions.
Engineers running Linux kernels with the tg3 driver should check their versions; affected versions are not specified.