usb: gadget: u_serial: Fix race condition in TTY wakeup (Linux Linux)

CVE-2025-38448
MEDIUM 4.7

At a glance

Source
NVD
EPSS
EPSS 0.14 % · percentile 3 ()
State
PUBLISHED
Published
Updated
Assigner
Linux
NVD status
Analyzed

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

Weaknesses (CWE)

  • CWE-362 — Concurrent Execution using Shared Resource with Improper Synchronization

References

Scores

VersionScoreVectorScored by
CVSS 3.1MEDIUM 4.7CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:HNVD · nvd@nist.gov (Primary)

European references

CERT-FR advisories

Affected configurations (NVD CPE)

Affected products

ProductVersions
Linux · Linuxaffected 35f95fd7f234d2b58803bab6f6ebd6bb988050a2 < 18d58a467ccf011078352d91b4d6a0108c7318e8 ; affected 35f95fd7f234d2b58803bab6f6ebd6bb988050a2 < d43657b59f36e88289a6066f15bc9a80df5014eb ; affected 35f95fd7f234d2b58803bab6f6ebd6bb988050a2 < a5012673d49788f16bb4e375b002d7743eb642d9 ; affected 35f95fd7f234d2b58803bab6f6ebd6bb988050a2 < ee8d688e2ba558f3bb8ac225113740be5f335417 ; affected 35f95fd7f234d2b58803bab6f6ebd6bb988050a2 < c6eb4a05af3d0ba3bc4e8159287722fb9abc6359 ; affected 35f95fd7f234d2b58803bab6f6ebd6bb988050a2 < abf3620cba68e0e51e5c21054ce4f925f75b3661
Linux · Linuxaffected 3.5 ; unaffected 0 < 3.5 ; unaffected 5.4.296 ≤ 5.4.* ; unaffected 5.10.240 ≤ 5.10.* ; unaffected 5.15.189 ≤ 5.15.* ; unaffected 6.1.146 ≤ 6.1.*

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD