Skip to main content

Linux Kernel CVE-2026-64584

| EUVDEUVD-2026-53771 HIGH
Use After Free (CWE-416)
2026-08-06 Linux GHSA-m3h2-47px-55rm
High
Disputed · 7.8 Vendor: Linux
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Identify Linux system operating as USB MIDI gadget
  2. Delivery
    Obtain low-privilege local account with rawmidi device access
  3. Exploit
    Initiate concurrent ALSA rawmidi write loop
  4. Install
    Race write to reach f_midi_in_trigger() after f_midi_disable() returns
  5. C2
    Work item requeued on freed struct f_midi
  6. Execute
    f_midi_in_work() dereferences freed kernel memory
  7. Impact
    Exploit kernel heap use-after-free for privilege escalation

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory lifecycle management
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires a system configured as a USB MIDI gadget - a non-default mode available only on hardware with USB device-controller support (e.g., embedded SBCs like Raspberry Pi, or systems with USB OTG ports explicitly configured in gadget mode via configfs or legacy g_midi module). Additionally, a local user account must have write access to the ALSA rawmidi device node (/dev/snd/midiC*D*) mapped to the USB MIDI gadget, which is typically restricted to the 'audio' group. Exploitation also depends on a race window: a concurrent ALSA rawmidi write must reach f_midi_in_trigger() after f_midi_disable() completes but before the reference count drops to zero in f_midi_free() - a narrow, timing-dependent window. Limiting factors: PR:L (local low-privilege access required), specialized gadget-mode hardware required, race condition narrows reliability, and the attacker cannot independently force the unbind event without additional privileges.

Impact

The vendor-assigned CVSS 7.8 (AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H) reflects the worst-case kernel use-after-free impact, but the AC:L rating warrants scrutiny - this exploit requires a tight race between a userspace rawmidi write and a USB gadget unbind event, which is more characteristic of AC:H in practice. EPSS at 0.16% (5th percentile) is consistent with zero public exploit code and static-analysis discovery rather than active exploitation; no CISA KEV listing confirms no confirmed in-the-wild exploitation at time of analysis. The real-world risk is meaningfully narrower than the CVSS score implies: systems must be operating as USB MIDI gadgets (a non-default, hardware-specific configuration), and a local low-privilege account must be able to write to the rawmidi device node. Exploiting the race in a reliable, weaponized manner would require careful heap grooming. The 'Information Disclosure' tag in the source data undersells the actual impact - kernel UAF vulnerabilities of this class can achieve full privilege escalation if reliably exploited.

Exploit ScenarioDerived

A local attacker with write access to an ALSA rawmidi substream on a USB MIDI gadget-capable system initiates a sustained write loop against the device while triggering or waiting for USB gadget unbind (e.g., through USB cable removal or concurrent module unload by another process). If the write reaches f_midi_in_trigger() after f_midi_disable() has returned but before the final kfree(midi) in f_midi_free(), the queued work item executes f_midi_in_work() against the freed struct f_midi - providing a kernel heap use-after-free primitive that, with appropriate heap shaping, could overwrite adjacent kernel objects to achieve privilege escalation to root. No public proof-of-concept exploit has been identified at time of analysis.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 08, 2026

Use-after-free in the Linux kernel's USB MIDI gadget driver (f_midi) exposes systems configured as USB MIDI gadgets to local privilege escalation or denial-of-service. The flaw stems from midi->work not being cancelled before struct f_midi is freed in f_midi_free(), allowing a concurrent ALSA rawmidi write via f_midi_in_trigger() to rearm the work item after f_midi_disable() returns but before the object is deallocated - causing f_midi_in_work() to dereference freed kernel memory. No public exploit has been identified and EPSS sits at 0.16% (5th percentile), but the CVSS 7.8 score and kernel-level impact make patching the correct priority on systems deploying USB gadget functionality.

RemediationAI

Upgrade to a patched stable kernel: Linux 6.6.148, 6.12.101, 6.18.42, 7.1.6, or 7.2-rc5. Upstream fix commits are available at https://git.kernel.org/stable/c/380b4bef46c2eb260c7a9c6bb2c5be33ce5a38f9, https://git.kernel.org/stable/c/87bc316dd6fc90072297c635e10b9aa6075ecda1, https://git.kernel.org/stable/c/f45089eaad0a083d71d84ff175741d7e157d9b69, https://git.kernel.org/stable/c/ac9a51d910bb7465c554c45320cb6c09f3d0b49d, and https://git.kernel.org/stable/c/5650c18d93a1db7e27cb5a40b394747eb4686d5b. For systems that cannot be immediately upgraded, removing or blacklisting the usb_f_midi kernel module ('modprobe -r usb_f_midi' or adding it to /etc/modprobe.d/blacklist.conf) eliminates the attack surface entirely, at the cost of USB MIDI gadget functionality. Alternatively, restricting access to ALSA rawmidi device nodes (/dev/snd/midiC*D*) to root-only or a dedicated group via udev rules reduces exploitation risk by eliminating the low-privilege trigger path, while preserving USB MIDI gadget operation for authorized system services.

Affected VersionsENISA

Linux patch: 7.2-rc5
Linux 8653d71ce3763aedcf3d2331f59beda3fecd79e4 <f45089eaad0a083d71d84ff175741d7e157d9b69
Linux patch: 0
Linux 8653d71ce3763aedcf3d2331f59beda3fecd79e4 <5650c18d93a1db7e27cb5a40b394747eb4686d5b
Linux 3635523e9b96213969693c320302d536774d8e9b
Linux patch: 6.12.101
Linux 5.12
Linux 5.4.291 <5.5
Linux 89019ab7a64fcdf98a2ba7799e5c6aff58d4a05d
Linux 8653d71ce3763aedcf3d2331f59beda3fecd79e4 <380b4bef46c2eb260c7a9c6bb2c5be33ce5a38f9
Linux patch: 7.1.6
Linux 5.10.235 <5.11
Linux patch: 6.18.42
Linux 8653d71ce3763aedcf3d2331f59beda3fecd79e4 <ac9a51d910bb7465c554c45320cb6c09f3d0b49d
Linux patch: 6.6.148
Linux 8653d71ce3763aedcf3d2331f59beda3fecd79e4 <87bc316dd6fc90072297c635e10b9aa6075ecda1

Affected Packages

euvd linux fix: 5.5, 5.11

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The f_midi driver (drivers/usb/gadget/function/f_midi.c) implements a USB MIDI gadget function and embeds a work_struct (midi->work) inside struct f_midi, with the handler f_midi_in_work() recovering the parent structure via container_of(). Two call sites can arm this work: f_midi_complete() on USB IN-endpoint completion, and f_midi_in_trigger() on ALSA rawmidi output-stream start. The object lifetime is managed by a reference counter (midi->free_ref) covering both the USB function reference and the rawmidi private_data reference. The root cause is a TOCTOU race: f_midi_disable() tears down USB endpoints without synchronizing the work queue, and the ALSA trigger path can rearm midi->work after disable() returns but before f_midi_free() drops the final reference and calls kfree(midi). Despite CWE being listed as N/A in source data, this is unambiguously CWE-416 (Use After Free). Affected CPE: cpe:2.3:a:linux:linux:*:*:*:*:*:*:*:*. The vulnerability was introduced from commit 8653d71ce3763aedcf3d2331f59beda3fecd79e4.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Sources disagree (Low–High)
Vendor (Linux) PRIMARY 7.8 HIGH
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 7.0 HIGH

Race condition between ALSA trigger path and USB gadget unbind justifies AC:H; PR:L reflects low-privilege rawmidi device access required; C/I/A:H reflects kernel UAF impact.

3.1 AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE 6.4 MEDIUM
AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H
Red Hat LOW

vuln.today treats the vendor’s rating as authoritative. A higher third-party CVSS (e.g. CISA-ADP) is shown for transparency but does not drive the headline severity.

CVSS VectorVendor: Linux

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

4
CVSS changed
Aug 08, 2026 - 15:22 NVD
7.8 (HIGH)
Patch available
Aug 06, 2026 - 08:16 EUVD
CVE Published
Aug 06, 2026 - 07:06 cve.org
HIGH 7.8
CVE Published
Aug 06, 2026 - 07:06 cve.org
UNKNOWN (no severity yet)

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

A Linux kernel vulnerability in USB MIDI device drivers could enable local privilege escalation on systems configured as USB MIDI peripherals. No public exploit identified at time of analysis; however, the kernel-level impact and CVSS 7.8 score merit immediate patching of affected systems.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 95% exploitable
Prevalence
Ubiquitous
Linux kernel runs the vast majority of servers, cloud, and embedded systems globally
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
High

Priority Score

39
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +39
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Use-after-free vulnerabilities occur when a program continues to access memory through a pointer after that memory has been deallocated.

Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
openSUSE Tumbleweed Fixed
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise High Availability Extension 15 SP7 Not-Affected
SUSE Linux Enterprise High Availability Extension 15 SP7 Not-Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy