<?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, 05 Oct 2026 10:13:34 +0000</lastBuildDate>
    <item>
      <title>CVE-2025-38687 — comedi: fix race between polling and detaching</title>
      <link>https://vulnerability.circl.lu/vuln/cve-2025-38687</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; Linux, Siemens SIMATIC CN 4100&lt;/p&gt;
&lt;p&gt;In the Linux kernel, the following vulnerability has been resolved:&lt;/p&gt;
&lt;p&gt;comedi: fix race between polling and detaching&lt;/p&gt;
&lt;p&gt;syzbot reports a use-after-free in comedi in the below link, which is
due to comedi gladly removing the allocated async area even though poll
requests are still active on the wait_queue_head inside of it. This can
cause a use-after-free when the poll entries are later triggered or
removed, as the memory for the wait_queue_head has been freed.  We need
to check there are no tasks queued on any of the subdevices&amp;#39; wait queues
before allowing the device to be detached by the `COMEDI_DEVCONFIG`
ioctl.&lt;/p&gt;
&lt;p&gt;Tasks will read-lock `dev-&amp;gt;attach_lock` before adding themselves to the
subdevice wait queue, so fix the problem in the `COMEDI_DEVCONFIG` ioctl
handler by write-locking `dev-&amp;gt;attach_lock` before checking that all of
the subdevices are safe to be deleted.  This includes testing for any
sleepers on the subdevices&amp;#39; wait queues.  It remains locked until the
device has been detached.  This requires the `comedi_device_detach()`
function to be refactored slightly, moving the bulk of it into new
function `comedi_device_detach_locked()`.&lt;/p&gt;
&lt;p&gt;Note that the refactor of `comedi_device_detach()` results in
`comedi_device_cancel_all()` now being called while `dev-&amp;gt;attach_lock`
is write-locked, which wasn&amp;#39;t the case previously, but that does not
matter.&lt;/p&gt;
&lt;p&gt;Thanks to Jens Axboe for diagnosing the problem and co-developing this
patch.&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; Linux, Siemens SIMATIC CN 4100&lt;/p&gt;
&lt;p&gt;In the Linux kernel, the following vulnerability has been resolved:&lt;/p&gt;
&lt;p&gt;comedi: fix race between polling and detaching&lt;/p&gt;
&lt;p&gt;syzbot reports a use-after-free in comedi in the below link, which is
due to comedi gladly removing the allocated async area even though poll
requests are still active on the wait_queue_head inside of it. This can
cause a use-after-free when the poll entries are later triggered or
removed, as the memory for the wait_queue_head has been freed.  We need
to check there are no tasks queued on any of the subdevices&amp;#39; wait queues
before allowing the device to be detached by the `COMEDI_DEVCONFIG`
ioctl.&lt;/p&gt;
&lt;p&gt;Tasks will read-lock `dev-&amp;gt;attach_lock` before adding themselves to the
subdevice wait queue, so fix the problem in the `COMEDI_DEVCONFIG` ioctl
handler by write-locking `dev-&amp;gt;attach_lock` before checking that all of
the subdevices are safe to be deleted.  This includes testing for any
sleepers on the subdevices&amp;#39; wait queues.  It remains locked until the
device has been detached.  This requires the `comedi_device_detach()`
function to be refactored slightly, moving the bulk of it into new
function `comedi_device_detach_locked()`.&lt;/p&gt;
&lt;p&gt;Note that the refactor of `comedi_device_detach()` results in
`comedi_device_cancel_all()` now being called while `dev-&amp;gt;attach_lock`
is write-locked, which wasn&amp;#39;t the case previously, but that does not
matter.&lt;/p&gt;
&lt;p&gt;Thanks to Jens Axboe for diagnosing the problem and co-developing this
patch.&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://vulnerability.circl.lu/vuln/cve-2025-38687</guid>
    </item>
  </channel>
</rss>
