<?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>Wed, 30 Sep 2026 06:53:57 +0000</lastBuildDate>
    <item>
      <title>CVE-2023-54321 — driver core: fix potential null-ptr-deref in device_add()</title>
      <link>https://vulnerability.circl.lu/vuln/cve-2023-54321</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;driver core: fix potential null-ptr-deref in device_add()&lt;/p&gt;
&lt;p&gt;I got the following null-ptr-deref report while doing fault injection test:&lt;/p&gt;
&lt;p&gt;BUG: kernel NULL pointer dereference, address: 0000000000000058
CPU: 2 PID: 278 Comm: 37-i2c-ds2482 Tainted: G    B   W        N 6.1.0-rc3+
RIP: 0010:klist_put+0x2d/0xd0
Call Trace:
 &amp;lt;TASK&amp;gt;
 klist_remove+0xf1/0x1c0
 device_release_driver_internal+0x196/0x210
 bus_remove_device+0x1bd/0x240
 device_add+0xd3d/0x1100
 w1_add_master_device+0x476/0x490 [wire]
 ds2482_probe+0x303/0x3e0 [ds2482]&lt;/p&gt;
&lt;p&gt;This is how it happened:&lt;/p&gt;
&lt;p&gt;w1_alloc_dev()
  // The dev-&amp;gt;driver is set to w1_master_driver.
  memcpy(&amp;amp;dev-&amp;gt;dev, device, sizeof(struct device));
  device_add()
    bus_add_device()
    dpm_sysfs_add() // It fails, calls bus_remove_device.&lt;/p&gt;
&lt;p&gt;// error path
    bus_remove_device()
      // The dev-&amp;gt;driver is not null, but driver is not bound.
      __device_release_driver()
        klist_remove(&amp;amp;dev-&amp;gt;p-&amp;gt;knode_driver) &amp;lt;-- It causes null-ptr-deref.&lt;/p&gt;
&lt;p&gt;// normal path
    bus_probe_device() // It&amp;#39;s not called yet.
      device_bind_driver()&lt;/p&gt;
&lt;p&gt;If dev-&amp;gt;driver is set, in the error path after calling bus_add_device()
in device_add(), bus_remove_device() is called, then the device will be
detached from driver. But device_bind_driver() is not called yet, so it
causes null-ptr-deref while access the &amp;#39;knode_driver&amp;#39;. To fix this, set
dev-&amp;gt;driver to null in the error path before calling bus_remove_device(…&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;driver core: fix potential null-ptr-deref in device_add()&lt;/p&gt;
&lt;p&gt;I got the following null-ptr-deref report while doing fault injection test:&lt;/p&gt;
&lt;p&gt;BUG: kernel NULL pointer dereference, address: 0000000000000058
CPU: 2 PID: 278 Comm: 37-i2c-ds2482 Tainted: G    B   W        N 6.1.0-rc3+
RIP: 0010:klist_put+0x2d/0xd0
Call Trace:
 &amp;lt;TASK&amp;gt;
 klist_remove+0xf1/0x1c0
 device_release_driver_internal+0x196/0x210
 bus_remove_device+0x1bd/0x240
 device_add+0xd3d/0x1100
 w1_add_master_device+0x476/0x490 [wire]
 ds2482_probe+0x303/0x3e0 [ds2482]&lt;/p&gt;
&lt;p&gt;This is how it happened:&lt;/p&gt;
&lt;p&gt;w1_alloc_dev()
  // The dev-&amp;gt;driver is set to w1_master_driver.
  memcpy(&amp;amp;dev-&amp;gt;dev, device, sizeof(struct device));
  device_add()
    bus_add_device()
    dpm_sysfs_add() // It fails, calls bus_remove_device.&lt;/p&gt;
&lt;p&gt;// error path
    bus_remove_device()
      // The dev-&amp;gt;driver is not null, but driver is not bound.
      __device_release_driver()
        klist_remove(&amp;amp;dev-&amp;gt;p-&amp;gt;knode_driver) &amp;lt;-- It causes null-ptr-deref.&lt;/p&gt;
&lt;p&gt;// normal path
    bus_probe_device() // It&amp;#39;s not called yet.
      device_bind_driver()&lt;/p&gt;
&lt;p&gt;If dev-&amp;gt;driver is set, in the error path after calling bus_add_device()
in device_add(), bus_remove_device() is called, then the device will be
detached from driver. But device_bind_driver() is not called yet, so it
causes null-ptr-deref while access the &amp;#39;knode_driver&amp;#39;. To fix this, set
dev-&amp;gt;driver to null in the error path before calling bus_remove_device(…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://vulnerability.circl.lu/vuln/cve-2023-54321</guid>
    </item>
  </channel>
</rss>
