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


- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 18 Nov 2026
- **Updated:** 23 Nov 2026
- **Also known as:** AZL-114371, BELL-CVE-2026-99318, DEBIAN-CVE-2026-99318, GHSA-5vmm-5wj9-f8xg, UBUNTU-CVE-2026-99318

## What is CVE-2026-99318?

CVE-2026-99318 is a vulnerability in Linux, published on 18 Nov 2026. 

### Official description

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.

## Which versions are affected by CVE-2026-99318?


Status by vendor (upstream, then each distribution release and vendor build):

| Who | Release | Status | Packages | Fixed in |
| --- | --- | --- | --- | --- |
| Red Hat | 8 | deferred | `bpftool`, `kernel`, `kernel-abi-stablelists` and 43 more |  |
| Red Hat | 9 | deferred | `bpftool`, `kernel`, `kernel-64k` and 104 more |  |
| Red Hat | 10 | deferred | `kernel` |  |
| Red Hat | els/6 | end of life | `kernel`, `kernel-abi-whitelists`, `kernel-bootwrapper` and 10 more |  |
| Red Hat | els/7 | deferred | `bpftool`, `kernel`, `kernel-abi-whitelists` and 23 more |  |

## How do I fix CVE-2026-99318?

Upgrade to a fixed version.

## Is CVE-2026-99318 being exploited?

There is no known exploitation of CVE-2026-99318 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-99318 and fix it if it is affected.

What it is: CVE-2026-99318 is a vulnerability in Linux, published on 18 Nov 2026. 
Exploitation: There is no known exploitation of CVE-2026-99318 in the wild and no public exploit code.

Affected product: Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-99318/ (Markdown: https://insights.sbomify.com/CVE-2026-99318/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-99318
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-99318
- OSV: https://osv.dev/vulnerability/CVE-2026-99318

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-99318/
Summaries are generated and may contain mistakes; the official description above is the record.
