PT-2026-166840

CVE-2026-142985

·

Published

2026-12-03

·

Updated

2026-12-03

Description by

Score
N/A
Not available

No severity ratings or metrics are available. When they are, we'll update the corresponding info on the page.

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.
Vendors
Affected products
Related identifiers
Found an issue in the description? Have something to add? Feel free to write us 👾