CVE-2026-90022
largeUse-after-free in Linux kernel USB gadget MIDI 2.0 (f_midi2) driver
The Linux kernel's f_midi2 USB gadget driver has a use-after-free in the configfs 'show' path for its string attributes: f_midi2_opts_str_show() takes the string lock internally, but its callers dereference the string pointer before that lock is taken. A local attacker who can concurrently read and write a gadget string attribute (interface name, block name, or endpoint string) can hit a race in which the store path frees the old string under the lock while the show path is still dereferencing it outside the lock. Exploitation could yield kernel memory disclosure or corruption; the CVSS 7.8 score (local vector, high confidentiality/integrity/availability impact) indicates potential local privilege escalation. Only systems that actually instantiate the f_midi2 USB gadget function via configfs — typically embedded audio/music hardware and Linux devices emulating a USB MIDI 2.0 device — are exposed. No exploitation in the wild, public proof-of-concept, or KEV listing is known.
What to do: Apply a kernel update containing the CVE-2026-90022 fix (or the vendor backport); the specific fixed release is not stated in the provided data, so track your distro's stable kernel advisories. Restrict configfs gadget attribute permissions to root and avoid untrusted local users on systems with f_midi2 gadget instances. Check whether you are exposed by looking for the f_midi2 module loaded or gadget instances configured under the kernel's usb_gadget configfs tree.
| Linux kernel (usb: gadget f_midi2 driver) | — |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_midi2: fix use-after-free in string attribute show path f_midi2_opts_str_show() takes the string lock internally, but its callers dereference the opts->info. pointer before calling it, outside the lock. This races with f_midi2_opts_str_store(), which frees the old string under opts->lock when the attribute is written concurrently, the show path can read a pointer that gets freed before the lock inside str_show() is even taken. Change f_midi2_opts_str_show() to take a pointer to the string field, matching the existing pattern in f_midi2_opts_str_store(), and dereference it only after the lock is held. Update all three callers (iface_name, block name, and the EP string option macro) accordingly.
- Vector
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
In the news0 stories
No ingested article mentions this CVE yet.