CVE-2026-142985
Last modified
CVE-2026-142985 is a vulnerability of currently unknown severity. 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.
Description
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.
Affected Software
Source: CNA advisory (CVE.org). NVD analysis pending.
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | >= c1dca562be8ada614ef193aa246c6f8705bcd6b9, < ece1756e054ffcb38a8aab7d0ab7d0e02e65dd99; >= c1dca562be8ada614ef193aa246c6f8705bcd6b9, < ce8c7b4b562aa7c3847145dc2e3a2d0953a054b2; >= c1dca562be8ada614ef193aa246c6f8705bcd6b9, < 63b69946c0de838af7324a504766fa13ad947d3d; >= c1dca562be8ada614ef193aa246c6f8705bcd6b9, < ea6e4e3a7c8453674337c7773cf3b101f328c876; >= c1dca562be8ada614ef193aa246c6f8705bcd6b9, < d010585071193e268c4152df2b3281255280529b; >= c1dca562be8ada614ef193aa246c6f8705bcd6b9, < ea6cf69ad03c8d85138830c0d2c3b946b5ae231d |
| Linux | Linux | 2.6.27 |
References
Timeline
- Published
- Last Modified
- Status
- Received
Frequently Asked Questions
What is CVE-2026-142985?
How severe is CVE-2026-142985?
How do I fix CVE-2026-142985?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2026
- CVE-2026-14298Mattermost versions 11.9.x <= 11.9.0, 11.8.x <= 11.8.4, 11.7…6.5
- CVE-2026-142980In the Linux kernel, the following vulnerability has been re…
- CVE-2026-142981In the Linux kernel, the following vulnerability has been re…
- CVE-2026-142982In the Linux kernel, the following vulnerability has been re…
- CVE-2026-142983In the Linux kernel, the following vulnerability has been re…
- CVE-2026-142984In the Linux kernel, the following vulnerability has been re…
- CVE-2026-142986In the Linux kernel, the following vulnerability has been re…
- CVE-2026-142987In the Linux kernel, the following vulnerability has been re…
- CVE-2026-142988In the Linux kernel, the following vulnerability has been re…
- CVE-2026-142989In the Linux kernel, the following vulnerability has been re…
- CVE-2026-142990In the Linux kernel, the following vulnerability has been re…
- CVE-2026-142991In the Linux kernel, the following vulnerability has been re…
Are you affected by CVE-2026-142985?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
