CVE-2026-98620: net: ethernet: mtk_eth_soc: unregister net_devices in case of probe failure
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
net: ethernet: mtk_eth_soc: unregister net_devices in case of probe failure
If register_netdev() fails for one of the MTK_MAX_DEVS devices in mtk_probe(), the error path jumps to err_deinit_ppe, skipping mtk_unreg_dev(). The previously registered net_devices are then freed by mtk_free_dev() while still in NETREG_REGISTERED state, hitting the BUG_ON(dev->reg_state != NETREG_UNREGISTERED).
Route the register_netdev() failure to err_unreg_netdev so the net_devices registered so far are properly unregistered before being freed.
The Linux kernel CVE team has assigned CVE-2026-98620 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.9 with commit 8a8a9e89f801ce5d3d1d57ac48db678caf072147 and fixed in 6.6.158 with commit 245bea0c7ab278150c70366bdeb69b901327133c Issue introduced in 4.9 with commit 8a8a9e89f801ce5d3d1d57ac48db678caf072147 and fixed in 6.12.112 with commit ab3bde3b3e56331b4f53a1f6cf4e5e9d1c14c1a0 Issue introduced in 4.9 with commit 8a8a9e89f801ce5d3d1d57ac48db678caf072147 and fixed in 6.18.55 with commit 7254b702e556158e34b4d7c168b5d8e7da5978af Issue introduced in 4.9 with commit 8a8a9e89f801ce5d3d1d57ac48db678caf072147 and fixed in 7.2.9 with commit 0fdb944d4df02223c67d5e65c4c134ecb57a5668 Issue introduced in 4.9 with commit 8a8a9e89f801ce5d3d1d57ac48db678caf072147 and fixed in 7.3-rc5 with commit 310d1ac61a4d5a2ca8356a3a48d263acf54503ce
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-98620
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/mediatek/mtk_eth_soc.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/245bea0c7ab278150c70366bdeb69b901327133c https://git.kernel.org/stable/c/ab3bde3b3e56331b4f53a1f6cf4e5e9d1c14c1a0 https://git.kernel.org/stable/c/7254b702e556158e34b4d7c168b5d8e7da5978af https://git.kernel.org/stable/c/0fdb944d4df02223c67d5e65c4c134ecb57a5668 https://git.kernel.org/stable/c/310d1ac61a4d5a2ca8356a3a48d263acf54503ce