Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2026-64584— usb: gadget: f_midi: cancel pending IN work before freeing the midi object

Quick assessment

Affected
Linux Linux
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Linux kernel是美国Linux基金会开源的一款操作系统内核。 Linux kernel存在安全漏洞,该漏洞源于f_midi驱动在释放midi对象前未取消待处理的IN工作项,可能导致释放后重用。

CVSS 7.8 · High EPSS 0.12% · P2

Possible ATT&CK Techniques 1 AI

T1203 · Exploitation for Client Execution

Affected Version Matrix 21

VendorProduct Version RangeStatus
Linux Linux 3635523e9b96213969693c320302d536774d8e9b< f3c6f2c38062703d3dc7f86958bb0790c6959add affected
8653d71ce3763aedcf3d2331f59beda3fecd79e4< df18150126f66817e4d3f79f309e9c92d6ff384e affected
8653d71ce3763aedcf3d2331f59beda3fecd79e4< 620955b222c47332297d6bf38f78541aa699238a affected
8653d71ce3763aedcf3d2331f59beda3fecd79e4< 380b4bef46c2eb260c7a9c6bb2c5be33ce5a38f9 affected
8653d71ce3763aedcf3d2331f59beda3fecd79e4< 87bc316dd6fc90072297c635e10b9aa6075ecda1 affected
8653d71ce3763aedcf3d2331f59beda3fecd79e4< f45089eaad0a083d71d84ff175741d7e157d9b69 affected
8653d71ce3763aedcf3d2331f59beda3fecd79e4< ac9a51d910bb7465c554c45320cb6c09f3d0b49d affected
8653d71ce3763aedcf3d2331f59beda3fecd79e4< 5650c18d93a1db7e27cb5a40b394747eb4686d5b affected
… +13 more rows
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-64584

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
usb: gadget: f_midi: cancel pending IN work before freeing the midi object
Source: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_midi: cancel pending IN work before freeing the midi object The f_midi driver embeds a work item (midi->work) whose handler, f_midi_in_work(), dereferences the enclosing struct f_midi through container_of(). This work is armed from two sites: f_midi_complete(), on a normal IN-endpoint completion, and f_midi_in_trigger(), on an ALSA rawmidi output-stream start. Neither f_midi_disable() nor f_midi_unbind() cancels midi->work. f_midi_disable() only disables the endpoints and drains the in_req_fifo; it does not synchronize the work item, and the sound card is released asynchronously to the final free of the midi object. The midi object is reference-counted (midi->free_ref) and is freed in f_midi_free() only once both the usb_function reference and the rawmidi private_data reference have been dropped. In f_midi_unbind(), f_midi_disable() runs before the sound card is released, so while the USB endpoints are already disabled the rawmidi device is still usable by an open substream. A concurrent userspace write on such a substream can reach f_midi_in_trigger() and queue midi->work again after f_midi_disable() has returned. A work item armed this way may still be pending when the last reference drops and f_midi_free() proceeds to kfree(midi), letting f_midi_in_work() dereference the struct after it has been freed, a use-after-free. For this reason cancelling midi->work in f_midi_disable() would not be sufficient: the ALSA trigger path can rearm the work after disable() returns. Cancelling at the refcount-zero free site is the boundary after which neither arming source can survive, because by then both references that keep the midi object alive have been dropped: the USB endpoints are already disabled and the rawmidi device has been released. Fix this by calling cancel_work_sync(&midi->work) in the refcount-zero block of f_midi_free(), before the embedded work_struct is freed along with the rest of the structure. opts->lock is a sleeping mutex, so calling cancel_work_sync() under it is permitted, and the handler takes midi->transmit_lock rather than opts->lock, so no self-deadlock can occur while it waits for a running instance of the work to finish. This issue was found by an in-house static analysis tool.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
N/A
Source: CVE Program / CVE List V5
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会开源的一款操作系统内核。 Linux kernel存在安全漏洞,该漏洞源于f_midi驱动在释放midi对象前未取消待处理的IN工作项,可能导致释放后重用。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
Linux Linux 3635523e9b96213969693c320302d536774d8e9b ~ f3c6f2c38062703d3dc7f86958bb0790c6959add -
Linux Linux 5.12 -

II. Public POCs for CVE-2026-64584

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-64584

登录查看更多情报信息。

Patches & Fixes for CVE-2026-64584 (8)

Same Patch Batch · Linux · 2026-08-06 · 22 CVEs total

CVE-2026-64597 9.8 CRITICAL smb: client: fix double-free in SMB2_close() replay
CVE-2026-64586 8.8 HIGH wifi: brcmfmac: drain bus_reset work on device removal
CVE-2026-64598 8.8 HIGH smb/client: Fix error code in smb2_aead_req_alloc()
CVE-2026-64585 7.8 HIGH can: esd_usb: kill anchored URBs before freeing netdevs
CVE-2026-64588 7.8 HIGH fuse-uring: fix data races on ring->ready
CVE-2026-64583 7.8 HIGH usb: gadget: udc: bdc: free IRQ and drain func_wake_notify before teardown
CVE-2026-64601 7.8 HIGH ALSA: us144mkii: capture_urb_complete: redundant usb_anchor_urb corrupts anchor list on ea
CVE-2026-64599 7.8 HIGH crypto: amlogic - avoid double cleanup in meson_crypto_probe()
CVE-2026-64587 7.0 HIGH net: ethernet: arc: emac: quiesce interrupts before requesting IRQ
CVE-2026-68480 x86/bugs: Make Safe-RET robust against interrupt injection
CVE-2026-64604 KVM: VMX: Grab vmcs12 on CR8 interception update iff vCPU is in guest mode
CVE-2026-64603 platform/x86: intel-hid: Protect ACPI notify handler against recursion
CVE-2026-64602 iio: adc: spear: Initialize completion before requesting IRQ
CVE-2026-64596 libfs: set SB_I_NOEXEC and SB_I_NODEV by default in init_pseudo()
CVE-2026-64595 HID: hid-lenovo-go: cancel cfg_setup work in hid_go_cfg_remove()
CVE-2026-64593 btrfs: do not trim a device which is not writeable
CVE-2026-64594 usb: gadget: f_fs: initialize reset_work at allocation time
CVE-2026-64592 riscv: mm: Unconditionally sfence.vma for spurious fault
CVE-2026-64591 iommu/vt-d: Avoid WARNING in sva unbind path
CVE-2026-64590 dma-buf/udmabuf: skip redundant cpu sync to fix cacheline EEXIST warning

Showing top 20 of 22 CVEs. View all on vendor page &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2026-64584

No comments yet


Leave a comment