AZL-117878: CVE-2026-142986 affecting package kernel 6.6.161.1-1

Published Dec 3, 2026
·
Updated

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

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

fmididisable() drains and frees pre-allocated IN requests from inreqfifo without holding midi->transmitlock. If fmiditransmit() runs concurrently on the workqueue, fmididotransmit() can peek a request from inreqfifo and write into its buffer while fmididisable() frees it, leading to a use-after-free.

Additionally, when usbepqueue() fails in fmididotransmit() (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 fmiditransmit() to keep spinning under midi->transmitlock until the substream is drained.

Fix this by acquiring midi->transmitlock in fmididisable() while releasing IN requests from inreqfifo, and returning the error code from fmididotransmit() when usbepqueue() fails so fmiditransmit() aborts immediately and drops active substreams.

Affected Software

1 affected component
azure-linux/kernel<=6.6.161.1-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    In f_midi_disable(), acquire midi->transmit_lock while draining and freeing pre-allocated IN requests from in_req_fifo, and hold it until the substream is drained.

Event History

Dec 3, 2026
Advisory Published
via OSV·10:17 AM
Data Sourced
via OSV·10:17 AM
DescriptionAffected Software

Child vulnerabilities

Contains the following vulnerabilities.

Frequently Asked Questions

1

What conditions are required to trigger the use-after-free?

The race requires the USB MIDI gadget function to be handling IN requests while f_midi_disable() runs concurrently with transmit work on the workqueue. The vulnerable path involves a request being read from the IN request FIFO for transmission while disable processing frees that request.

2

Is there an availability impact in addition to the memory-safety issue?

Yes. If usb_ep_queue() fails while transmission is active, such as when an endpoint is disabled concurrently, the transmit loop can continue spinning while holding midi->transmit_lock until the substream is drained. The fix makes transmission abort immediately and drops active substreams on that error.

3

How can I tell whether this kernel package includes the fix?

The provided affected package is azure-linux/kernel version 6.6.161.1-1. The fix is present when f_midi_disable() holds midi->transmit_lock while releasing IN requests and f_midi_do_transmit() returns usb_ep_queue() errors instead of treating them as active transmission.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203