ALSA: usb-audio: Bound MIDI endpoint descriptor scans
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 5c6cd7021a05a02fcf37f360592d7c18d4d807fb · < 09141583bd97f4bbd7358e29fd138fe798467cdb| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ALSA: usb-audio: Bound MIDI endpoint descriptor scans
snd_usbmidi_get_ms_info() validates the internal MIDIStreaming endpoint descriptor size before using baAssocJackID[], but the descriptor walker can still return a class-specific endpoint descriptor whose bLength exceeds the remaining bytes in the endpoint-extra scan.
That leaves later flexible-array reads bounded by bLength, but not by the remaining bytes in the endpoint-extra scan.
Stop walking when bLength is zero or extends past the remaining endpoint-extra scan.
From the CVE record · Linux
The Linux kernel's ALSA USB audio code can read beyond an endpoint-extra scan when a MIDI endpoint descriptor's bLength exceeds the remaining bytes. This occurs while processing a malformed USB MIDI endpoint descriptor; the input does not specify attacker access, authentication requirements, or user interaction.
Engineers running the Linux kernel should check their deployments; affected versions are not specified.