<?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://db.gcve.eu</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>Fri, 04 Dec 2026 19:20:28 +0000</lastBuildDate>
    <item>
      <title>CVE-2026-142985 — usb: gadget: u_serial: fix NULL deref in gs_close() after failed open</title>
      <link>https://db.gcve.eu/vuln/cve-2026-142985</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;usb: gadget: u_serial: fix NULL deref in gs_close() after failed open&lt;/p&gt;
&lt;p&gt;gs_close() opens with&lt;/p&gt;
&lt;p&gt;struct gs_port *port = tty-&amp;gt;driver_data;
	...
	spin_lock_irq(&amp;amp;port-&amp;gt;port_lock);&lt;/p&gt;
&lt;p&gt;and never checks port.  gs_open() assigns tty-&amp;gt;driver_data only on the
port.count 0 -&amp;gt; 1 edge, so any failure earlier in gs_open() leaves it NULL,
and tty_open() calls tty_release(), and hence -&amp;gt;close(), when -&amp;gt;open()
fails.&lt;/p&gt;
&lt;p&gt;syzbot hit exactly this on arm64.  Fault injection failed the kfifo_alloc()
of the write buffer in gs_open():&lt;/p&gt;
&lt;p&gt;__kfifo_alloc_node+0x10c/0x208 lib/kfifo.c:44
   gs_open+0x144/0x514 drivers/usb/gadget/function/u_serial.c:636
   tty_open+0x404/0x89c drivers/tty/tty_io.c:2137&lt;/p&gt;
&lt;p&gt;and the tty core&amp;#39;s close of the failed open then took port_lock through
the NULL port:&lt;/p&gt;
&lt;p&gt;BUG: unable to handle kernel paging request in gs_close
  KASAN: null-ptr-deref in range [0x00000000000003a0-0x00000000000003a7]
  Call trace:
   spin_lock_irq include/linux/spinlock.h:372 [inline]
   gs_close+0xac/0x65c drivers/usb/gadget/function/u_serial.c:698
   tty_release+0x2c4/0xffc drivers/tty/tty_io.c:1745
   tty_open+0x46c/0x89c drivers/tty/tty_io.c:2146&lt;/p&gt;
&lt;p&gt;Return early instead.  There is nothing to release when the open never got
far enough to claim the port.&lt;/p&gt;
&lt;p&gt;Unlike the check reverted by commit f6c7bc4a6823 (&amp;#34;Revert &amp;#34;usb: gadget:
u_serial: Add null pointer check in gs_start_io&amp;#34;&amp;#34;), this is not hiding a
race: the tty core calls -&amp;gt;close() for an…&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;usb: gadget: u_serial: fix NULL deref in gs_close() after failed open&lt;/p&gt;
&lt;p&gt;gs_close() opens with&lt;/p&gt;
&lt;p&gt;struct gs_port *port = tty-&amp;gt;driver_data;
	...
	spin_lock_irq(&amp;amp;port-&amp;gt;port_lock);&lt;/p&gt;
&lt;p&gt;and never checks port.  gs_open() assigns tty-&amp;gt;driver_data only on the
port.count 0 -&amp;gt; 1 edge, so any failure earlier in gs_open() leaves it NULL,
and tty_open() calls tty_release(), and hence -&amp;gt;close(), when -&amp;gt;open()
fails.&lt;/p&gt;
&lt;p&gt;syzbot hit exactly this on arm64.  Fault injection failed the kfifo_alloc()
of the write buffer in gs_open():&lt;/p&gt;
&lt;p&gt;__kfifo_alloc_node+0x10c/0x208 lib/kfifo.c:44
   gs_open+0x144/0x514 drivers/usb/gadget/function/u_serial.c:636
   tty_open+0x404/0x89c drivers/tty/tty_io.c:2137&lt;/p&gt;
&lt;p&gt;and the tty core&amp;#39;s close of the failed open then took port_lock through
the NULL port:&lt;/p&gt;
&lt;p&gt;BUG: unable to handle kernel paging request in gs_close
  KASAN: null-ptr-deref in range [0x00000000000003a0-0x00000000000003a7]
  Call trace:
   spin_lock_irq include/linux/spinlock.h:372 [inline]
   gs_close+0xac/0x65c drivers/usb/gadget/function/u_serial.c:698
   tty_release+0x2c4/0xffc drivers/tty/tty_io.c:1745
   tty_open+0x46c/0x89c drivers/tty/tty_io.c:2146&lt;/p&gt;
&lt;p&gt;Return early instead.  There is nothing to release when the open never got
far enough to claim the port.&lt;/p&gt;
&lt;p&gt;Unlike the check reverted by commit f6c7bc4a6823 (&amp;#34;Revert &amp;#34;usb: gadget:
u_serial: Add null pointer check in gs_start_io&amp;#34;&amp;#34;), this is not hiding a
race: the tty core calls -&amp;gt;close() for an…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://db.gcve.eu/vuln/cve-2026-142985</guid>
    </item>
  </channel>
</rss>
