<?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>Tue, 29 Sep 2026 16:27:16 +0000</lastBuildDate>
    <item>
      <title>CVE-2023-53685 — tun: Fix memory leak for detached NAPI queue.</title>
      <link>https://vulnerability.circl.lu/vuln/cve-2023-53685</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;tun: Fix memory leak for detached NAPI queue.&lt;/p&gt;
&lt;p&gt;syzkaller reported [0] memory leaks of sk and skb related to the TUN
device with no repro, but we can reproduce it easily with:&lt;/p&gt;
&lt;p&gt;struct ifreq ifr = {}
  int fd_tun, fd_tmp;
  char buf[4] = {};&lt;/p&gt;
&lt;p&gt;fd_tun = openat(AT_FDCWD, &amp;#34;/dev/net/tun&amp;#34;, O_WRONLY, 0);
  ifr.ifr_flags = IFF_TUN | IFF_NAPI | IFF_MULTI_QUEUE;
  ioctl(fd_tun, TUNSETIFF, &amp;amp;ifr);&lt;/p&gt;
&lt;p&gt;ifr.ifr_flags = IFF_DETACH_QUEUE;
  ioctl(fd_tun, TUNSETQUEUE, &amp;amp;ifr);&lt;/p&gt;
&lt;p&gt;fd_tmp = socket(AF_PACKET, SOCK_PACKET, 0);
  ifr.ifr_flags = IFF_UP;
  ioctl(fd_tmp, SIOCSIFFLAGS, &amp;amp;ifr);&lt;/p&gt;
&lt;p&gt;write(fd_tun, buf, sizeof(buf));
  close(fd_tun);&lt;/p&gt;
&lt;p&gt;If we enable NAPI and multi-queue on a TUN device, we can put skb into
tfile-&amp;gt;sk.sk_write_queue after the queue is detached.  We should prevent
it by checking tfile-&amp;gt;detached before queuing skb.&lt;/p&gt;
&lt;p&gt;Note this must be done under tfile-&amp;gt;sk.sk_write_queue.lock because write()
and ioctl(IFF_DETACH_QUEUE) can run concurrently.  Otherwise, there would
be a small race window:&lt;/p&gt;
&lt;p&gt;write()                             ioctl(IFF_DETACH_QUEUE)
  `- tun_get_user                     `- __tun_detach
     |- if (tfile-&amp;gt;detached)             |- tun_disable_queue
     |  `-&amp;gt; false                        |  `- tfile-&amp;gt;detached = tun
     |                                   `- tun_queue_purge
     |- spin_lock_bh(&amp;amp;queue-&amp;gt;lock)
     `- __skb_queue_tail(queue, skb)&lt;/p&gt;
&lt;p&gt;Another solution is to call tun_queue_purge() when c…&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;tun: Fix memory leak for detached NAPI queue.&lt;/p&gt;
&lt;p&gt;syzkaller reported [0] memory leaks of sk and skb related to the TUN
device with no repro, but we can reproduce it easily with:&lt;/p&gt;
&lt;p&gt;struct ifreq ifr = {}
  int fd_tun, fd_tmp;
  char buf[4] = {};&lt;/p&gt;
&lt;p&gt;fd_tun = openat(AT_FDCWD, &amp;#34;/dev/net/tun&amp;#34;, O_WRONLY, 0);
  ifr.ifr_flags = IFF_TUN | IFF_NAPI | IFF_MULTI_QUEUE;
  ioctl(fd_tun, TUNSETIFF, &amp;amp;ifr);&lt;/p&gt;
&lt;p&gt;ifr.ifr_flags = IFF_DETACH_QUEUE;
  ioctl(fd_tun, TUNSETQUEUE, &amp;amp;ifr);&lt;/p&gt;
&lt;p&gt;fd_tmp = socket(AF_PACKET, SOCK_PACKET, 0);
  ifr.ifr_flags = IFF_UP;
  ioctl(fd_tmp, SIOCSIFFLAGS, &amp;amp;ifr);&lt;/p&gt;
&lt;p&gt;write(fd_tun, buf, sizeof(buf));
  close(fd_tun);&lt;/p&gt;
&lt;p&gt;If we enable NAPI and multi-queue on a TUN device, we can put skb into
tfile-&amp;gt;sk.sk_write_queue after the queue is detached.  We should prevent
it by checking tfile-&amp;gt;detached before queuing skb.&lt;/p&gt;
&lt;p&gt;Note this must be done under tfile-&amp;gt;sk.sk_write_queue.lock because write()
and ioctl(IFF_DETACH_QUEUE) can run concurrently.  Otherwise, there would
be a small race window:&lt;/p&gt;
&lt;p&gt;write()                             ioctl(IFF_DETACH_QUEUE)
  `- tun_get_user                     `- __tun_detach
     |- if (tfile-&amp;gt;detached)             |- tun_disable_queue
     |  `-&amp;gt; false                        |  `- tfile-&amp;gt;detached = tun
     |                                   `- tun_queue_purge
     |- spin_lock_bh(&amp;amp;queue-&amp;gt;lock)
     `- __skb_queue_tail(queue, skb)&lt;/p&gt;
&lt;p&gt;Another solution is to call tun_queue_purge() when c…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://vulnerability.circl.lu/vuln/cve-2023-53685</guid>
    </item>
    <item>
      <title>GHSA-q99f-whjq-3rrx</title>
      <link>https://vulnerability.circl.lu/vuln/ghsa-q99f-whjq-3rrx</link>
      <description>&lt;p&gt;In the Linux kernel, the following vulnerability has been resolved:&lt;/p&gt;
&lt;p&gt;tun: Fix memory leak for detached NAPI queue.&lt;/p&gt;
&lt;p&gt;syzkaller reported [0] memory leaks of sk and skb related to the TUN
device with no repro, but we can reproduce it easily with:&lt;/p&gt;
&lt;p&gt;struct ifreq ifr = {}
  int fd_tun, fd_tmp;
  char buf[4] = {};&lt;/p&gt;
&lt;p&gt;fd_tun = openat(AT_FDCWD, &amp;#34;/dev/net/tun&amp;#34;, O_WRONLY, 0);
  ifr.ifr_flags = IFF_TUN | IFF_NAPI | IFF_MULTI_QUEUE;
  ioctl(fd_tun, TUNSETIFF, &amp;amp;ifr);&lt;/p&gt;
&lt;p&gt;ifr.ifr_flags = IFF_DETACH_QUEUE;
  ioctl(fd_tun, TUNSETQUEUE, &amp;amp;ifr);&lt;/p&gt;
&lt;p&gt;fd_tmp = socket(AF_PACKET, SOCK_PACKET, 0);
  ifr.ifr_flags = IFF_UP;
  ioctl(fd_tmp, SIOCSIFFLAGS, &amp;amp;ifr);&lt;/p&gt;
&lt;p&gt;write(fd_tun, buf, sizeof(buf));
  close(fd_tun);&lt;/p&gt;
&lt;p&gt;If we enable NAPI and multi-queue on a TUN device, we can put skb into
tfile-&amp;gt;sk.sk_write_queue after the queue is detached.  We should prevent
it by checking tfile-&amp;gt;detached before queuing skb.&lt;/p&gt;
&lt;p&gt;Note this must be done under tfile-&amp;gt;sk.sk_write_queue.lock because write()
and ioctl(IFF_DETACH_QUEUE) can run concurrently.  Otherwise, there would
be a small race window:&lt;/p&gt;
&lt;p&gt;write()                             ioctl(IFF_DETACH_QUEUE)
  `- tun_get_user                     `- __tun_detach
     |- if (tfile-&amp;gt;detached)             |- tun_disable_queue
     |  `-&amp;gt; false                        |  `- tfile-&amp;gt;detached = tun
     |                                   `- tun_queue_purge
     |- spin_lock_bh(&amp;amp;queue-&amp;gt;lock)
     `- __skb_queue_tail(queue, skb)&lt;/p&gt;
&lt;p&gt;Another solution is to call tun_queue_purge() when c…&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;In the Linux kernel, the following vulnerability has been resolved:&lt;/p&gt;
&lt;p&gt;tun: Fix memory leak for detached NAPI queue.&lt;/p&gt;
&lt;p&gt;syzkaller reported [0] memory leaks of sk and skb related to the TUN
device with no repro, but we can reproduce it easily with:&lt;/p&gt;
&lt;p&gt;struct ifreq ifr = {}
  int fd_tun, fd_tmp;
  char buf[4] = {};&lt;/p&gt;
&lt;p&gt;fd_tun = openat(AT_FDCWD, &amp;#34;/dev/net/tun&amp;#34;, O_WRONLY, 0);
  ifr.ifr_flags = IFF_TUN | IFF_NAPI | IFF_MULTI_QUEUE;
  ioctl(fd_tun, TUNSETIFF, &amp;amp;ifr);&lt;/p&gt;
&lt;p&gt;ifr.ifr_flags = IFF_DETACH_QUEUE;
  ioctl(fd_tun, TUNSETQUEUE, &amp;amp;ifr);&lt;/p&gt;
&lt;p&gt;fd_tmp = socket(AF_PACKET, SOCK_PACKET, 0);
  ifr.ifr_flags = IFF_UP;
  ioctl(fd_tmp, SIOCSIFFLAGS, &amp;amp;ifr);&lt;/p&gt;
&lt;p&gt;write(fd_tun, buf, sizeof(buf));
  close(fd_tun);&lt;/p&gt;
&lt;p&gt;If we enable NAPI and multi-queue on a TUN device, we can put skb into
tfile-&amp;gt;sk.sk_write_queue after the queue is detached.  We should prevent
it by checking tfile-&amp;gt;detached before queuing skb.&lt;/p&gt;
&lt;p&gt;Note this must be done under tfile-&amp;gt;sk.sk_write_queue.lock because write()
and ioctl(IFF_DETACH_QUEUE) can run concurrently.  Otherwise, there would
be a small race window:&lt;/p&gt;
&lt;p&gt;write()                             ioctl(IFF_DETACH_QUEUE)
  `- tun_get_user                     `- __tun_detach
     |- if (tfile-&amp;gt;detached)             |- tun_disable_queue
     |  `-&amp;gt; false                        |  `- tfile-&amp;gt;detached = tun
     |                                   `- tun_queue_purge
     |- spin_lock_bh(&amp;amp;queue-&amp;gt;lock)
     `- __skb_queue_tail(queue, skb)&lt;/p&gt;
&lt;p&gt;Another solution is to call tun_queue_purge() when c…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://vulnerability.circl.lu/vuln/ghsa-q99f-whjq-3rrx</guid>
    </item>
  </channel>
</rss>
