HIGH
alsa PeerRuntime UAF
CVE-2026-46090
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI5.8MEDIUM
01Description
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.
02KernelScan AI Analysis
Risk summary
A race condition in the ALSA aloop driver can cause a use-after-free when concurrent format changes and stream closures occur. This affects systems where local users have access to ALSA PCM devices and can lead to kernel crashes, potential information disclosure, and limited memory corruption.
Vulnerability analysis
The vulnerability stems from improper lifetime management of peer PCM runtime structures in loopback_check_format(). When a format mismatch triggers a peer stream stop, the operation occurs after dropping cable->lock, allowing concurrent close operations to free the runtime while it's still being accessed. The fix introduces reference counting (stop_count) and synchronization (stop_wait) to ensure runtime structures remain valid during in-flight stop operations. Attack surface is local, requiring access to ALSA PCM devices to trigger the race condition between format changes and stream closure. The UAF primitive can potentially leak kernel heap information and corrupt heap metadata before detection/crash.
03Fix Versions
| Branch | Fixed in | Patch commit |
|---|---|---|
| 6.12 | 6.12.88 | 03f52a9c1704 |
| 6.18 | 6.18.27 | bdd9503c3d22 |
| 7.0 | 7.0.4 | 5d45e34bf001 |
| mainline | 7.1-rc2 | e5c33cdc6f40 |