CVE-2022-48814
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
16/07/2024
Last modified:
03/10/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
net: dsa: seville: register the mdiobus under devres<br />
<br />
As explained in commits:<br />
74b6d7d13307 ("net: dsa: realtek: register the MDIO bus under devres")<br />
5135e96a3dd2 ("net: dsa: don&#39;t allocate the slave_mii_bus using devres")<br />
<br />
mdiobus_free() will panic when called from devm_mdiobus_free() shutdown) do not apply. But there is one more which<br />
applies here.<br />
<br />
If the DSA master itself is on a bus that calls ->remove from ->shutdown<br />
(like dpaa2-eth, which is on the fsl-mc bus), there is a device link<br />
between the switch and the DSA master, and device_links_unbind_consumers()<br />
will unbind the seville switch driver on shutdown.<br />
<br />
So the same treatment must be applied to all DSA switch drivers, which<br />
is: either use devres for both the mdiobus allocation and registration,<br />
or don&#39;t use devres at all.<br />
<br />
The seville driver has a code structure that could accommodate both the<br />
mdiobus_unregister and mdiobus_free calls, but it has an external<br />
dependency upon mscc_miim_setup() from mdio-mscc-miim.c, which calls<br />
devm_mdiobus_alloc_size() on its behalf. So rather than restructuring<br />
that, and exporting yet one more symbol mscc_miim_teardown(), let&#39;s work<br />
with devres and replace of_mdiobus_register with the devres variant.<br />
When we use all-devres, we can ensure that devres doesn&#39;t free a<br />
still-registered bus (it either runs both callbacks, or none).
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.9 (including) | 5.15.27 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 5.16.10 (excluding) |
| cpe:2.3:o:linux:linux_kernel:5.17:rc1:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:5.17:rc2:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:5.17:rc3:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/0e816362d823cd46c666e64d8bffe329ee22f4cc
- https://git.kernel.org/stable/c/1d13e7221035947c62800c9d3d99b4ed570e27e7
- https://git.kernel.org/stable/c/bd488afc3b39e045ba71aab472233f2a78726e7b
- https://git.kernel.org/stable/c/0e816362d823cd46c666e64d8bffe329ee22f4cc
- https://git.kernel.org/stable/c/1d13e7221035947c62800c9d3d99b4ed570e27e7
- https://git.kernel.org/stable/c/bd488afc3b39e045ba71aab472233f2a78726e7b



