In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_midi: cancel pending IN work before freeing the midi object The… (CVE-2026-64584)
A use-after-free vulnerability was found and fixed in the Linux kernel's USB gadget MIDI driver (f_midi). The issue occurs because a work item can be re-armed after the MIDI object is disabled but before it is freed, allowing a work handler to dereference freed memory. The fix involves cancelling pending work synchronously at the point where the MIDI object is freed, preventing use-after-free conditions.
AI Analysis
Technical Summary
The Linux kernel's f_midi USB gadget driver embeds a work item whose handler dereferences the enclosing f_midi structure. This work can be queued from two paths: endpoint completion and ALSA rawmidi output stream start. The disable and unbind functions do not cancel this work, allowing it to be re-armed after disable returns but before the MIDI object is freed. This leads to a use-after-free when the work handler runs after the object has been freed. The fix calls cancel_work_sync on the work item in the refcount-zero block of the free function, ensuring no work remains pending when the object is freed. This prevents the use-after-free condition.
Potential Impact
The vulnerability allows a use-after-free condition in the kernel, which can lead to undefined behavior including potential kernel crashes or escalation of privileges if exploited. However, no known exploits are reported in the wild at this time.
Mitigation Recommendations
A fix is available and has been applied in the Linux kernel source by cancelling pending work synchronously before freeing the MIDI object. Users should update to a kernel version that includes this fix. Patch status is not explicitly confirmed in the provided data; check the official Linux kernel advisories or source repositories for the fixed version.
In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_midi: cancel pending IN work before freeing the midi object The… (CVE-2026-64584)
Description
A use-after-free vulnerability was found and fixed in the Linux kernel's USB gadget MIDI driver (f_midi). The issue occurs because a work item can be re-armed after the MIDI object is disabled but before it is freed, allowing a work handler to dereference freed memory. The fix involves cancelling pending work synchronously at the point where the MIDI object is freed, preventing use-after-free conditions.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The Linux kernel's f_midi USB gadget driver embeds a work item whose handler dereferences the enclosing f_midi structure. This work can be queued from two paths: endpoint completion and ALSA rawmidi output stream start. The disable and unbind functions do not cancel this work, allowing it to be re-armed after disable returns but before the MIDI object is freed. This leads to a use-after-free when the work handler runs after the object has been freed. The fix calls cancel_work_sync on the work item in the refcount-zero block of the free function, ensuring no work remains pending when the object is freed. This prevents the use-after-free condition.
Potential Impact
The vulnerability allows a use-after-free condition in the kernel, which can lead to undefined behavior including potential kernel crashes or escalation of privileges if exploited. However, no known exploits are reported in the wild at this time.
Mitigation Recommendations
A fix is available and has been applied in the Linux kernel source by cancelling pending work synchronously before freeing the MIDI object. Users should update to a kernel version that includes this fix. Patch status is not explicitly confirmed in the provided data; check the official Linux kernel advisories or source repositories for the fixed version.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-m3h2-47px-55rm
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-64584"]
- Ecosystems
- []
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a74cfa0bf8831d5391b0a50
Added to database: 08/06/2026, 18:17:04 UTC
Last enriched: 08/06/2026, 19:13:53 UTC
Last updated: 08/07/2026, 00:41:15 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.