<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <id>https://vulnerability.circl.lu/rss/recent/all/10</id>
  <title>Most recent entries from all</title>
  <updated>2026-09-29T12:49:10.963879+00:00</updated>
  <author>
    <name>Vulnerability-Lookup</name>
    <email>info@circl.lu</email>
  </author>
  <link href="https://vulnerability.circl.lu" rel="alternate"/>
  <generator uri="https://lkiesow.github.io/python-feedgen" version="1.0.0">python-feedgen</generator>
  <subtitle>Contains only the most 10 recent entries.</subtitle>
  <entry>
    <id>https://vulnerability.circl.lu/vuln/cve-2023-53685</id>
    <title>CVE-2023-53685 — tun: Fix memory leak for detached NAPI queue.</title>
    <updated>2026-09-29T12:49:10.979003+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> Linux</p>
<p>In the Linux kernel, the following vulnerability has been resolved:</p>
<p>tun: Fix memory leak for detached NAPI queue.</p>
<p>syzkaller reported [0] memory leaks of sk and skb related to the TUN
device with no repro, but we can reproduce it easily with:</p>
<p>struct ifreq ifr = {}
  int fd_tun, fd_tmp;
  char buf[4] = {};</p>
<p>fd_tun = openat(AT_FDCWD, "/dev/net/tun", O_WRONLY, 0);
  ifr.ifr_flags = IFF_TUN | IFF_NAPI | IFF_MULTI_QUEUE;
  ioctl(fd_tun, TUNSETIFF, &amp;ifr);</p>
<p>ifr.ifr_flags = IFF_DETACH_QUEUE;
  ioctl(fd_tun, TUNSETQUEUE, &amp;ifr);</p>
<p>fd_tmp = socket(AF_PACKET, SOCK_PACKET, 0);
  ifr.ifr_flags = IFF_UP;
  ioctl(fd_tmp, SIOCSIFFLAGS, &amp;ifr);</p>
<p>write(fd_tun, buf, sizeof(buf));
  close(fd_tun);</p>
<p>If we enable NAPI and multi-queue on a TUN device, we can put skb into
tfile-&gt;sk.sk_write_queue after the queue is detached.  We should prevent
it by checking tfile-&gt;detached before queuing skb.</p>
<p>Note this must be done under tfile-&gt;sk.sk_write_queue.lock because write()
and ioctl(IFF_DETACH_QUEUE) can run concurrently.  Otherwise, there would
be a small race window:</p>
<p>write()                             ioctl(IFF_DETACH_QUEUE)
  `- tun_get_user                     `- __tun_detach
     |- if (tfile-&gt;detached)             |- tun_disable_queue
     |  `-&gt; false                        |  `- tfile-&gt;detached = tun
     |                                   `- tun_queue_purge
     |- spin_lock_bh(&amp;queue-&gt;lock)
     `- __skb_queue_tail(queue, skb)</p>
<p>Another solution is to call tun_queue_purge() when c…</p></div>
    </content>
    <link href="https://vulnerability.circl.lu/vuln/cve-2023-53685"/>
  </entry>
</feed>
