KernelScan.io

HIGH Introduced in 5.1

sound DrainWaiter UAF

CVE-2026-80716

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 AI6.6MEDIUM

01

In the Linux kernel, the following vulnerability has been resolved: ALSA: pcm: wake linked drain waiters on unlink snd_pcm_drain() on a linked stream parks an on-stack wait entry on the drained peer's runtime->sleep, and after schedule_timeout() removes it only if that peer is still found in the caller's group. If group membership changes during the wait and the sleep ends by signal or timeout (so autoremove_wake_function() does not run), finish_wait() is skipped and snd_pcm_drain() returns with the entry still queued on that stream's sleep list; a later wake_up() then walks a freed stack frame. This is reachable by unlinking either the drained or the draining stream. Unlike the close path (snd_pcm_drop() -> snd_pcm_post_stop()), snd_pcm_unlink() never wakes the sleep queues. Wake every group member under the group lock before the membership change, so a linked drainer is released and drops its entry while the streams are still grouped. The window was opened when snd_pcm_link_rwsem stopped being held across the wait and the removal became conditional on group membership (see Fixes). The later switch to finish_wait() kept that conditional removal, so the signal/timeout case remained.

02

Engine v0.6.0

Risk summary

A local user with access to PCM audio devices can trigger a use-after-free in the ALSA PCM subsystem by racing a stream unlink against a linked drain operation. The freed stack frame can be dereferenced by a later wake_up, leading to kernel memory corruption or a crash. Systems with local interactive users and accessible audio hardware are at risk.

Affectedsound/core/pcm_native.c (ALSA PCM)

Vulnerability analysis

When draining a linked PCM audio stream, the drain operation parks a wait entry on a peer stream's sleep queue and, after waking, removes it only if the peer is still in the same stream group. If the peer is unlinked from the group during the wait and the wait ends by signal or timeout rather than a normal wakeup, the entry is never removed and remains queued on the peer's sleep list after the draining function returns and its stack frame is freed. A subsequent wake_up on that stream then traverses the stale entry, dereferencing the freed stack. The fix wakes every group member's sleep queue under the group lock before changing membership in the unlink path, so any linked drainer is released and cleans up its wait entry while the streams are still grouped. This is reachable by any local user with access to PCM audio devices and requires no special privileges beyond standard audio device access.

03

BranchIntroducedFixed inPatch commit
6.15.16.1.1831c1b7e8e545c
6.185.16.18.442940cc3cf43c
5.155.15.15.2163035bb784cea
7.15.17.1.8db09bc4ab19c
6.65.16.6.151e8b784a3f4fb
6.125.16.12.103e8315330e4ec
mainline5.17.2f495b6c4c859
5.105.15.10.265c172e4c53321
cip/5.105.15.10.268-cip77c172e4c53321
cip/5.10-rt5.15.10.268-cip77-rt34c172e4c53321
cip/6.15.16.1.187-cip601c1b7e8e545c
cip/6.125.16.12.104-cip30e8315330e4ec