Skip to contentSkip to conversation

CVE-2026-98594: tg3: clean up PHYLIB resources on probe failure

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 18

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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.

The Linux kernel CVE team has assigned CVE-2026-98594 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 2.6.27 with commit 158d7abdae85e9ac43d99780c372d79c119f7626 and fixed in 5.10.271 with commit ce86d6929d03e6b0abcb781dfa50f9f0816bff78
	Issue introduced in 2.6.27 with commit 158d7abdae85e9ac43d99780c372d79c119f7626 and fixed in 5.15.222 with commit a449eedb3b1eb5b8b1f5ed116a1bfe85eaaf81df
	Issue introduced in 2.6.27 with commit 158d7abdae85e9ac43d99780c372d79c119f7626 and fixed in 6.1.189 with commit 0844402326d4e48a28688f93ec6442e93bb442fa
	Issue introduced in 2.6.27 with commit 158d7abdae85e9ac43d99780c372d79c119f7626 and fixed in 6.6.158 with commit e766321288b507afb70d2bfef6ba443213329f79
	Issue introduced in 2.6.27 with commit 158d7abdae85e9ac43d99780c372d79c119f7626 and fixed in 6.12.112 with commit d2abb0013b933d59ee441185df0eca9e8c0b33eb
	Issue introduced in 2.6.27 with commit 158d7abdae85e9ac43d99780c372d79c119f7626 and fixed in 6.18.55 with commit 6515c41503eef849abd2c7364f34e4bb25110f90
	Issue introduced in 2.6.27 with commit 158d7abdae85e9ac43d99780c372d79c119f7626 and fixed in 7.2.9 with commit b6c0c757c65893ad7bb17e8bcf33cdd8257d7b3d
	Issue introduced in 2.6.27 with commit 158d7abdae85e9ac43d99780c372d79c119f7626 and fixed in 7.3-rc5 with commit a92e1a412c53dc0d9ad639e7abf8b3fc70a5b6ad

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-98594

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/net/ethernet/broadcom/tg3.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/ce86d6929d03e6b0abcb781dfa50f9f0816bff78
	https://git.kernel.org/stable/c/a449eedb3b1eb5b8b1f5ed116a1bfe85eaaf81df
	https://git.kernel.org/stable/c/0844402326d4e48a28688f93ec6442e93bb442fa
	https://git.kernel.org/stable/c/e766321288b507afb70d2bfef6ba443213329f79
	https://git.kernel.org/stable/c/d2abb0013b933d59ee441185df0eca9e8c0b33eb
	https://git.kernel.org/stable/c/6515c41503eef849abd2c7364f34e4bb25110f90
	https://git.kernel.org/stable/c/b6c0c757c65893ad7bb17e8bcf33cdd8257d7b3d
	https://git.kernel.org/stable/c/a92e1a412c53dc0d9ad639e7abf8b3fc70a5b6ad