CVE-2026-142986

Not scored yetLast modified Dec 3, 2026

Description

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

usb: gadget: f_midi: fix UAF race during IN request handling

f_midi_disable() drains and frees pre-allocated IN requests from in_req_fifo without holding midi->transmit_lock. If f_midi_transmit() runs concurrently on the workqueue, f_midi_do_transmit() can peek a request from in_req_fifo and write into its buffer while f_midi_disable() frees it, leading to a use-after-free.

Additionally, when usb_ep_queue() fails in f_midi_do_transmit() (such as with -ESHUTDOWN when the endpoint is disabled concurrently), it resets req->length = 0 and returns active instead of the error code, causing the do-while loop in f_midi_transmit() to keep spinning under midi->transmit_lock until the substream is drained.

Fix this by acquiring midi->transmit_lock in f_midi_disable() while releasing IN requests from in_req_fifo, and returning the error code from f_midi_do_transmit() when usb_ep_queue() fails so f_midi_transmit() aborts immediately and drops active substreams.

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-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_chaCVE-2026-142997In the Linux kernel, the following vulnerability has been resolved: serial: imx: fix the tty reference of the wakeup event To report a wakCVE-2026-142998In the Linux kernel, the following vulnerability has been resolved: serial: fsl_lpuart: fix tty ref of wakeup event To report a wakeup eve
CVE-2026-142986: Unscored | Vulnix