# CVE-2026-99318: ALSA: bcd2000: Fix use-after-free of MIDI URBs on file close

- Priority: **Insufficient evidence**
- Reason: No CVSS vector published; no exploitation reported by the 5 checked sources
- Next step: Check the vendor advisory
- Status: published
- Published: 2026-11-18 · Modified: 2026-11-23
- Aliases: DEBIAN-CVE-2026-99318, UBUNTU-CVE-2026-99318, CGA-4qqj-8w2x-2jm4, CGA-9p56-4f3w-7xv6, CGA-c7x4-wmph-vmqr, CGA-chhv-4p97-rgrw, CGA-chxp-m259-5j36, CGA-ffg2-w9gr-gq89, CGA-fvh4-85qc-wm3r, CGA-g8fv-v4fg-qrp9, CGA-ppm8-p22c-hwvx, CGA-4qmj-9xcv-mcw2, CGA-hr2f-w22g-3vm8, CGA-hw34-c899-pmvj, CGA-mv3x-9pch-c524, CGA-w7fq-q4hr-phvg, CGA-p338-48w7-h5hm, CGA-r5p4-6qw4-xfm7
- Record: https://cvemate.com/vulnerability/CVE-2026-99318 · JSON: https://cvemate.com/vulnerability/CVE-2026-99318/json

## Description

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

ALSA: bcd2000: Fix use-after-free of MIDI URBs on file close

bcd2000_disconnect() calls snd_card_disconnect(), which only prevents
new opens, and then frees the MIDI URBs.  A rawmidi file that was
already open can still be closed afterwards, and its close callback,
bcd2000_midi_output_close(), calls usb_kill_urb() on midi_out_urb.

The URB pointers are cleared on disconnect and their accesses are
serialized with midi_lock, but bcd2000_midi_output_close() reads
midi_out_urb without that lock.  The check can therefore pass just
before the pointer is cleared, and usb_kill_urb() then runs on the URB
that has already been freed:

  BUG: KASAN: slab-use-after-free in usb_kill_urb+0x74/0x80
  Read of size 8 at addr ffff8880078e7d40
   usb_kill_urb
   bcd2000_midi_output_close
   close_substream
   rawmidi_release_priv
   snd_rawmidi_release

  Allocated by: usb_alloc_urb <- bcd2000_init_midi <- bcd2000_probe
  Freed by:     usb_free_urb <- bcd2000_midi_free
                <- bcd2000_disconnect

Take the lock in bcd2000_midi_output_close() and reference the URB with
usb_get_urb() before releasing it.  The URB then stays valid until
usb_put_urb() after usb_kill_urb() has returned, even if a disconnect
frees it in the meantime.  usb_kill_urb() itself cannot run under
midi_lock, as the completion handler takes the same lock.
```

## Signals

- CVSS: none published
- EPSS: 0.223%, percentile 13.788%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 182)

- chainguard linux-desktop-7.2 (Chainguard): All versions (No fix recorded)
- chainguard linux-desktop-7.2-bootc (Chainguard): All versions (No fix recorded)
- chainguard linux-desktop-7.2-bootc-boot-installed (Chainguard): All versions (No fix recorded)
- chainguard linux-desktop-7.2-headers (Chainguard): All versions (No fix recorded)
- chainguard linux-desktop-7.2-modules (Chainguard): All versions (No fix recorded)
- chainguard linux-server-7.2 (Chainguard): All versions (No fix recorded)
- chainguard linux-server-7.2-bootc (Chainguard): All versions (No fix recorded)
- chainguard linux-server-7.2-bootc-boot-installed (Chainguard): All versions (No fix recorded)
- chainguard linux-server-7.2-headers (Chainguard): All versions (No fix recorded)
- chainguard linux-server-7.2-modules (Chainguard): All versions (No fix recorded)
- debian linux (Debian): All versions (No fix recorded) \| \< 6.12.118-1 \| \< 7.3.5-1
- debian linux-6.12 (Debian): \< 6.12.118-1~deb12u1
- ubuntu linux (Ubuntu): All versions (No fix recorded)
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)

## References

- <https://git.kernel.org/stable/c/791c259be56d05f90f7642df337f209c108003fa>
- <https://git.kernel.org/stable/c/752eea15d0e67a468e484c1f166cdba694ba6de0>
- <https://git.kernel.org/stable/c/a4c306eb3ba35a1e7201e25aef7e0537da609e72>
- <https://git.kernel.org/stable/c/f6c7bb1f0799591a62be75b9bcf84245b4f208b7>
- <https://security-tracker.debian.org/tracker/CVE-2026-99318>
- <https://ubuntu.com/security/CVE-2026-99318>
- <https://www.cve.org/CVERecord?id=CVE-2026-99318>
- <https://git.kernel.org/linus/f6c7bb1f0799591a62be75b9bcf84245b4f208b7>
- <https://git.kernel.org/stable/c/2fcf9b9d874709421abe2f70b51242224feb666c>
- <https://git.kernel.org/stable/c/a57be92dc97bc4538cc7d0b51a528995c853318c>
- <https://git.kernel.org/stable/c/c1d76e51961979c24b5fd63d8579b3b4c2c4e8fd>
- <https://git.kernel.org/stable/c/8d2cca2909057746af411b5bb54a7fd329f25680>

---

Data as of 2026-12-05T03:57:40.054Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
