ALSA: aloop: Fix peer runtime UAF during format-change stop
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 597603d615d2b19a9e451d8cfac24372856a522d · < bdd9503c3d222d2735b56c7a8b4422ccf3de6e5c| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ALSA: aloop: Fix peer runtime UAF during format-change stop
loopback_check_format() may stop the capture side when playback starts with parameters that no longer match a running capture stream. Commit 826af7fa62e3 ("ALSA: aloop: Fix racy access at PCM trigger") moved the peer lookup under cable->lock, but the actual snd_pcm_stop() still runs after dropping that lock.
A concurrent close can clear the capture entry from cable->streams[] and detach or free its runtime while the playback trigger path still holds a stale peer substream pointer.
Keep a per-cable count of in-flight peer stops before dropping cable->lock, and make free_cable() wait for those stops before detaching the runtime. This preserves the existing behavior while making the peer runtime lifetime explicit.
From the CVE record · Linux
The Linux kernel's ALSA aloop driver has a use-after-free in its peer runtime handling. A concurrent capture close during a playback format-change stop can leave the playback trigger path holding a stale pointer. The input does not specify attacker access requirements or user interaction.
Engineers running Linux kernels with the ALSA aloop driver should check their versions; affected versions are not specified.