---
id: "CVE-2026-98770"
kind: "vulnerability"
aliases: ["CVE-2026-98770"]
title: "Linux kernel USB MIDI gadget: jack descriptor arrays too small, out-of-bounds write"
severity: "unknown"
cvss: null
epss: null
exploited: false
status: "open"
category: "runtime"
products: []
ecosystems: []
tags: ["embedded", "linux-kernel", "runtime", "usb-gadget"]
not_affected_if: ["no-usb-gadget-midi2"]
published_at: "2026-10-18T16:17:30+00:00"
first_seen_at: "2026-10-23T21:57:16+00:00"
updated_at: "2026-10-25T05:15:31+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-98770", "first_seen_at": "2026-10-23T21:57:16+00:00"}]
---

# Linux kernel USB MIDI gadget: jack descriptor arrays too small, out-of-bounds write

The Linux kernel's USB MIDI 2.0 gadget driver sized its jack in/out descriptor arrays at MAX_CABLES, but each loop iteration adds two entries, so the arrays overflow when many jacks are configured through configfs. The fix doubles the array sizes to MAX_CABLES * 2; the sources do not state the attacker-controlled impact beyond the out-of-bounds write.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- unknown

## Fix

- Update the Linux kernel to a release that includes the upstream commit fixing the midi2 jack descriptor array sizes (the sources do not list version numbers).

## Timeline

- 2026-10-23T21:57:16+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-98770

## From the sources

In the Linux kernel, the following vulnerability has been resolved:

usb: gadget: midi2: Fix the jack descriptor array sizes

The jack in/out descriptor arrays in struct f_midi2_usb_config have
the size of MAX_CABLES, which look reasonable -- but it turned out to
be incorrect.  Namely, the entries for those arrays are added from
both inputs and outputs, hence for each loop cycle, it adds two, ended
up with as twice as the expected size.  This inconsistency may result
in potential OOB when a large number of jacks are set up via configfs,
although the max number of cables (the loop count) is limited to
MAX_CABLES.

For addressing it, correct the jack_ins & jack_outs array sizes to
twice, MAX_CABLES * 2.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
