CVE-2026-97972: net: macb: put the "mdio" child node reference on success
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
net: macb: put the "mdio" child node reference on success
macb_mii_init() holds the reference returned by of_get_child_by_name() for macb_mdiobus_register() and drops it only on the error paths, so every successful probe leaks a node reference. On a CM5, overlay removal after four bind cycles reports
OF: ERROR: memory leak, expected refcount 1 instead of 5
Drop the reference after registration, where __mdiobus_register() has already taken its own for the lifetime of the bus.
The Linux kernel CVE team has assigned CVE-2026-97972 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.13 with commit 8a6631f1cece09047fa44608d21d520ca65ce7d8 and fixed in 6.18.53 with commit 5fba30080d298edb742396073372385c961578d3 Issue introduced in 6.13 with commit 8a6631f1cece09047fa44608d21d520ca65ce7d8 and fixed in 7.2.7 with commit 7d60dc7ff85b73a2119d582ca2d4456b30960380 Issue introduced in 6.13 with commit 8a6631f1cece09047fa44608d21d520ca65ce7d8 and fixed in 7.3-rc3 with commit 382a373d9ea7a6ac4de9c022385b6217f65ae3cc
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-97972
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/cadence/macb_main.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/5fba30080d298edb742396073372385c961578d3 https://git.kernel.org/stable/c/7d60dc7ff85b73a2119d582ca2d4456b30960380 https://git.kernel.org/stable/c/382a373d9ea7a6ac4de9c022385b6217f65ae3cc