CVE-2025-38448

usb: gadget: u_serial: Fix race condition in TTY wakeup

published July 25, 2025

CVSS
—
EPSS
0%
Percentile
2.5
In the wild
Unconfirmed
What it is

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

usb: gadget: u_serial: Fix race condition in TTY wakeup

A race condition occurs when gs_start_io() calls either gs_start_rx() or

gs_start_tx(), as those functions briefly drop the port_lock for

usb_ep_queue(). This allows gs_close() and gserial_disconnect() to clear

port.tty and port_usb, respectively.

Use the null-safe TTY Port helper function to wake up TTY.

Example

CPU1: CPU2:

gserial_connect() // lock

gs_close() // await lock

gs_start_rx() // unlock

usb_ep_queue()

gs_close() // lock, reset port.tty and unlock

gs_start_rx() // lock

tty_wakeup() // NPE

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.00131 · 2.5th percentile
Published
2025-07-25T15:27Z
EPSS history
Timeline
  • 25 JUL 15:27Z
    usb: gadget: u_serial: Fix race condition in TTY wakeup
    cvelistv5