<?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://db.gcve.eu/rss/recent/all/10</id>
  <title>Most recent entries from all</title>
  <updated>2026-12-04T19:41:15.283959+00:00</updated>
  <author>
    <name>Vulnerability-Lookup</name>
    <email>info@gcve.eu</email>
  </author>
  <link href="https://db.gcve.eu" 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://db.gcve.eu/vuln/cve-2026-142985</id>
    <title>CVE-2026-142985 — usb: gadget: u_serial: fix NULL deref in gs_close() after failed open</title>
    <updated>2026-12-04T19:41:15.285147+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>usb: gadget: u_serial: fix NULL deref in gs_close() after failed open</p>
<p>gs_close() opens with</p>
<p>struct gs_port *port = tty-&gt;driver_data;
	...
	spin_lock_irq(&amp;port-&gt;port_lock);</p>
<p>and never checks port.  gs_open() assigns tty-&gt;driver_data only on the
port.count 0 -&gt; 1 edge, so any failure earlier in gs_open() leaves it NULL,
and tty_open() calls tty_release(), and hence -&gt;close(), when -&gt;open()
fails.</p>
<p>syzbot hit exactly this on arm64.  Fault injection failed the kfifo_alloc()
of the write buffer in gs_open():</p>
<p>__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</p>
<p>and the tty core's close of the failed open then took port_lock through
the NULL port:</p>
<p>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</p>
<p>Return early instead.  There is nothing to release when the open never got
far enough to claim the port.</p>
<p>Unlike the check reverted by commit f6c7bc4a6823 ("Revert "usb: gadget:
u_serial: Add null pointer check in gs_start_io""), this is not hiding a
race: the tty core calls -&gt;close() for an…</p></div>
    </content>
    <link href="https://db.gcve.eu/vuln/cve-2026-142985"/>
  </entry>
</feed>
