<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
  <channel>
    <title>Most recent entries from all</title>
    <link>https://vulnerability.circl.lu</link>
    <description>Contains only the most 10 recent entries.</description>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>python-feedgen</generator>
    <language>en</language>
    <lastBuildDate>Thu, 01 Oct 2026 21:41:20 +0000</lastBuildDate>
    <item>
      <title>CVE-2022-48813 — net: dsa: felix: don't use devres for mdiobus</title>
      <link>https://vulnerability.circl.lu/vuln/cve-2022-48813</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; Linux&lt;/p&gt;
&lt;p&gt;In the Linux kernel, the following vulnerability has been resolved:&lt;/p&gt;
&lt;p&gt;net: dsa: felix: don&amp;#39;t use devres for mdiobus&lt;/p&gt;
&lt;p&gt;As explained in commits:
74b6d7d13307 (&amp;#34;net: dsa: realtek: register the MDIO bus under devres&amp;#34;)
5135e96a3dd2 (&amp;#34;net: dsa: don&amp;#39;t allocate the slave_mii_bus using devres&amp;#34;)&lt;/p&gt;
&lt;p&gt;mdiobus_free() will panic when called from devm_mdiobus_free() &amp;lt;-
devres_release_all() &amp;lt;- __device_release_driver(), and that mdiobus was
not previously unregistered.&lt;/p&gt;
&lt;p&gt;The Felix VSC9959 switch is a PCI device, so the initial set of
constraints that I thought would cause this (I2C or SPI buses which call
-&amp;gt;remove on -&amp;gt;shutdown) do not apply. But there is one more which
applies here.&lt;/p&gt;
&lt;p&gt;If the DSA master itself is on a bus that calls -&amp;gt;remove from -&amp;gt;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 felix switch driver on shutdown.&lt;/p&gt;
&lt;p&gt;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&amp;#39;t use devres at all.&lt;/p&gt;
&lt;p&gt;The felix driver has the code structure in place for orderly mdiobus
removal, so just replace devm_mdiobus_alloc_size() with the non-devres
variant, and add manual free where necessary, to ensure that we don&amp;#39;t
let devres free a still-registered bus.&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; Linux&lt;/p&gt;
&lt;p&gt;In the Linux kernel, the following vulnerability has been resolved:&lt;/p&gt;
&lt;p&gt;net: dsa: felix: don&amp;#39;t use devres for mdiobus&lt;/p&gt;
&lt;p&gt;As explained in commits:
74b6d7d13307 (&amp;#34;net: dsa: realtek: register the MDIO bus under devres&amp;#34;)
5135e96a3dd2 (&amp;#34;net: dsa: don&amp;#39;t allocate the slave_mii_bus using devres&amp;#34;)&lt;/p&gt;
&lt;p&gt;mdiobus_free() will panic when called from devm_mdiobus_free() &amp;lt;-
devres_release_all() &amp;lt;- __device_release_driver(), and that mdiobus was
not previously unregistered.&lt;/p&gt;
&lt;p&gt;The Felix VSC9959 switch is a PCI device, so the initial set of
constraints that I thought would cause this (I2C or SPI buses which call
-&amp;gt;remove on -&amp;gt;shutdown) do not apply. But there is one more which
applies here.&lt;/p&gt;
&lt;p&gt;If the DSA master itself is on a bus that calls -&amp;gt;remove from -&amp;gt;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 felix switch driver on shutdown.&lt;/p&gt;
&lt;p&gt;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&amp;#39;t use devres at all.&lt;/p&gt;
&lt;p&gt;The felix driver has the code structure in place for orderly mdiobus
removal, so just replace devm_mdiobus_alloc_size() with the non-devres
variant, and add manual free where necessary, to ensure that we don&amp;#39;t
let devres free a still-registered bus.&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://vulnerability.circl.lu/vuln/cve-2022-48813</guid>
    </item>
  </channel>
</rss>
