<?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>Mon, 28 Sep 2026 09:29:38 +0000</lastBuildDate>
    <item>
      <title>CVE-2022-50457 — mtd: core: Fix refcount error in del_mtd_device()</title>
      <link>https://vulnerability.circl.lu/vuln/cve-2022-50457</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;mtd: core: Fix refcount error in del_mtd_device()&lt;/p&gt;
&lt;p&gt;del_mtd_device() will call of_node_put() to mtd_get_of_node(mtd), which
is mtd-&amp;gt;dev.of_node. However, memset(&amp;amp;mtd-&amp;gt;dev, 0) is called before
of_node_put(). As the result, of_node_put() won&amp;#39;t do anything in
del_mtd_device(), and causes the refcount leak.&lt;/p&gt;
&lt;p&gt;del_mtd_device()
    memset(&amp;amp;mtd-&amp;gt;dev, 0, sizeof(mtd-&amp;gt;dev) # clear mtd-&amp;gt;dev
    of_node_put()
        mtd_get_of_node(mtd) # mtd-&amp;gt;dev is cleared, can&amp;#39;t locate of_node
                             # of_node_put(NULL) won&amp;#39;t do anything&lt;/p&gt;
&lt;p&gt;Fix the error by caching the pointer of the device_node.&lt;/p&gt;
&lt;p&gt;OF: ERROR: memory leak, expected refcount 1 instead of 2,
of_node_get()/of_node_put() unbalanced - destroy cset entry: attach
overlay node /spi/spi-sram@0
CPU: 3 PID: 275 Comm: python3 Tainted: G N 6.1.0-rc3+ #54
    0d8a1edddf51f172ff5226989a7565c6313b08e2
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
rel-1.15.0-0-g2dd4b9b3f840-prebuilt.qemu.org 04/01/2014
Call Trace:
&amp;lt;TASK&amp;gt;
    dump_stack_lvl+0x67/0x83
    kobject_get+0x155/0x160
    of_node_get+0x1f/0x30
    of_fwnode_get+0x43/0x70
    fwnode_handle_get+0x54/0x80
    fwnode_get_nth_parent+0xc9/0xe0
    fwnode_full_name_string+0x3f/0xa0
    device_node_string+0x30f/0x750
    pointer+0x598/0x7a0
    vsnprintf+0x62d/0x9b0
    ...
    cfs_overlay_release+0x30/0x90
    config_item_release+0xbe/0x1a0
    config_item_put+0x5e/0x80
    configfs_rmdir+0x3bd/0x540…&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;mtd: core: Fix refcount error in del_mtd_device()&lt;/p&gt;
&lt;p&gt;del_mtd_device() will call of_node_put() to mtd_get_of_node(mtd), which
is mtd-&amp;gt;dev.of_node. However, memset(&amp;amp;mtd-&amp;gt;dev, 0) is called before
of_node_put(). As the result, of_node_put() won&amp;#39;t do anything in
del_mtd_device(), and causes the refcount leak.&lt;/p&gt;
&lt;p&gt;del_mtd_device()
    memset(&amp;amp;mtd-&amp;gt;dev, 0, sizeof(mtd-&amp;gt;dev) # clear mtd-&amp;gt;dev
    of_node_put()
        mtd_get_of_node(mtd) # mtd-&amp;gt;dev is cleared, can&amp;#39;t locate of_node
                             # of_node_put(NULL) won&amp;#39;t do anything&lt;/p&gt;
&lt;p&gt;Fix the error by caching the pointer of the device_node.&lt;/p&gt;
&lt;p&gt;OF: ERROR: memory leak, expected refcount 1 instead of 2,
of_node_get()/of_node_put() unbalanced - destroy cset entry: attach
overlay node /spi/spi-sram@0
CPU: 3 PID: 275 Comm: python3 Tainted: G N 6.1.0-rc3+ #54
    0d8a1edddf51f172ff5226989a7565c6313b08e2
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
rel-1.15.0-0-g2dd4b9b3f840-prebuilt.qemu.org 04/01/2014
Call Trace:
&amp;lt;TASK&amp;gt;
    dump_stack_lvl+0x67/0x83
    kobject_get+0x155/0x160
    of_node_get+0x1f/0x30
    of_fwnode_get+0x43/0x70
    fwnode_handle_get+0x54/0x80
    fwnode_get_nth_parent+0xc9/0xe0
    fwnode_full_name_string+0x3f/0xa0
    device_node_string+0x30f/0x750
    pointer+0x598/0x7a0
    vsnprintf+0x62d/0x9b0
    ...
    cfs_overlay_release+0x30/0x90
    config_item_release+0xbe/0x1a0
    config_item_put+0x5e/0x80
    configfs_rmdir+0x3bd/0x540…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://vulnerability.circl.lu/vuln/cve-2022-50457</guid>
    </item>
  </channel>
</rss>
