KernelScan.io

HIGH

alsa PCM Runtime UAF

CVE-2026-43437

CVSS 7.8 / 10.0 NVD

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

KernelScan AI7.0HIGH

01

In the Linux kernel, the following vulnerability has been resolved: ALSA: pcm: fix use-after-free on linked stream runtime in snd_pcm_drain() In the drain loop, the local variable 'runtime' is reassigned to a linked stream's runtime (runtime = s->runtime at line 2157). After releasing the stream lock at line 2169, the code accesses runtime->no_period_wakeup, runtime->rate, and runtime->buffer_size (lines 2170-2178) — all referencing the linked stream's runtime without any lock or refcount protecting its lifetime. A concurrent close() on the linked stream's fd triggers snd_pcm_release_substream() → snd_pcm_drop() → pcm_release_private() → snd_pcm_unlink() → snd_pcm_detach_substream() → kfree(runtime). No synchronization prevents kfree(runtime) from completing while the drain path dereferences the stale pointer. Fix by caching the needed runtime fields (no_period_wakeup, rate, buffer_size) into local variables while still holding the stream lock, and using the cached values after the lock is released.

02

Engine v0.2.0

Risk summary

Local users with audio device access can trigger a use-after-free in the ALSA PCM drain operation by racing stream close() with drain() on linked audio streams. This can lead to kernel memory corruption, privilege escalation, or system crashes on systems where multiple processes can access audio devices concurrently.

Affectedsound/core/pcm_native.c (ALSA PCM)

Vulnerability analysis

The vulnerability occurs in snd_pcm_drain() when handling linked PCM streams. The code assigns a local 'runtime' pointer to a linked stream's runtime (s->runtime), then releases the stream lock and continues to access runtime fields (no_period_wakeup, rate, buffer_size). A concurrent close() on the linked stream's file descriptor can trigger snd_pcm_detach_substream() which calls kfree(runtime), creating a use-after-free condition. The fix caches the needed runtime fields into local variables while holding the lock, eliminating the stale pointer dereference after lock release. This requires local access and the ability to open multiple audio streams, making it a race condition with high attack complexity.

03

BranchFixed inPatch commit
5.105.10.2539baee36e8c54
6.16.1.167fc71f8889945
6.126.12.78ae8f8d30d334
6.186.18.194a758e9a1f5e
6.196.19.9c2f64e05a058
6.66.6.130629cf09464cf
mainline7.09b1dbd69ba6f