4.7medium
usb: gadget: u_serial: Fix race condition in TTY wakeup
- Severity
- 4.7medium CVSS:3.1 by NVD
- Exploit likelihood
- 0.20% (higher than 6% of CVEs)
- Published
- Last changed
- Assigned by
- Linux
Description
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
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from 35f95fd7f234d2b58803bab6f6ebd6bb988050a2 before 18d58a467ccf011078352d91b4d6a0108c7318e8, from 35f95fd7f234d2b58803bab6f6ebd6bb988050a2 before d43657b59f36e88289a6066f15bc9a80df5014eb, from 35f95fd7f234d2b58803bab6f6ebd6bb988050a2 before a5012673d49788f16bb4e375b002d7743eb642d9, from 35f95fd7f234d2b58803bab6f6ebd6bb988050a2 before ee8d688e2ba558f3bb8ac225113740be5f335417, from 35f95fd7f234d2b58803bab6f6ebd6bb988050a2 before c6eb4a05af3d0ba3bc4e8159287722fb9abc6359, from 35f95fd7f234d2b58803bab6f6ebd6bb988050a2 before abf3620cba68e0e51e5c21054ce4f925f75b3661, from 35f95fd7f234d2b58803bab6f6ebd6bb988050a2 before c8c80a3a35c2e3488409de2d5376ef7e662a2bf5, from 35f95fd7f234d2b58803bab6f6ebd6bb988050a2 before c529c3730bd09115684644e26bf01ecbd7e2c2c9 and 1 more Not affected: before 3.5, from 5.4.296 up to 5.4.*, from 5.10.240 up to 5.10.*, from 5.15.189 up to 5.15.*, from 6.1.146 up to 6.1.*, from 6.6.99 up to 6.6.* | CVE List |
| linux linux_kernel | from 3.5 before 5.4.296, from 5.5 before 5.10.240, from 5.11 before 5.15.189, from 5.16 before 6.1.146, from 6.2 before 6.6.99, from 6.7 before 6.12.39, from 6.13 before 6.15.7, 6.16 | NVD |
| debian debian_linux | 11.0 | NVD |
Classification
What each source says
CVE List
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
NVD (es)
En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: usb: gadget: u_serial: Corrección de la condición de ejecución en la activación de TTY. Una condición de ejecución ocurre cuando gs_start_io() llama a gs_start_rx() o gs_start_tx(), ya que estas funciones desactivan brevemente el port_lock para usb_ep_queue(). Esto permite que gs_close() y gserial_disconnect() borren port.tty y port_usb, respectivamente. Utilice la función auxiliar de puerto TTY segura para nulos para activar TTY. Ejemplo CPU1: CPU2: gserial_connect() // bloquear gs_close() // esperar bloqueo gs_start_rx() // desbloquear usb_ep_queue() gs_close() // bloquear, restablecer port.tty y desbloquear gs_start_rx() // bloquear tty_wakeup() // NPE
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-38448 changed 2026-05-11 | CVE Terms of Use |
| NVD | CVE-2025-38448 changed 2026-06-17 | Public domain |