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

ALSA: usb-audio: fix OOB write in snd_usbmidi_novation_output()

snd_usbmidi_novation_output() lays out a two-byte header at
transfer_buffer[0..1] and passes &transfer_buffer[2] together with a
length of ep->max_transfer - 2 to snd_rawmidi_transmit():

count = snd_rawmidi_transmit(ep->ports[0].substream,
&transfer_buffer[2],
ep->max_transfer - 2);

ep->max_transfer comes from the output endpoint's wMaxPacketSize via
usb_maxpacket(). A malformed or malicious device can advertise a bulk
OUT endpoint with a wMaxPacketSize of 1 - the USB core only clamps this
value downwards - so ep->max_transfer becomes 1 and the count argument
becomes -1.

snd_rawmidi_transmit() passes the negative count on to
__snd_rawmidi_transmit_peek(), where "if (count1 > count) count1 = count"
leaves count1 negative; get_aligned_size() keeps it negative for a
byte-stream substream, so the following memcpy(buffer, ..., count1) runs
with a (size_t)-1 length and writes far past the transfer buffer, which
was allocated with usb_alloc_coherent(ep->max_transfer).

This is the same class of bug that was fixed for snd_usbmidi_akai_output()
in commit 0970274613fb ("ALSA: usb-audio: fix OOB write in
snd_usbmidi_akai_output()"); the novation output routine was left
unguarded. Bail out when the endpoint cannot hold the two-byte header
plus at least one payload byte.
Published: 2026-09-04
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

An out‑of‑bounds write occurs in the ALSA USB‑MIDI novation output routine when a device advertises a wMaxPacketSize of 1. The kernel code incorrectly accepts a negative count and passes it to a memcpy, causing memory corruption on the USB bulk OUT transfer buffer. This results in the kernel writing past the allocated buffer, potentially corrupting memory and allowing a malicious USB device to execute arbitrary code or crash the system. The flaw falls under the buffer overflow weakness.

Affected Systems

This issue affects Linux kernel implementations that include the ALSA usb‑audio subsystem, specifically the snd_usbmidi_novation_output function. It is relevant for any distribution using the standard Linux kernel with ALSA USB‑MIDI drivers, regardless of version, whenever a USB device can provide a bulk OUT endpoint with a wMaxPacketSize of 1. No specific version ranges are enumerated, so all affected kernels currently in use are vulnerable until the patch is applied.

Risk and Exploitability

The vulnerability is a kernel‑space buffer overflow that can be triggered by a correctly crafted USB MIDI device presented to the system. Because the attacker must supply a malicious device, the attack vector is local/physical but can be accessed via USB port, thus considered a high‑risk local exploitation. No EPSS score is provided, but kernel overflows typically carry high likelihood if an attack is mounted. The CVE has not appeared in CISA KEV, and no public exploit is known, but the severity of the flaw warrants immediate remediation.

Generated by OpenCVE AI on September 4, 2026 at 18:52 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply a kernel update that includes the fixed commit from the Linux kernel (e.g., update to a version containing commit 1035a8f6 or later).
  • If an immediate update is not possible, temporarily disable the ALSA usb‑audio module or block USB MIDI devices using udev rules or kernel boot parameters.
  • Verify that the device’s wMaxPacketSize is at least 2 on bulk OUT endpoints; consider adding a USB packet size validation rule if possible.

Generated by OpenCVE AI on September 4, 2026 at 18:52 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 04 Sep 2026 19:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-119

Fri, 04 Sep 2026 16:00:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: ALSA: usb-audio: fix OOB write in snd_usbmidi_novation_output() snd_usbmidi_novation_output() lays out a two-byte header at transfer_buffer[0..1] and passes &transfer_buffer[2] together with a length of ep->max_transfer - 2 to snd_rawmidi_transmit(): count = snd_rawmidi_transmit(ep->ports[0].substream, &transfer_buffer[2], ep->max_transfer - 2); ep->max_transfer comes from the output endpoint's wMaxPacketSize via usb_maxpacket(). A malformed or malicious device can advertise a bulk OUT endpoint with a wMaxPacketSize of 1 - the USB core only clamps this value downwards - so ep->max_transfer becomes 1 and the count argument becomes -1. snd_rawmidi_transmit() passes the negative count on to __snd_rawmidi_transmit_peek(), where "if (count1 > count) count1 = count" leaves count1 negative; get_aligned_size() keeps it negative for a byte-stream substream, so the following memcpy(buffer, ..., count1) runs with a (size_t)-1 length and writes far past the transfer buffer, which was allocated with usb_alloc_coherent(ep->max_transfer). This is the same class of bug that was fixed for snd_usbmidi_akai_output() in commit 0970274613fb ("ALSA: usb-audio: fix OOB write in snd_usbmidi_akai_output()"); the novation output routine was left unguarded. Bail out when the endpoint cannot hold the two-byte header plus at least one payload byte.
Title ALSA: usb-audio: fix OOB write in snd_usbmidi_novation_output()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-09-04T15:54:33.981Z

Reserved: 2026-08-26T14:34:25.796Z

Link: CVE-2026-80829

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-04T16:18:10.997

Modified: 2026-09-04T16:18:10.997

Link: CVE-2026-80829

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-04T19:00:14Z

Weaknesses
  • CWE-119

    Improper Restriction of Operations within the Bounds of a Memory Buffer