AZL-117004: CVE-2026-139278 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
ALSA: pcmtest: Pin the module while pattern files are open
The fillpatternfops table must remain alive until the final release of each pattern debugfs file. It has no .owner, so the fopsget() call in fullproxyopenregular() does not take a PCMTest module reference.
With snd-pcmtest loaded as a module, a user with permission to open a fillpatternN 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(fillpatternN) fullproxyopenregular() fopsget(fillpatternfops) owner == NULL: no module pin keep the descriptor open modexit() cleardebugfiles() debugfsremoverecursive() drain active operations return from modexit() freemodule() free the module image close(fd) fullproxyrelease() read realfops->release -> UAF fopsput(realfops) read realfops->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 THISMODULE so the existing fopsget()/fopsput() pair pins PCMTest until final release has finished accessing the table. Normal module unload is then blocked while any pattern file is open.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Set .owner to THIS_MODULE in the fill_pattern_fops table so the module remains pinned while pattern files are open.
ALSA pcmtest fill_pattern_fops.owner = THIS_MODULE
Event History
Frequently Asked Questions
Who can trigger the use-after-free condition?
A user who has permission to open a pcmtest fill_patternN debugfs file and can cause the snd-pcmtest module to be unloaded can retain the file descriptor until after the module image is freed.
Is the issue limited to systems using a modular pcmtest driver?
The described sequence requires snd-pcmtest to be loaded as a module. A PCM file or another module reference can prevent the normal unload required for the sequence.
What action causes the invalid access?
After a fill_patternN descriptor remains open through module unload, closing that descriptor invokes the proxy release path, which accesses the freed file-operations table and its owner field.