CVE-2026-142984

Not scored yetLast modified Dec 3, 2026

Description

In the Linux kernel, the following vulnerability has been resolved:

usb: gadget: u_serial: pin ports while TTYs are installed

A slab-use-after-free can occur when gserial_free_line() frees struct gs_port while it is still reachable through an installed TTY. The port->port.count value tracks successful opens, but it is zero before gs_open() and again after gs_close(), before TTY cleanup has finished. Teardown can therefore free gs_port while tty_init_dev() or release_tty() still accesses its tty_port.

Manage gs_port lifetime with tty_port references. Take a reference in gs_install(), drop it in gs_cleanup(), and move the final free to gs_port_destruct(). Unregister the TTY device before dropping the owner reference.

Keep each minor reserved until the old port is destroyed so an installed TTY for one generation cannot overlap a replacement at the same minor. Publish the new port before device registration so the cdev and add uevent never expose a TTY before gs_install() can pin it. Since commit 8df07fe93573 ("tty: fix saved termios reset race"), u_serial registration no longer frees saved termios. On registration failure, unpublish the port before dropping its owner reference.

Check in gs_open() that the installed port is still the published generation. Track failures after a successful install so close callbacks issued by the TTY core do not decrement port->port.count for opens that never incremented it.

Metrics

No CVSS score has been published yet.

Affected software

Source: the vendor's advisory (CNA). NVD analysis pending.

No affected versions have been published.

Timeline

Published
Dec 3, 2026
Last modified
Dec 3, 2026
NVD status
Received

Related CVEs from 2026

CVE-2026-142985In the Linux kernel, the following vulnerability has been resolved: usb: gadget: u_serial: fix NULL deref in gs_close() after failed open CVE-2026-142986In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_midi: fix UAF race during IN request handling f_midi_diCVE-2026-142987In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_mass_storage: take filesem in nofua store to fix backingCVE-2026-142988In the Linux kernel, the following vulnerability has been resolved: usb: xhci: disable the correct slot on alloc_dev failure xhci_alloc_deCVE-2026-142989In the Linux kernel, the following vulnerability has been resolved: usb: typec: ucsi: Set ucsi->connector before enabling notifications InCVE-2026-142990In the Linux kernel, the following vulnerability has been resolved: usb: usbtest: prevent divide by zero in simple_io() with zero length ACVE-2026-142991In the Linux kernel, the following vulnerability has been resolved: usb: typec: nb7vpq904m: Set client data in probe to avoid crash on remoCVE-2026-142992In the Linux kernel, the following vulnerability has been resolved: USB: serial: oti6858: fix the teardown order in close The driver passeCVE-2026-142993In the Linux kernel, the following vulnerability has been resolved: USB: serial: garmin_gps: fix deadlock on reset request The garmin_gps CVE-2026-142994In the Linux kernel, the following vulnerability has been resolved: thunderbolt: stream: Undo more if the start fails If the receive buffeCVE-2026-142995In the Linux kernel, the following vulnerability has been resolved: serial: samsung: put the previous baud clock s3c24xx_serial_getclk() rCVE-2026-142996In the Linux kernel, the following vulnerability has been resolved: serial: samsung: don't leak the tty on an RX IRQ s3c24xx_serial_rx_cha
CVE-2026-142984: Unscored | Vulnix