CVE-2022-48815: net: dsa: bcm_sf2: don't use devres for mdiobus
In the Linux kernel, the following vulnerability has been resolved:
net: dsa: bcm_sf2: don't use devres for mdiobus
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 Starfighter 2 is a platform 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 bcm_sf2 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 bcm_sf2 driver has the code structure in place for orderly mdiobus
removal, so just replace devm_mdiobus_alloc() with the non-devres
variant, and add manual free where necessary, to ensure that we don't
let devres free a still-registered bus.
Security readout for executives and security teams
Plain-English summary
This Linux kernel issue can cause a kernel panic when certain Broadcom Starfighter 2 switch driver resources are released during shutdown or driver unbinding. It is most relevant to embedded or networking systems using this driver. Public sources do not show active exploitation or a CVSS score.
Executive priority
Treat as targeted maintenance for affected networking or embedded Linux assets. It is not currently a broad emergency, but it can affect availability on devices that rely on this switch driver. Patch through normal kernel or firmware update channels.
Technical view
The bcm_sf2 DSA driver used devres allocation for an MDIO bus that could still be registered when devres cleanup ran. In shutdown paths involving device links, such as a DSA master on a bus that removes devices during shutdown, mdiobus_free() could panic. Kernel stable commits replace devm_mdiobus_alloc() with manual allocation and cleanup.
Likely exposure
Exposure is likely limited to Linux systems using the Broadcom bcm_sf2 DSA switch driver, especially embedded networking platforms. Generic Linux servers without this hardware or driver path are unlikely to be affected. Exact distribution exposure depends on vendor kernel backports.
Exploitation context
The source describes a crash condition during shutdown or driver unbinding, not remote code execution. No KEV listing or provided source indicates active exploitation. Practical impact appears to be denial of service or unreliable shutdown on specific hardware and driver configurations.
Researcher notes
The CVE record provides no CVSS, CWE, or exploit evidence. The key condition is a still-registered MDIO bus freed through devres cleanup during bcm_sf2 unbind. Validate against actual kernel source or vendor backports rather than version strings alone.
Mitigation direction
Update to a vendor kernel containing the referenced stable bcm_sf2 fix commits.
Check distribution or device vendor advisories for backported fixes.
Prioritize embedded networking devices using Broadcom Starfighter 2 switch hardware.
If no vendor fix is available, follow vendor guidance for operational workarounds.
Validation and detection
Inventory systems for Linux kernels using the bcm_sf2 DSA driver.
Identify kernel version and vendor patch level against referenced stable commits.
Review shutdown or driver-unbind logs for kernel panic traces involving mdiobus_free or bcm_sf2.
Confirm fixed kernels no longer use devres allocation for this bcm_sf2 MDIO bus path.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2022-48815 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.