Description
In the Linux kernel, the following vulnerability has been resolved:
net: dsa: ar9331: register the mdiobus under devres
As explained in commits:
74b6d7d13307 ("net: dsa: realtek: register the MDIO bus under devres")
5135e96a3dd2 ("net: dsa: don't allocate the slave_mii_bus using devres")
mdiobus_free() will panic when called from devm_mdiobus_free() <-
devres_release_all() <- __device_release_driver(), and that mdiobus was
not previously unregistered.
The ar9331 is an MDIO device, so the initial set of constraints that I
thought would cause this (I2C or SPI buses which call ->remove on
->shutdown) do not apply. But there is one more which applies here.
If the DSA master itself is on a bus that calls ->remove from ->shutdown
(like dpaa2-eth, which is on the fsl-mc bus), there is a device link
between the switch and the DSA master, and device_links_unbind_consumers()
will unbind the ar9331 switch driver on shutdown.
So the same treatment must be applied to all DSA switch drivers, which
is: either use devres for both the mdiobus allocation and registration,
or don't use devres at all.
The ar9331 driver doesn't have a complex code structure for mdiobus
removal, so just replace of_mdiobus_register with the devres variant in
order to be all-devres and ensure that we don't free a still-registered
bus.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Linux | Linux | 5.9 | 5.10.101 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | linux | 5.16.10-1 | — |
| Debian 13 | linux | 5.16.10-1 | — |
| Debian 12 | linux | 5.16.10-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 24.04 LTS | linux-raspi-realtime | No fix yet | — |
| Ubuntu 22.04 LTS | linux-riscv +25 | No fix yet | — |
| Ubuntu 20.04 LTS | linux-gke +26 | No fix yet | — |
| Ubuntu 20.04 LTS | linux-intel-iotg-5.15 | 5.15.0-1008.11~20.04.1 | — |
| Ubuntu 18.04 LTS | linux-gcp +14 | No fix yet | — |
| Ubuntu 16.04 LTS | linux-hwe-edge | No fix yet | — |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP5 | kernel-64kb +5 | 5.14.21-150500.55.73.1 | SUSE-SU-2024:2939-1 |
| SLES 15 SP5 | kernel-azure +2 | 5.14.21-150500.33.63.1 | SUSE-SU-2024:2947-1 |
| SLES 15 SP5 | kernel-default-base | 5.14.21-150500.55.73.1.150500.6.33.8 | SUSE-SU-2024:2939-1 |
| SLES 15 SP5 | kernel-docs | 5.14.21-150500.55.73.2 | SUSE-SU-2024:2939-1 |
| SLES 15 SP4 | kernel-64kb +6 | 5.14.21-150400.24.128.1 | SUSE-SU-2024:2929-1 |
| SLES 15 SP4 | kernel-default-base | 5.14.21-150400.24.128.1.150400.24.62.1 | SUSE-SU-2024:2929-1 |
Show 10 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 15 SP4 | kernel-default-base | 5.14.21-150400.24.128.1.150400.24.62.1 | SUSE-SU-2024:2929-1 |
| SLES for SAP 15 SP4 | kernel-docs +4 | 5.14.21-150400.24.128.1 | SUSE-SU-2024:2929-1 |
| SLE Micro 5.5 | kernel-default | 5.14.21-150500.55.73.1 | SUSE-SU-2024:2939-1 |
| SLE Micro 5.5 | kernel-default-base | 5.14.21-150500.55.73.1.150500.6.33.8 | SUSE-SU-2024:2939-1 |
| SLE Micro 5.5 | kernel-rt +1 | 5.14.21-150500.13.64.1 | SUSE-SU-2024:2894-1 |
| SLE Micro 5.4 | kernel-default | 5.14.21-150400.24.128.1 | SUSE-SU-2024:2929-1 |
| SLE Micro 5.4 | kernel-default-base | 5.14.21-150400.24.128.1.150400.24.62.1 | SUSE-SU-2024:2929-1 |
| SLE Micro 5.4 | kernel-rt +1 | 5.14.21-150400.15.88.1 | SUSE-SU-2024:2902-1 |
| SLE Micro 5.3 | kernel-default | 5.14.21-150400.24.128.1 | SUSE-SU-2024:2929-1 |
| SLE Micro 5.3 | kernel-default-base | 5.14.21-150400.24.128.1.150400.24.62.1 | SUSE-SU-2024:2929-1 |
| SLE Micro 5.3 | kernel-rt +1 | 5.14.21-150400.15.88.1 | SUSE-SU-2024:2902-1 |
| SLE Live Patching 15 SP5 | kernel-default | 5.14.21-150500.55.73.1 | SUSE-SU-2024:2939-1 |
| SLE Live Patching 15 SP5 | kernel-livepatch-SLE15-SP5_Update_17 +1 | 1-150500.11.3.1 | SUSE-SU-2024:2939-1, SUSE-SU-2024:2894-1 |
| SLE Live Patching 15 SP4 | kernel-default | 5.14.21-150400.24.128.1 | SUSE-SU-2024:2929-1 |
| SLE Live Patching 15 SP4 | kernel-livepatch-SLE15-SP4_Update_29 | 1-150400.9.3.1 | SUSE-SU-2024:2929-1 |
| SLE HPC 15 SP4 | kernel-64kb +5 | 5.14.21-150400.24.128.1 | SUSE-SU-2024:2929-1 |
| SLE HPC 15 SP4 | kernel-default-base | 5.14.21-150400.24.128.1.150400.24.62.1 | SUSE-SU-2024:2929-1 |
| SUSE Real Time Module 15 SP5 | kernel-rt +3 | 5.14.21-150500.13.64.1 | SUSE-SU-2024:2894-1 |
| SUSE Manager Server 4.3 | kernel-default-base | 5.14.21-150400.24.128.1.150400.24.62.1 | SUSE-SU-2024:2929-1 |
| SUSE Manager Server 4.3 | kernel-syms +3 | 5.14.21-150400.24.128.1 | SUSE-SU-2024:2929-1 |
| SUSE Manager Proxy 4.3 | kernel-default-base | 5.14.21-150400.24.128.1.150400.24.62.1 | SUSE-SU-2024:2929-1 |
| SUSE Manager Proxy 4.3 | kernel-syms +2 | 5.14.21-150400.24.128.1 | SUSE-SU-2024:2929-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Leap 15.5 | dtb-aarch64 +9 | 5.14.21-150500.55.73.1 | SUSE-SU-2024:2939-1 |
| openSUSE Leap 15.5 | kernel-azure +2 | 5.14.21-150500.33.63.1 | SUSE-SU-2024:2947-1 |
| openSUSE Leap 15.5 | kernel-default-base | 5.14.21-150500.55.73.1.150500.6.33.8 | SUSE-SU-2024:2939-1 |
| openSUSE Leap 15.5 | kernel-docs | 5.14.21-150500.55.73.2 | SUSE-SU-2024:2939-1 |
| openSUSE Leap 15.5 | kernel-rt +3 | 5.14.21-150500.13.64.1 | SUSE-SU-2024:2894-1 |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Leap Micro 5.5 | kernel-default | 5.14.21-150500.55.73.1 | SUSE-SU-2024:2939-1 |
| openSUSE Leap Micro 5.5 | kernel-default-base | 5.14.21-150500.55.73.1.150500.6.33.8 | SUSE-SU-2024:2939-1 |
| openSUSE Leap Micro 5.5 | kernel-rt | 5.14.21-150500.13.64.1 | SUSE-SU-2024:2894-1 |
Advisories 6
- WID-SEC-2024-1625 Linux Kernel: Mehrere Schwachstellen ermöglichen nicht spezifizierten Angriff BSI CERT-Bund (WID) · Jul 27, 2026
- SUSE-SU-2024:2947-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:2939-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:2902-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:2929-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:2894-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · May 2, 2025