CVE-2026-80971: ALSA: bcd2000: clear the URB pointers on disconnect

Published Sep 11, 2026
·
Updated

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

ALSA: bcd2000: clear the URB pointers on disconnect

bcd2000freeusbrelatedresources() frees both URBs and leaves the pointers behind:

usbkillurb(bcd2k->midiouturb); usbkillurb(bcd2k->midiinurb);

usbfreeurb(bcd2k->midiouturb); usbfreeurb(bcd2k->midiinurb);

The rawmidi device outlives that call. A substream that is still open when the device is unplugged reaches bcd2000midisend() from the trigger path on close. That function writes to the freed URB and then hands it to the USB core:

bcd2k->midiouturb->transferbufferlength = BUFSIZE; ... ret = usbsubmiturb(bcd2k->midiouturb, GFPATOMIC);

usbkillurb() does not stop a later submission either, so a submit that races the disconnect can requeue the URB after it has been reaped. midiinurb is exposed the same way: bcd2000inputcomplete() resubmits it from the completion handler.

KASAN on 7.2.0-rc5 (arm64):

BUG: KASAN: slab-use-after-free in bcd2000midisend [sndbcd2000] Write of size 4 at addr ffff00001827d388 by task bpoc/168 asanstore4 bcd2000midisend [sndbcd2000] bcd2000midioutputtrigger [sndbcd2000] sndrawmidikernelwrite1 closesubstream.part.0 Freed by task 168: usbfreeurb bcd2000disconnect [sndbcd2000]

BUG: KASAN: slab-use-after-free in usbsubmiturb Read of size 8 at addr ffff00001827d3b8 by task bpoc/168

Clear both pointers after freeing and test them on the paths that can still run. Poison the URBs before freeing them: usbpoisonurb() waits for a running completion handler and rejects any later submission, so after it returns the input path is quiesced and only the rawmidi trigger path can still reach bcd2000midisend(). No unpoison is needed; the URBs are freed on the next line.

Discovered by XBOW, triaged by Baul Lee <baul.lee@xbow.com>

Affected Software

1 affected component
Linux kernel ALSA bcd2000 driver (snd_bcd2000)=7.2.0-rc5

Event History

Sep 11, 2026
CVE Published
via MITRE·07:42 PM
Data Sourced
via MITRE·07:42 PM
Description

Frequently Asked Questions

1

Who is exposed to this issue?

Systems using the Linux kernel's ALSA bcd2000 driver (snd_bcd2000) are exposed when a rawmidi substream remains open while the associated USB device is disconnected.

2

What condition is needed to trigger the use-after-free?

The BCD2000 USB device must be unplugged while a rawmidi substream is still open. A later output trigger during close can access and submit a freed MIDI output URB; the MIDI input URB can also be resubmitted from its completion handler.

3

How can this issue be detected during investigation?

A KASAN-enabled kernel may report a slab-use-after-free in bcd2000_midi_send, with bcd2000_midi_output_trigger and snd_rawmidi_kernel_write1 in the call trace. The reported failure occurs after device disconnect with an open rawmidi substream.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203