CVE-2026-142985

In the Linux kernel, the following vulnerability has been resolved: usb: gadget: u_serial: fix NULL deref in gs_close() after failed open gs_close() opens with struct gs_port *port = tty->driver_data; ... spin_lock_irq(&port->port_lock); and never checks port. gs_open() assigns tty->driver_data only on the port.count 0 -> 1 edge, so any failure earlier in gs_open() leaves it NULL, and tty_open() calls tty_release(), and hence ->close(), when ->open() fails. syzbot hit exactly this on arm64. Fault injection failed the kfifo_alloc() of the write buffer in gs_open(): __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 and the tty core's close of the failed open then took port_lock through the NULL port: 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 Return early instead. There is nothing to release when the open never got far enough to claim the port. 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 ->close() for an ->open() that failed by design, so driver_data is legitimately unset on that path.

Package Linux Kernel
Published 2026-12-03
Last modified 2026-12-06
Patch available
Yes

Affected versions

Linux kernel versions 2.6.27 and later are affected. Fixed in 5.10.276, 5.15.227, 6.12.120, 6.18.66, 7.3.7, 7.4-rc4 and their respective stable series.

Affected from
≥ 2.6.27
Fixed in
✓ 5.10.276 5.10.x ✓ 5.15.227 5.15.x ✓ 6.12.120 6.12.x ✓ 6.18.66 6.18.x ✓ 7.3.7 7.3.x ✓ 7.4-rc4

Frequently asked questions

  • What is CVE-2026-142985?

    CVE-2026-142985 is a unscored severity Linux kernel vulnerability . It affects Linux kernel versions from 2.6.27 onward and has been patched in 5.10.276, 5.15.227, 6.12.120 and others. CVE-2026-142985 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.

  • Is there a patch available for CVE-2026-142985?

    Yes. CVE-2026-142985 has been patched. Fixed versions include 5.10.276, 5.15.227, 6.12.120 and others. If you are running Linux kernel 2.6.27 or later up to the fix versions, apply the relevant patch for your kernel branch.

  • Is CVE-2026-142985 actively exploited?

    No. CVE-2026-142985 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.