AZL-117115: CVE-2026-139416 affecting package kernel 6.6.161.1-1

Published Nov 30, 2026
·
Updated

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

ALSA: rawmidi: Drain input work before freeing the runtime

The input runtime embeds eventwork, so the work must be drained before closesubstream() frees the runtime. The cancellation in sndrawmidiinputtrigger() runs before close clears substream->opened, leaving a window for sndrawmidireceive() to enqueue more work.

With a sequencer subscription to a USB MIDI input port, an in-flight completion can overlap the last subscription's midisynthunsubscribe():

1. sndusbmidiinputdata() observes inputtriggered and is delayed before calling sndrawmidireceive(). 2. Unsubscribe enters closesubstream(), clears inputtriggered through the provider trigger callback and returns from cancelworksync(). The substream is still opened. 3. The completion resumes. sndrawmidireceive() takes substream->lock, sees opened set and queues runtime->eventwork before dropping the lock. 4. Close clears opened under that lock, closes the provider and frees the runtime. Stopping USB URBs does not drain the raw-MIDI work. 5. The queued work runs and sndrawmidiinputeventwork() reads event or substream from the freed runtime, causing a use-after-free.

Cancel input eventwork again after clearing opened, before closing the provider or releasing the runtime's private data. Receive holds substream->lock through its opened check and work enqueue, so once close has cleared opened under that lock, no further receive can queue work. The final cancellation therefore drains any late work before the runtime is freed. Keep it outside the spinlock so a running callback can finish.

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 the raw-MIDI close path, cancel input event_work again after clearing substream->opened and before closing the provider or freeing the runtime; perform the cancellation outside the spinlock.

Event History

Nov 30, 2026
Advisory Published
via OSV·02:19 PM
Data Sourced
via OSV·02:19 PM
DescriptionAffected Software

Child vulnerabilities

Contains the following vulnerabilities.

Frequently Asked Questions

1

Which systems are exposed to this race condition?

Systems using the affected Azure Linux kernel package with ALSA raw MIDI and a sequencer subscription to a USB MIDI input port are exposed to the described race. The issue depends on USB MIDI input activity overlapping removal of the last subscription.

2

What must happen for the use-after-free to occur?

An in-flight USB MIDI completion must observe that input is triggered, then be delayed while the last sequencer subscription is removed. It can subsequently queue the input runtime's event work after cancellation has completed but before the substream is marked closed and the runtime is freed.

3

Does stopping USB URBs prevent the queued work from running?

No. The description states that stopping USB URBs does not drain raw-MIDI work, so queued event work can still run after the input runtime has been freed.

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