Skip to contentSkip to conversation

CVE-2026-72391: net: phy: sfp: free mii_bus in sfp_i2c_mdiobus_destroy

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Aug 15

lore
Share & tools
lore
#0 lore raw

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

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

In the Linux kernel, the following vulnerability has been resolved:

net: phy: sfp: free mii_bus in sfp_i2c_mdiobus_destroy

sfp_i2c_mdiobus_create() allocates the I2C MDIO bus with mdio_i2c_alloc(), a plain (non-devm) allocation, and registers it. sfp_i2c_mdiobus_destroy() only unregisters the bus and clears sfp->i2c_mii without calling mdiobus_free(). As the only reference to the bus is then cleared, the struct mii_bus is leaked.

This is hit whenever a copper/RollBall SFP module that instantiated an MDIO bus is removed: sfp_sm_main() takes the global teardown path and calls sfp_i2c_mdiobus_destroy(). sfp_cleanup(), on driver unbind, frees sfp->i2c_mii directly, which is why the leak only triggered on module hot-removal and not on unbind.

Free the bus in sfp_i2c_mdiobus_destroy() to match the allocation done in sfp_i2c_mdiobus_create().

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

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

	Issue introduced in 6.1 with commit e85b1347ace677c3822c12d9332dfaaffe594da6 and fixed in 6.1.178 with commit 92dd9a522f01ef57f633a8c1953cf6d48ef2bcd5
	Issue introduced in 6.1 with commit e85b1347ace677c3822c12d9332dfaaffe594da6 and fixed in 6.6.145 with commit d2c37f26d1a37f8177be5f354537f8ee3ec31cc2
	Issue introduced in 6.1 with commit e85b1347ace677c3822c12d9332dfaaffe594da6 and fixed in 6.12.97 with commit 3183b6f5510c876a1c4b4a6bdc3d0ad8940fe742
	Issue introduced in 6.1 with commit e85b1347ace677c3822c12d9332dfaaffe594da6 and fixed in 6.18.40 with commit 86d379fcf1b79bdf4bc2ac891297f30f63d041d8
	Issue introduced in 6.1 with commit e85b1347ace677c3822c12d9332dfaaffe594da6 and fixed in 7.1.5 with commit 2381bf3f484e8e4fd89a225445872ec14e036ab5
	Issue introduced in 6.1 with commit e85b1347ace677c3822c12d9332dfaaffe594da6 and fixed in 7.2-rc2 with commit 8f31efff9206f9f0adb853cad6916086aac4d5ef

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-72391

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/phy/sfp.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/92dd9a522f01ef57f633a8c1953cf6d48ef2bcd5
	https://git.kernel.org/stable/c/d2c37f26d1a37f8177be5f354537f8ee3ec31cc2
	https://git.kernel.org/stable/c/3183b6f5510c876a1c4b4a6bdc3d0ad8940fe742
	https://git.kernel.org/stable/c/86d379fcf1b79bdf4bc2ac891297f30f63d041d8
	https://git.kernel.org/stable/c/2381bf3f484e8e4fd89a225445872ec14e036ab5
	https://git.kernel.org/stable/c/8f31efff9206f9f0adb853cad6916086aac4d5ef