CVE-2026-139278

ALSA: pcmtest: Pin the module while pattern files are open

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: pcmtest: Pin the module while pattern files are open

The fill_pattern_fops table must remain alive until the final release
of each pattern debugfs file. It has no .owner, so the fops_get() call
in full_proxy_open_regular() does not take a PCMTest module reference.

With snd-pcmtest loaded as a module, a user with permission to open a
fill_patternN file and unload the module can retain the descriptor
across normal unload, provided no PCM file or other module reference
prevents it. The following ordering is possible:

Pattern file user Module unload
----------------- -------------
open(fill_patternN)
full_proxy_open_regular()
fops_get(fill_pattern_fops)
owner == NULL: no module pin
keep the descriptor open
mod_exit()
clear_debug_files()
debugfs_remove_recursive()
drain active operations
return from mod_exit()
free_module()
free the module image
close(fd)
full_proxy_release()
read real_fops->release -> UAF
fops_put(real_fops)
read real_fops->owner
access freed module memory

Even though the table has no release callback, reading those fields
is a use-after-free and can fault. The retained dentry keeps the
proxy's bookkeeping alive, but does not retain the module storage.

Set .owner to THIS_MODULE so the existing fops_get()/fops_put() pair
pins PCMTest until final release has finished accessing the table.
Normal module unload is then blocked while any pattern file is open.

Analysis

AI-generated

Technical impact

The vulnerability exists in the ALSA pcmtest module of the Linux kernel. When a user with permission opens a fill_pattern file and subsequently unloads the pcmtest module, the file descriptor remains open while the module’s internal table is freed. On the next operation, the release routine accesses freed memory, causing a use‑after‑free that can crash the kernel or be leveraged for local privilege escalation.

Affected Systems

This bug affects Linux kernel implementations that include the ALSA pcmtest module. No specific version information is provided, so any kernel distribution that contains this module and has not applied the fix is potentially vulnerable.

Risk and Exploitability

The use‑after‑free flaw can lead to a denial of service or arbitrary code execution if an attacker can orchestrate the described sequence of opening a file, unloading the module, and then triggering the release handler. Because the attack requires local privileges to unload the module, the threat is considered high in environments where local-root or privileged users can load modules. The EPSS score is not available, and the vulnerability is not listed in CISA’s KEV catalog, but the nature of the flaw in kernel code warrants urgent attention.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the kernel update that sets the .owner field of fill_pattern_fops to THIS_MODULE to prevent the module from being freed while a pattern file is open
  • Ensure the pcmtest module is not unloaded while any pattern files are open; keep the module loaded until those files are closed
  • If the pcmtest module is not required for system operation, consider disabling or removing it from the kernel configuration

Generated by OpenCVE AI on November 30, 2026 at 21:13 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: pcmtest: Pin the module while pattern files are open The fill_pattern_fops table must remain alive until the final release of each pattern debugfs file. It has no .owner, so the fops_get() call in full_proxy_open_regular() does not take a PCMTest module reference. With snd-pcmtest loaded as a module, a user with permission to open a fill_patternN file and unload the module can retain the descriptor across normal unload, provided no PCM file or other module reference prevents it. The following ordering is possible: Pattern file user Module unload ----------------- ------------- open(fill_patternN) full_proxy_open_regular() fops_get(fill_pattern_fops) owner == NULL: no module pin keep the descriptor open mod_exit() clear_debug_files() debugfs_remove_recursive() drain active operations return from mod_exit() free_module() free the module image close(fd) full_proxy_release() read real_fops->release -> UAF fops_put(real_fops) read real_fops->owner access freed module memory Even though the table has no release callback, reading those fields is a use-after-free and can fault. The retained dentry keeps the proxy's bookkeeping alive, but does not retain the module storage. Set .owner to THIS_MODULE so the existing fops_get()/fops_put() pair pins PCMTest until final release has finished accessing the table. Normal module unload is then blocked while any pattern file is open.
Title ALSA: pcmtest: Pin the module while pattern files are open
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