# CVE-2025-38448: usb: gadget: u_serial: Fix race condition in TTY wakeup

- Severity: Medium 4.7 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.20%, higher than 6% of CVEs (2026-11-30)
- Published: 2025-07-25T15:27:30.040Z
- Modified: 2026-06-17T09:16:52.590Z
- Weaknesses: CWE-362
- 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

(As written by CVE List.)

## Affected

- 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; 3.5 (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.*; from 6.12.39 up to 6.12.*; from 6.15.7 up to 6.15.*; from 6.16 up to *)
- 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
- debian debian_linux: 11.0

## References

- <https://git.kernel.org/stable/c/18d58a467ccf011078352d91b4d6a0108c7318e8> (patch)
- <https://git.kernel.org/stable/c/d43657b59f36e88289a6066f15bc9a80df5014eb> (patch)
- <https://git.kernel.org/stable/c/a5012673d49788f16bb4e375b002d7743eb642d9> (patch)
- <https://git.kernel.org/stable/c/ee8d688e2ba558f3bb8ac225113740be5f335417> (patch)
- <https://git.kernel.org/stable/c/c6eb4a05af3d0ba3bc4e8159287722fb9abc6359> (patch)
- <https://git.kernel.org/stable/c/abf3620cba68e0e51e5c21054ce4f925f75b3661> (patch)
- <https://git.kernel.org/stable/c/c8c80a3a35c2e3488409de2d5376ef7e662a2bf5> (patch)
- <https://git.kernel.org/stable/c/c529c3730bd09115684644e26bf01ecbd7e2c2c9> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html> (third-party-advisory)
- <https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html> (third-party-advisory)

## Sources

- CVE List: [CVE-2025-38448](https://www.cve.org/CVERecord?id=CVE-2025-38448), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2025-38448](https://nvd.nist.gov/vuln/detail/CVE-2025-38448), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-38448 · Whole record: https://cve.day/CVE-2025-38448.json · Rebuilt by cve.day 2026-11-25T22:59:01.721Z
