CVE-2026-139273

ALSA: aloop: Keep shared timer callbacks alive through close

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

ALSA: aloop: Keep shared timer callbacks alive through close

The shared sound-timer callback must finish using the selected PCM
runtimes before a close can detach them. loopback_snd_timer_period_elapsed()
saves the active substreams under cable->lock, then drops the lock before
calling snd_pcm_period_elapsed() or snd_pcm_stop_xrun(). The sound-timer
backend has no per-stream close drain, and free_cable() keeps the timer
open when the paired endpoint remains attached.

With both directions running on a shared sound timer, playback can be
dropped and closed while a notification is pending. Capture keeps the
timer alive, allowing this order:

Timer callback Playback owner
-------------- --------------
select playback under cable->lock
unlock; delay notification
DROP; HW_FREE -> OPEN
close: snd_pcm_drop(); unlock
free_cable(); peer stays alive
snd_pcm_period_elapsed()
lock stream; cache runtime
snd_pcm_detach_substream()
free runtime and its fasync
read runtime->fasync

The stream lock taken by snd_pcm_drop() cannot protect a notification
that starts after it returns, and detach does not take it. The callback
can therefore read runtime->fasync after the runtime has been freed, and
an escaped notification can also reach a replacement runtime if the same
substream slot is reopened before the notification resumes.

Take the existing cable->stop_count reference under cable->lock when
selecting the targets and release it after the PCM callbacks finish,
including the XRUN path. free_cable() already removes the closing
endpoint under that lock and waits for stop_count before returning, so
runtime detach and slot reuse cannot overtake the notification.

Analysis

AI-generated

Technical impact

The Linux kernel ALSA loopback subsystem contains a race condition that can cause a use‑after‑free of the PCM substream fasync pointer when a timer callback fires after the device has been closed. The callback may read memory that has already been released, which can trigger a kernel crash or allow an attacker to execute arbitrary code with kernel privileges. The weakness is a classic use‑after‑free (CWE‑416). This flaw is only exploitable from users that have access to the ALSA loopback interface, so the attack vector is local.

Affected Systems

Affected systems are all Linux kernel releases that shipped the ALSA loopback code before the fix was applied. No specific version string is given, so any kernel before the patch commit should be considered vulnerable. The vulnerability is internal to the ALSA subsystem and does not affect user‑space applications directly, but it can be triggered by sending data to the loopback device or by manipulating playback and capture streams.

Risk and Exploitability

Because the flaw can lead to a hard kernel panic or privilege escalation, the potential severity is high, although no CVSS score is provided. EPSS is not available and the issue is not listed in CISA KEV, so the likelihood of widespread exploitation is currently unknown, but local attackers could easily trigger the bug if they can create or manipulate ALSA loopback streams. Updating the kernel to the patched revision is the authoritative mitigation and should be undertaken immediately. In environments where a kernel upgrade cannot be performed right away, disabling the ALSA loopback device or restricting access to it can reduce the attack surface.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the kernel to a version that contains the ALSA loopback bug fix.
  • Disable the ALSA loopback interface if it is not required, for example by removing or masking the sound loopback module or setting the device to read‑only.
  • For systems that must run older kernels, lock ALSA device access to privileged users only using udev rules or ACLs, and monitor syslog for Oops or BUG messages that may indicate the use‑after‑free execution.

Generated by OpenCVE AI on November 30, 2026 at 21:15 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: ALSA: aloop: Keep shared timer callbacks alive through close The shared sound-timer callback must finish using the selected PCM runtimes before a close can detach them. loopback_snd_timer_period_elapsed() saves the active substreams under cable->lock, then drops the lock before calling snd_pcm_period_elapsed() or snd_pcm_stop_xrun(). The sound-timer backend has no per-stream close drain, and free_cable() keeps the timer open when the paired endpoint remains attached. With both directions running on a shared sound timer, playback can be dropped and closed while a notification is pending. Capture keeps the timer alive, allowing this order: Timer callback Playback owner -------------- -------------- select playback under cable->lock unlock; delay notification DROP; HW_FREE -> OPEN close: snd_pcm_drop(); unlock free_cable(); peer stays alive snd_pcm_period_elapsed() lock stream; cache runtime snd_pcm_detach_substream() free runtime and its fasync read runtime->fasync The stream lock taken by snd_pcm_drop() cannot protect a notification that starts after it returns, and detach does not take it. The callback can therefore read runtime->fasync after the runtime has been freed, and an escaped notification can also reach a replacement runtime if the same substream slot is reopened before the notification resumes. Take the existing cable->stop_count reference under cable->lock when selecting the targets and release it after the PCM callbacks finish, including the XRUN path. free_cable() already removes the closing endpoint under that lock and waits for stop_count before returning, so runtime detach and slot reuse cannot overtake the notification.
Title ALSA: aloop: Keep shared timer callbacks alive through close
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:33 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:18 PM
Modified
Nov 30, 2026, 2:18 PM